mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Clean up todo, more docs
This commit is contained in:
@@ -24,7 +24,7 @@ end
|
||||
function M.tap_scale_animation(self, node, target_scale)
|
||||
scale_to(self, node, target_scale,
|
||||
function()
|
||||
M.back_scale_animation(self, node, self.scale_from)
|
||||
M.back_scale_animation(self, node, self.start_scale)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
@@ -18,14 +18,14 @@ M["button"] = {
|
||||
IS_HOVER = true,
|
||||
|
||||
on_hover = function(self, node, state)
|
||||
local scale_to = self.scale_from + M.button.HOVER_SCALE
|
||||
local scale_to = self.start_scale + M.button.HOVER_SCALE
|
||||
|
||||
local target_scale = state and scale_to or self.scale_from
|
||||
local target_scale = state and scale_to or self.start_scale
|
||||
anims.hover_scale(self, target_scale, M.button.HOVER_TIME)
|
||||
end,
|
||||
|
||||
on_click = function(self, node)
|
||||
local scale_to = self.scale_from + M.button.SCALE_CHANGE
|
||||
local scale_to = self.start_scale + M.button.SCALE_CHANGE
|
||||
anims.tap_scale_animation(self, node, scale_to)
|
||||
settings.play_sound(M.button.BTN_SOUND)
|
||||
end,
|
||||
|
Reference in New Issue
Block a user