I’m trying to animate the alpha of a button, but i see the end_animation is executed while the button is still changing alpha, why?
I tried setting very high delay and duration to see this clearly
local function end_animation(self,node,value)
-- store the node-ID in table with value TRUE (means, animation is finished!)
self.animatedbuttons[gui.get_id(node)] = value
print("end_anim")
print(value)
end
local function animate_back_button(self, node)
if self.animatedbuttons[gui.get_id(node)] == nil then
self.animatedbuttons[gui.get_id(node)] = false
local to_color = gui.get_color(node)
to_color.w = 1.0
gui.animate(node, gui.PROP_COLOR, to_color, gui.EASING_IN, 1.4,0, end_animation(self,node,true) ,gui.PLAYBACK_ONCE_FORWARD )
end
end