mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Add tests for hover component
This commit is contained in:
@@ -99,6 +99,15 @@ function Hover.set_hover(self, state)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Return current hover state. True if touch action was on the node at current time
|
||||
-- @tparam Hover self @{Hover}
|
||||
-- @treturn bool The current hovered state
|
||||
function Hover.is_hovered(self)
|
||||
return self._is_hovered
|
||||
end
|
||||
|
||||
|
||||
--- Set mouse hover state
|
||||
-- @tparam Hover self @{Hover}
|
||||
-- @tparam bool state The mouse hover state
|
||||
@@ -110,6 +119,14 @@ function Hover.set_mouse_hover(self, state)
|
||||
end
|
||||
|
||||
|
||||
--- Return current hover state. True if nil action_id (usually desktop mouse) was on the node at current time
|
||||
-- @tparam Hover self @{Hover}
|
||||
-- @treturn bool The current hovered state
|
||||
function Hover.is_mouse_hovered(self)
|
||||
return self._is_mouse_hovered
|
||||
end
|
||||
|
||||
|
||||
--- Strict hover click area. Useful for
|
||||
-- no click events outside stencil node
|
||||
-- @tparam Hover self @{Hover}
|
||||
|
Reference in New Issue
Block a user