module R2D::Adapters

Public Class Methods

create(window, kind) click to toggle source
# 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() click to toggle source
# File lib/r2d/adapters.rb, line 36
def self.current_song; @active.current_song end
get_color(r, g, b, a) click to toggle source
# 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) click to toggle source
# File lib/r2d/adapters.rb, line 40
def self.image(path); @active.image(path) end
key_lookup(key) click to toggle source
# File lib/r2d/adapters.rb, line 25
def self.key_lookup(key); Gosu.key_id(key) end
mouse_x() click to toggle source
# File lib/r2d/adapters.rb, line 29
def self.mouse_x; Gosu.mouse_x end
mouse_y() click to toggle source
# File lib/r2d/adapters.rb, line 30
def self.mouse_y; Gosu.mouse_y end
show() click to toggle source
# File lib/r2d/adapters.rb, line 21
def self.show
  @active.show_window
end
song(path) click to toggle source

Fix these:

# File lib/r2d/adapters.rb, line 34
def self.song(path); @active.song(path) end
sound(path) click to toggle source
# File lib/r2d/adapters.rb, line 38
def self.sound(path); @active.sound(path) end
text(h=20, font='default') click to toggle source
# File lib/r2d/adapters.rb, line 42
def self.text(h=20, font='default'); @active.text(h, font) end