druid icon indicating copy to clipboard operation
druid copied to clipboard

Disabling button animations

Open jcbk101 opened this issue 1 year ago • 2 comments

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

jcbk101 avatar Feb 15 '23 12:02 jcbk101