Module: R2D::Adapters
- Defined in:
- lib/r2d/adapters.rb,
lib/r2d/adapters/gosu.rb
Defined Under Namespace
Modules: Gosu
Class Method Summary collapse
- .create(window, kind) ⇒ Object
- .current_song ⇒ Object
- .get_color(r, g, b, a) ⇒ Object
- .image(path) ⇒ Object
- .key_lookup(key) ⇒ Object
- .mouse_x ⇒ Object
- .mouse_y ⇒ Object
- .show ⇒ Object
-
.song(path) ⇒ Object
Fix these:.
- .sound(path) ⇒ Object
- .text(h = 20, font = 'default') ⇒ Object
Class Method Details
.create(window, kind) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/r2d/adapters.rb', line 8 def self.create(window, kind) if !@active case kind when :gosu @active = Gosu @active.create_window(window) end true else false end end |
.current_song ⇒ Object
36 |
# File 'lib/r2d/adapters.rb', line 36 def self.current_song; @active.current_song end |
.get_color(r, g, b, a) ⇒ Object
27 |
# File 'lib/r2d/adapters.rb', line 27 def self.get_color(r, g, b, a); Gosu.get_color(r, g, b, a) end |
.image(path) ⇒ Object
40 |
# File 'lib/r2d/adapters.rb', line 40 def self.image(path); @active.image(path) end |
.key_lookup(key) ⇒ Object
25 |
# File 'lib/r2d/adapters.rb', line 25 def self.key_lookup(key); Gosu.key_id(key) end |
.show ⇒ Object
21 22 23 |
# File 'lib/r2d/adapters.rb', line 21 def self.show @active.show_window end |
.song(path) ⇒ Object
Fix these:
34 |
# File 'lib/r2d/adapters.rb', line 34 def self.song(path); @active.song(path) end |
.sound(path) ⇒ Object
38 |
# File 'lib/r2d/adapters.rb', line 38 def self.sound(path); @active.sound(path) end |
.text(h = 20, font = 'default') ⇒ Object
42 |
# File 'lib/r2d/adapters.rb', line 42 def self.text(h=20, font='default'); @active.text(h, font) end |