class Gosuplus::Window

Public Class Methods

new(caption, width, height, fullscreen = false) click to toggle source
Calls superclass method
# File lib/Gosuplus/window.rb, line 3
def initialize(caption, width, height, fullscreen = false)
  super width, height, fullscreen
  self.caption = caption
  @state_manager = StateManager.new(self)
end

Public Instance Methods

add_state(state) click to toggle source
# File lib/Gosuplus/window.rb, line 29
def add_state(state)
  @state_manager.add(state)
end
button_down(id) click to toggle source
# File lib/Gosuplus/window.rb, line 17
def button_down(id)
  @state_manager.handle_input(id, true)
end
button_up(id) click to toggle source
# File lib/Gosuplus/window.rb, line 21
def button_up(id)
  @state_manager.handle_input(id, false)
end
draw() click to toggle source
# File lib/Gosuplus/window.rb, line 13
def draw
  @state_manager.draw
end
needs_cursor?() click to toggle source
# File lib/Gosuplus/window.rb, line 25
def needs_cursor?
  true
end
update() click to toggle source
# File lib/Gosuplus/window.rb, line 9
def update
  @state_manager.update
end