Module: Reflexion
- Includes:
- 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
86
87
88
|
# File 'lib/reflexion.rb', line 86
def draw(&block)
$draw = block
end
|
.event ⇒ Object
74
75
76
|
# File 'lib/reflexion.rb', line 74
def event()
$event
end
|
.key(&block) ⇒ Object
90
91
92
|
# File 'lib/reflexion.rb', line 90
def key(&block)
$key = block
end
|
.motion(&block) ⇒ Object
98
99
100
|
# File 'lib/reflexion.rb', line 98
def motion(&block)
$motion = block
end
|
.pointer(&block) ⇒ Object
94
95
96
|
# File 'lib/reflexion.rb', line 94
def pointer(&block)
$pointer = block
end
|
.quit ⇒ Object
106
107
108
|
# File 'lib/reflexion.rb', line 106
def quit()
window.close
end
|
.setup(&block) ⇒ Object
78
79
80
|
# File 'lib/reflexion.rb', line 78
def setup(&block)
$setup = block
end
|
.start ⇒ Object
102
103
104
|
# File 'lib/reflexion.rb', line 102
def start()
App.new {window.show}.start
end
|
.update(&block) ⇒ Object
82
83
84
|
# File 'lib/reflexion.rb', line 82
def update(&block)
$update = block
end
|
Instance Method Details
#call_event(event, *args, &block) ⇒ Object
17
18
19
20
21
|
# File 'lib/reflexion.rb', line 17
def call_event(event, *args, &block)
$event = event
Xot::BlockUtil.instance_eval_or_block_call *args, &block if block
$event = nil
end
|