Sha256: 7a2dfd0687ca63d7aaa0c224f3f9bb403d22a3d3f7e0ce87f5fc44e308527fda

Contents?: true

Size: 428 Bytes

Versions: 4

Compression:

Stored size: 428 Bytes

Contents

$:.unshift File.expand_path(File.dirname(__FILE__) + "/../../lib")
$:.unshift File.expand_path(File.dirname(__FILE__) + "/../../ext")

require 'ray'

Ray.game "Fullscreen", :fullscreen => true, :size => Ray.screen_size do
  register { add_hook :key_press, key(:q), method(:exit!) }

  scene :main do
    @text = text "Press q to leave", :size => 30

    render do |win|
      win.draw @text
    end
  end

  scenes << :main
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ray-0.2.1 samples/window/fullscreen.rb
ray-0.2.0 samples/window/fullscreen.rb
ray-0.1.1 samples/window/fullscreen.rb
ray-0.1.0 samples/window/fullscreen.rb