def initialize(evas, label)
super(evas)
+ self.name = label
+
@slot = nil
@alpha_anim = nil
@img.set_file(ICON_FILE)
@img.set_fill(0, 0, *@img.get_size)
- @label.text = label
+ @label.text = name
@label.set_font("VeraBd", 10)
resize(*@img.get_size)
end
- def label
- @label.text
- end
-
# smart callbacks
def on_show
@objects.each { |o| o.show }
class ContainerFullError < ContainerError; end
class ContainerLockedError < ContainerError; end
- include Enumerable
-
def initialize(evas)
super
@add_lock_count = 0
end
- def each
- @icons.compact.each { |i| yield i }
- end
-
def <<(i)
Kernel.raise(ContainerFullError) if slots_left.zero?
Kernel.raise(ContainerLockedError) unless @add_lock_count.zero?
lbl = md.captures.first
end
- found = @container.find { |i| i.label == lbl }
+ found = evas.find_object(lbl)
begin
if ev.count.zero?