mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
TEST
This commit is contained in:
@@ -235,15 +235,16 @@ end
|
||||
---@param x number # Mouse position
|
||||
---@param y number # Mouse position
|
||||
function BUTTON.checkHovering(list, x, y)
|
||||
for _, v in pairs(list) do v:isHovering(x, y) end
|
||||
for _, v in pairs(list) do v._hovering = v:isHovering(x, y) end
|
||||
end
|
||||
|
||||
--- Trigger the press action, only if ``button._hovering == true``
|
||||
---@param list table<BUTTON.button>
|
||||
---@param x number # Mouse position
|
||||
---@param y number # Mouse position
|
||||
function BUTTON.press(list, x, y)
|
||||
for _, v in pairs(list) do v:press(x, y) end
|
||||
---@param isMouse? boolean # Is mouse just released a button?
|
||||
function BUTTON.press(list, x, y, isMouse)
|
||||
for _, v in pairs(list) do v:press(x, y, isMouse) end
|
||||
end
|
||||
|
||||
---Trigger the release action
|
||||
|
||||
Reference in New Issue
Block a user