Class: Presentation::Window
- Inherits:
-
Gosu::Window
- Object
- Gosu::Window
- Presentation::Window
- Defined in:
- lib/presentation/window.rb
Instance Method Summary collapse
- #button_down(button) ⇒ Object
- #draw ⇒ Object
-
#initialize(slide_deck) ⇒ Window
constructor
A new instance of Window.
- #update ⇒ Object
Constructor Details
#initialize(slide_deck) ⇒ Window
Returns a new instance of Window.
4 5 6 7 |
# File 'lib/presentation/window.rb', line 4 def initialize() @slide_deck = super(1200, 600, true) # TODO: set to fullscreen when Gosu fixes issue #157 end |
Instance Method Details
#button_down(button) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/presentation/window.rb', line 9 def () case when Gosu::KbEscape then close when Gosu::KbRight, Gosu::KbSpace, Gosu::KbReturn @slide_deck. when Gosu::KbLeft @slide_deck. else # @slide_deck.current_slide.button_down end end |
#draw ⇒ Object
26 27 28 |
# File 'lib/presentation/window.rb', line 26 def draw @slide_deck..draw(self) end |
#update ⇒ Object
21 22 23 24 |
# File 'lib/presentation/window.rb', line 21 def update @slide_deck..scroll_up if Gosu::KbDown @slide_deck..scroll_down if Gosu::KbUp end |