Class: MyGUIWindow
- Inherits:
-
GGLib::GUIWindow
- Object
- Gosu::Window
- GGLib::GUIWindow
- MyGUIWindow
- Defined in:
- lib/examples/BasicExample.rb
Constant Summary
Constants inherited from GGLib::GUIWindow
Instance Attribute Summary
Attributes inherited from GGLib::GUIWindow
#background_image, #camera, #cursor, #images, #mapimages, #state
Instance Method Summary collapse
-
#initialize ⇒ MyGUIWindow
constructor
A new instance of MyGUIWindow.
Methods inherited from GGLib::GUIWindow
#button_down, #button_up, #createWidgets, #deleteAllImages, #deleteAllMapImages, #deleteAllWidgets, #deleteImage, #deleteMapImage, #deleteWidget, #draw, #framedrawn, #hasFocus, #hasStickyFocus, #newImage, #newMapImage, #newTexture, #newWidget, #setBackground, #setFocus, #setImage, #setMapBackground, #setStickyFocus, #setTextInput, #setTexture, #timer, #update, #widgets
Constructor Details
#initialize ⇒ MyGUIWindow
Returns a new instance of MyGUIWindow.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/examples/BasicExample.rb', line 18 def initialize super(640, 480, false, 20) self.caption = "GGLib Tutorial" #Rather than override methods such as update, button_down, #and draw, as we would with plain Gosu code, we will override #these methods in state objects. This allows the user to switch #between various game states, such as between menus and the #actual game, without having to litter their functions with #switch statements or if-else statements. self.state = MyStateObj.new end |