Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling button animations #223

Closed
jcbk101 opened this issue Feb 15, 2023 · 2 comments
Closed

Disabling button animations #223

jcbk101 opened this issue Feb 15, 2023 · 2 comments

Comments

@jcbk101
Copy link

jcbk101 commented Feb 15, 2023

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
@Insality
Copy link
Owner

Insality commented Mar 5, 2023

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())

@jcbk101
Copy link
Author

jcbk101 commented Mar 5, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants