class Straightedge::Gosu::Surface

Attributes

font[R]
scale[R]
scene[R]

Public Class Methods

new(geometry=[800,600], caption: "Gosu-as-a-Surface") click to toggle source
Calls superclass method
# File lib/straightedge/gosu/window.rb, line 8
def initialize(geometry=[800,600], caption: "Gosu-as-a-Surface")
  @width, @height  = *geometry
  super @width, @height, false
  self.caption   = caption
  @font = ::Gosu::Font.new(self, ::Gosu::default_font_name, 20)
end

Public Instance Methods

button_down(id) click to toggle source
# File lib/straightedge/gosu/window.rb, line 17
def button_down(id)
  case id
  when ::Gosu::MsLeft
    @adapter.click(mouse_x,mouse_y)
  else
  end
end
draw() click to toggle source
# File lib/straightedge/gosu/window.rb, line 16
def draw;   @adapter.render end
update() click to toggle source
# File lib/straightedge/gosu/window.rb, line 15
def update; @adapter.step   end