class LUIT::ClickArea
Public Class Methods
new(holder, id, x, y, w = 0, h = 0)
click to toggle source
Calls superclass method
LUIT::LUITElement::new
# File lib/luit.rb, line 93 def initialize(holder, id, x, y, w = 0, h = 0) h = [1, h].max w = [1, w].max super(holder, id, x, y, w, h) end
Public Instance Methods
draw(x = 0, y = 0)
click to toggle source
# File lib/luit.rb, line 99 def draw(x = 0, y = 0) Gosu::draw_rect(@x + x, @y + y, @w, @h, @hover ? LUIT.uiColorLight : LUIT.uiColor) end
update(x = 0, y = 0)
click to toggle source
Calls superclass method
LUIT::LUITElement#update
# File lib/luit.rb, line 103 def update(x = 0, y = 0) x += @x y += @y updateHover(x, y) super(x, y) end