mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update
This commit is contained in:
@@ -36,7 +36,10 @@ M["button"] = {
|
||||
on_click = function(self, node)
|
||||
local scale_to = self.start_scale + M.button.SCALE_CHANGE
|
||||
gui.set_scale(node, scale_to)
|
||||
gui.animate(node, gui.PROP_SCALE, self.start_scale, gui.EASING_OUTBACK, 0.24)
|
||||
|
||||
local is_hover = self.hover:is_mouse_hovered()
|
||||
local target_scale = is_hover and self.start_scale + M.button.HOVER_MOUSE_SCALE or self.start_scale
|
||||
gui.animate(node, gui.PROP_SCALE, target_scale, gui.EASING_OUTBACK, 0.24)
|
||||
|
||||
settings.play_sound(M.button.BTN_SOUND)
|
||||
end,
|
||||
|
Reference in New Issue
Block a user