Clean up todo, more docs

This commit is contained in:
Insality
2020-03-22 15:32:00 +03:00
parent 696622b42b
commit 7c22032004
33 changed files with 92 additions and 72 deletions

View File

@@ -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

View File

@@ -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,