Method: Gosu::Window#show
- Defined in:
- lib/gosu_android/main-window.rb
#show ⇒ Object
Enters a modal loop where the Window is visible on screen and receives calls to draw, update etc.
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/gosu_android/main-window.rb', line 149 def show @showing = true if @fullscreen #Use full java path for Window, since there is a Gosu::Window @activity.request_window_feature(JavaImports::Window::FEATURE_NO_TITLE) @activity.get_window.set_flags(JavaImports::WindowManager::LayoutParams::FLAG_FULLSCREEN, JavaImports::WindowManager::LayoutParams::FLAG_FULLSCREEN) #@activity.content_view = @surface_view @window = @activity.getWindow #Replace position and size with gosu metrics else @window = @activity.getWindow #Only the thread that created the view can change it, so setLayout #and setTitle cannot be executed here p = Proc.new do @window.setLayout(@width, @height) @activity.setTitle @caption end @activity.runOnUiThread(p) end @screen_width = @surface_view.get_width @screen_height = @surface_view.get_height end |