mirror of https://github.com/teverse/teverse
Added hover effect to buttons
This commit is contained in:
parent
55a1ca4454
commit
9f5ad0ee7f
core/dashboard
|
@ -113,16 +113,29 @@ controller.setup = function()
|
|||
strokeRadius = 3
|
||||
})
|
||||
|
||||
icon:on("mouseEnter", function()
|
||||
icon.backgroundAlpha = 0.15
|
||||
end)
|
||||
|
||||
icon:on("mouseExit", function()
|
||||
-- container is visible if button is 'active'
|
||||
if not container.visible then
|
||||
icon.backgroundAlpha = 0
|
||||
end
|
||||
end)
|
||||
|
||||
icon:on("mouseLeftUp", function()
|
||||
for _,v in pairs(pages) do
|
||||
v[1].visible = false
|
||||
v[2].iconAlpha = 0.75
|
||||
v[2].backgroundAlpha = 0.0
|
||||
v[2].dropShadowAlpha = 0.0
|
||||
end
|
||||
|
||||
container.visible = true
|
||||
icon.iconAlpha = 1.0
|
||||
icon.backgroundAlpha = 0.2
|
||||
icon.dropShadowAlpha = 0.15
|
||||
end)
|
||||
|
||||
page.setup(container)
|
||||
|
|
Loading…
Reference in New Issue