Module: Reflexion
- Includes:
- Beeps, Rays, Reflex
- Defined in:
- lib/reflexion.rb
Defined Under Namespace
Classes: App, MainWindow
Constant Summary
collapse
- DEFAULTS =
{
title: 'Reflexion',
frame: [100, 100, 512, 512]
}
Constants included
from Reflex
Reflex::Bitmap, Reflex::Bounds, Reflex::Camera, Reflex::Color, Reflex::ColorSpace, Reflex::Font, Reflex::Image, Reflex::Matrix, Reflex::Painter, Reflex::Point, Reflex::Polygon, Reflex::Polyline, Reflex::Shader
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.draw(&block) ⇒ Object
87
88
89
|
# File 'lib/reflexion.rb', line 87
def draw(&block)
$draw = block
end
|
.event ⇒ Object
75
76
77
|
# File 'lib/reflexion.rb', line 75
def event()
$event
end
|
.key(&block) ⇒ Object
91
92
93
|
# File 'lib/reflexion.rb', line 91
def key(&block)
$key = block
end
|
.motion(&block) ⇒ Object
99
100
101
|
# File 'lib/reflexion.rb', line 99
def motion(&block)
$motion = block
end
|
.pointer(&block) ⇒ Object
95
96
97
|
# File 'lib/reflexion.rb', line 95
def pointer(&block)
$pointer = block
end
|
.quit ⇒ Object
107
108
109
|
# File 'lib/reflexion.rb', line 107
def quit()
window.close
end
|
.setup(&block) ⇒ Object
79
80
81
|
# File 'lib/reflexion.rb', line 79
def setup(&block)
$setup = block
end
|
.start ⇒ Object
103
104
105
|
# File 'lib/reflexion.rb', line 103
def start()
App.new {window.show}.start
end
|
.update(&block) ⇒ Object
83
84
85
|
# File 'lib/reflexion.rb', line 83
def update(&block)
$update = block
end
|
Instance Method Details
#call_event(event, *args, &block) ⇒ Object
18
19
20
21
22
|
# File 'lib/reflexion.rb', line 18
def call_event(event, *args, &block)
$event = event
Xot::BlockUtil.instance_eval_or_block_call *args, &block if block
$event = nil
end
|