Method: Gosu::Window#focus_changed
- Defined in:
- lib/gosu_android/main-window.rb
#focus_changed(has_focus, width, height) ⇒ Object
TODO On screen rotation the app breaks down
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/gosu_android/main-window.rb', line 328 def focus_changed has_focus, width, height @screen_width = width @screen_height = height if has_focus if @showing and @media_player != nil @media_player.start end #TODO Keyboard does not appears again if @showing_keyboard show_soft_keyboard end else #Hide keyboard but mark it so it will be shown later if @showing_keyboard hide_soft_keyboard @showing_keyboard = true end if @showing and @media_player != nil @media_player.pause end end return true end |