X-Git-Url: http://git.code-monkey.de/?p=embrace.git;a=blobdiff_plain;f=bin%2Fembrace;fp=bin%2Fembrace;h=4e5b64ebf3cbac0097ccb61b9c1af74a686c0007;hp=bfd91c9187e631951842089f2910c4b569019d9a;hb=14d1460090aee21970fe84463764b4f9573f8122;hpb=4a43ceec47783f0a66008d207a8479e324355d28 diff --git a/bin/embrace b/bin/embrace index bfd91c9..4e5b64e 100755 --- a/bin/embrace +++ b/bin/embrace @@ -134,21 +134,21 @@ module Embrace 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 @@ -157,13 +157,13 @@ module Embrace @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 @@ -256,24 +256,24 @@ module Embrace 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