end
# smart callbacks
- def on_show
+ def smart_show
@objects.each { |o| o.show }
@alpha_anim ||= AlphaAnimator.new(2, @img, @label)
@alpha_anim.on_finished { @alpha_anim = nil }
end
- def on_hide
+ def smart_hide
@objects.each { |o| o.hide }
@alpha_anim && @alpha_anim.delete
@alpha_anim = nil
end
- def on_delete
+ def smart_delete
@objects.each { |o| o.delete }
@objects.clear
@img = @label = @alpha_anim = nil
end
- def on_move(x, y)
+ def smart_move(x, y)
@objects.each { |o| o.move(x, y) }
@label.center(self)
end
- def on_resize(w, h)
+ def smart_resize(w, h)
@img.resize(w, h)
end
end
end
# smart callbacks
- def on_show
+ def smart_show
@bg.show
end
- def on_hide
+ def smart_hide
@bg.hide
end
- def on_delete
+ def smart_delete
@bg.delete
@bg = nil
end
- def on_move(x, y)
+ def smart_move(x, y)
@bg.move(x, y)
end
- def on_resize(w, h)
+ def smart_resize(w, h)
@bg.resize(w, h)
end