This commit is contained in:
Insality
2025-03-16 02:24:47 +02:00
parent a2bb93a03b
commit ad0447b649
16 changed files with 32 additions and 16 deletions

View File

@@ -92,6 +92,18 @@ function M:on_style_change(style)
end
---@return druid.button self
function M:set_animations_disabled()
self.style.on_click = function() end
self.style.on_click_disabled = function() end
self.style.on_mouse_hover = function() end
self.style.on_hover = function() end
self.style.on_set_enabled = function() end
return self
end
function M:on_late_init()
if not self.click_zone then
local stencil_node = helper.get_closest_stencil_node(self.node)

View File

@@ -9,8 +9,8 @@ local component = require("druid.component")
---@class druid.hover: druid.component
---@field node node
---@field on_hover event
---@field on_mouse_hover event
---@field on_hover event fun(self: druid.hover, is_hover: boolean)
---@field on_mouse_hover event fun(self: druid.hover, is_hover: boolean)
---@field style druid.hover.style
---@field click_zone node
---@field private _is_hovered boolean|nil