mirror of
https://github.com/Insality/druid.git
synced 2025-09-28 10:32:20 +02:00
Add first implementation of druid styles (only button)
This commit is contained in:
26
druid/styles/bounce/anims.lua
Normal file
26
druid/styles/bounce/anims.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local ui_animate = require("druid.helper.druid_animate")
|
||||
|
||||
|
||||
local M = {}
|
||||
|
||||
|
||||
function M.back_scale_animation(self, node, target_scale)
|
||||
ui_animate.scale_to(self, node, target_scale)
|
||||
end
|
||||
|
||||
|
||||
function M.tap_scale_animation(self, node, target_scale)
|
||||
ui_animate.scale_to(self, node, target_scale,
|
||||
function()
|
||||
M.back_scale_animation(self, node, self.scale_from)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
function M.hover_scale(self, target, time)
|
||||
ui_animate.scale(self, self.anim_node, target, time)
|
||||
end
|
||||
|
||||
|
||||
return M
|
Reference in New Issue
Block a user