Sha256: 65b6eccdbf9f7f174847257efba103763f9f734afda83db9297e2cc94c390106

Contents?: true

Size: 634 Bytes

Versions: 10

Compression:

Stored size: 634 Bytes

Contents

module Gosuplus
  class Window < Gosu::Window
    def initialize(caption, width, height, fullscreen = false)
      super width, height, fullscreen
      self.caption = caption
      @state_manager = StateManager.new(self)
    end

    def update
      @state_manager.update
    end

    def draw
      @state_manager.draw
    end

    def button_down(id)
      @state_manager.handle_input(id, true)
    end

    def button_up(id)
      @state_manager.handle_input(id, false)
    end

    def needs_cursor?
      true
    end

    def add_state(state)
      @state_manager.add(state)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
Gosuplus-1.0.261 lib/Gosuplus/window.rb
Gosuplus-1.0.26 lib/Gosuplus/window.rb
Gosuplus-1.0.25 lib/Gosuplus/window.rb
Gosuplus-1.0.24 lib/Gosuplus/window.rb
Gosuplus-1.0.23 lib/Gosuplus/window.rb
Gosuplus-1.0.22 lib/Gosuplus/window.rb
Gosuplus-1.0.21 lib/Gosuplus/window.rb
Gosuplus-1.0.20 lib/Gosuplus/window.rb
Gosuplus-1.0.19 lib/Gosuplus/window.rb
Gosuplus-1.0.18 lib/Gosuplus/window.rb