How to style a Druid Button for custom animations. Current defaults are good, but I subtly just want to customize:
- When I hover, it scales bigger
translate: scale(1.5)
in css (or hover:scale-105 in tailwind)
- When I hold click/active, it scales smaller
translate: scale(0.85)
in css (or active:scale-85 in tailwind)
Is making a new component just the way? Thanks in advance!
Hello! The current default way is to copy a default Druid “style” table (https://github.com/Insality/druid/blob/master/druid/styles/default/style.lua#L21) and set it on load step of your game as a default one
More info styles - https://github.com/Insality/druid/blob/master/docs_md/03-styles.md
Scaling down works not very good, since the “touch area” for this node will be decreased. So if you will tap on button on the edge, it can’t be clicked due this goes out of cursor. But sometimes it’s okay