Sha256: 2f6e7995028fb01401dbc94ce49e8830c6e6d442194094861c0ebd5e701d1795
Contents?: true
Size: 725 Bytes
Versions: 1
Compression:
Stored size: 725 Bytes
Contents
module Straightedge module Gosu class Surface < ::Gosu::Window include Straightedge::Surface attr_reader :scene, :font, :scale 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 def update; @adapter.step end def draw; @adapter.render end def button_down(id) case id when ::Gosu::MsLeft @adapter.click(mouse_x,mouse_y) else end end # # implementing straightedge stuff... # alias :display :show end end config.surface_class = Straightedge::Gosu::Surface end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
straightedge-gosu-0.1.0 | lib/straightedge/gosu/window.rb |