druid
druid copied to clipboard
Disabling button animations
Not sure if this is intended, and I am still learning the system, but Hover and on_clicks cancel my animations when using druid.
My work around was [code] button.anim_node = nil[/code] but then it errors from 'style.lua'...
on_click = function(self, node)
local scale_to = self.start_scale + M.button.SCALE_CHANGE
anims.tap_scale_animation(self, node, scale_to) -- Error here
settings.play_sound(M.button.BTN_SOUND)
end
Maybe it can be...
on_click = function(self, node)
local scale_to = self.start_scale + M.button.SCALE_CHANGE
if node then anims.tap_scale_animation(self, node, scale_to) end
settings.play_sound(M.button.BTN_SOUND)
end