class LUIT::Icon
Attributes
h[R]
w[R]
x[R]
y[R]
Public Class Methods
new(path, x, y, w, h)
click to toggle source
# File lib/luit.rb, line 381 def initialize(path, x, y, w, h) @icon = Gosu::Image.new(path) @scalex = (w / @icon.width) @scaley = (h / @icon.height) @x = x @y = y @w = w @h = h end
Public Instance Methods
draw(x = 0, y = 0)
click to toggle source
# File lib/luit.rb, line 391 def draw(x = 0, y = 0) @icon.draw(@x + x, @y + y, 1, @scalex, @scaley) end
update(x = 0, y = 0)
click to toggle source
# File lib/luit.rb, line 395 def update(x = 0, y = 0) end