Insality 928a212527 Add on_style_change to every component
Empty default style is now valid. Every component have their default style values. Removed style function checks
2020-05-09 12:45:09 +03:00

25 lines
501 B
Lua

local M = {}
M["button"] = {
LONGTAP_TIME = 0.4,
DOUBLETAP_TIME = 0.4,
HOVER_MOUSE_IMAGE = "button_yellow",
DEFAULT_IMAGE = "button_blue",
HOVER_IMAGE = "button_red",
on_hover = function(self, node, state)
local anim = state and M.button.HOVER_IMAGE or M.button.DEFAULT_IMAGE
gui.play_flipbook(node, anim)
end,
on_mouse_hover = function(self, node, state)
local anim = state and M.button.HOVER_MOUSE_IMAGE or M.button.DEFAULT_IMAGE
gui.play_flipbook(node, anim)
end
}
return M