Method: GGLib::GUIWindow#initialize
- Defined in:
- lib/window.rb
#initialize(w = 640, h = 480, fullscreen = true, u = 20, stateObj = BlankState) ⇒ GUIWindow
Returns a new instance of GUIWindow.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/window.rb', line 11 def initialize(w=640, h=480, fullscreen=true, u=20, stateObj=BlankState) super(w, h, fullscreen, u) $window=self #pre initialize global var to allow win initialization @background_image = Gosu::Image.new(self, File.(File.dirname(__FILE__))+"/null.png", true) @cursor = Cursor.new(File.(File.dirname(__FILE__))+"/media/cursor.bmp", false) @framedrawn=false @timer=0 @camera=Camera.new @images = CArray.new @mapimages = CArray.new @guiWidgets = CArray.new @state=stateObj @focused=nil @stickfocused=nil @leftdrag = MouseDragEvent.new @rightdrag = MouseDragEvent.new @state.start $window=self $theme_init_hook.call end |