Module: Reflexion

Includes:
Beeps, Rays, Reflex
Defined in:
lib/reflexion.rb

Defined Under Namespace

Classes: MainWindow

Constant Summary collapse

DEFAULTS =
{
  title: 'Reflexion',
  frame: [100, 100, 512, 512]
}

Constants included from Reflex

Reflex::Bitmap, Reflex::Bounds, Reflex::CAPTURE_FLAG, Reflex::Color, Reflex::ColorSpace, Reflex::Font, Reflex::Image, Reflex::Painter, Reflex::Point, Reflex::Shader, Reflex::Texture

Class Method Summary collapse

Class Method Details

.draw(&block) ⇒ Object



78
79
80
# File 'lib/reflexion.rb', line 78

def draw (&block)
  $draw = block
end

.eventObject



66
67
68
# File 'lib/reflexion.rb', line 66

def event ()
  window.event
end

.key(&block) ⇒ Object



82
83
84
# File 'lib/reflexion.rb', line 82

def key (&block)
  $key = block
end

.pointer(&block) ⇒ Object



86
87
88
# File 'lib/reflexion.rb', line 86

def pointer (&block)
  $pointer = block
end

.quitObject



94
95
96
# File 'lib/reflexion.rb', line 94

def quit ()
  window.close
end

.setup(&block) ⇒ Object



70
71
72
# File 'lib/reflexion.rb', line 70

def setup (&block)
  $setup = block
end

.startObject



90
91
92
# File 'lib/reflexion.rb', line 90

def start ()
  Reflex.start {window.show}
end

.update(&block) ⇒ Object



74
75
76
# File 'lib/reflexion.rb', line 74

def update (&block)
  $update = block
end

.windowObject



62
63
64
# File 'lib/reflexion.rb', line 62

def window ()
  $window ||= MainWindow.new DEFAULTS
end