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:
@@ -237,18 +237,16 @@ end
|
||||
---@param list table<BUTTON.button>
|
||||
---@param x number # Mouse position
|
||||
---@param y number # Mouse position
|
||||
---@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
|
||||
function BUTTON.press(list, x, y)
|
||||
for _, v in pairs(list) do v:press(x, y) end
|
||||
end
|
||||
|
||||
---Trigger the release action
|
||||
---@param list table<BUTTON.button>
|
||||
---@param x number # Mouse position
|
||||
---@param y number # Mouse position
|
||||
---@param isMouse? boolean # Is mouse just released a button?
|
||||
function BUTTON.release(list, x, y, isMouse)
|
||||
for _, v in pairs(list) do v:release(x, y, isMouse) end
|
||||
function BUTTON.release(list, x, y)
|
||||
for _, v in pairs(list) do v:release(x, y) end
|
||||
end
|
||||
|
||||
return BUTTON
|
||||
@@ -77,13 +77,13 @@ end
|
||||
function TouchConfigScene:onInputPress(e)
|
||||
if e.input == 'menu_back' then SCENE = InputConfigScene() end
|
||||
if e.type == "mouse" or e.type == "touch" then
|
||||
BUTTON.press(buttonList, e.x, e.y, e.type == "touch")
|
||||
BUTTON.press(buttonList, e.x, e.y)
|
||||
end
|
||||
end
|
||||
---@param e SCENE_onInput
|
||||
function TouchConfigScene:onInputRelease(e)
|
||||
if e.type == "mouse" or e.type == "touch" then
|
||||
BUTTON.release(buttonList, e.x, e.y, e.type == "touch")
|
||||
BUTTON.release(buttonList, e.x, e.y)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user