druid icon indicating copy to clipboard operation
druid copied to clipboard

Disabling button animations

Open jcbk101 opened this issue 2 years 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

Hello! Not sure that are you trying to do

Anim node is required for button component. It's used in button style (default/style.lua) You can copy this style.lua file and change the animations for button. After that set your style file as default (druid.set_default_style())

Insality avatar Mar 05 '23 14:03 Insality

Thanks. I have taken care of it. I was using the wrong component for my task.


From: Maksim Tuprikov @.> Sent: Sunday, March 5, 2023 9:53:39 AM To: Insality/druid @.> Cc: CodeIsLife101 @.>; Author @.> Subject: Re: [Insality/druid] Disabling button animations (Issue #223)

Hello! Not sure that are you trying to do

Anim node is required for button component. It's used in button style (default/style.lua) You can copy this style.lua file and change the animations for button. After that set your style file as default (druid.set_default_style())

— Reply to this email directly, view it on GitHubhttps://github.com/Insality/druid/issues/223#issuecomment-1455113910, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR5J7HM6EQQFRK7V4MWDAOTW2SSHHANCNFSM6AAAAAAU4YRQ4I. You are receiving this because you authored the thread.Message ID: @.***>

jcbk101 avatar Mar 05 '23 15:03 jcbk101