diff --git a/.vscode/settings.json b/.vscode/settings.json index a239ff2..1deeeb5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,7 +5,8 @@ }, "Lua.workspace.library": [ "${3rd}/love2d/library", - "C:/Users/Harry/AppData/Roaming/Code/User/globalStorage/sumneko.lua/addonManager/addons/love2d/module/library" + "C:/Users/Harry/AppData/Roaming/Code/User/globalStorage/sumneko.lua/addonManager/addons/love2d/module/library", + "C:/Users/Harry/AppData/Roaming/Code/User/globalStorage/sumneko.lua/addonManager/addons/lldebugger/module/library" ], "Lua.workspace.checkThirdParty": false, "githubPullRequests.ignoredPullRequestBranches": [ diff --git a/libs/simple-button.lua b/libs/simple-button.lua index b7a5e2e..226ccf6 100644 --- a/libs/simple-button.lua +++ b/libs/simple-button.lua @@ -125,6 +125,7 @@ end ---Trigger release action, don't need ``self._hovering`` to ``true`` ---@param isTouch? boolean Button just released by mouse? function button:release(x, y, isTouch) + error() local hovering = isTouch and self:isHovering(x, y) or self._hovering if hovering and self._pressed then diff --git a/main.lua b/main.lua index 6ca9bd9..b9752bc 100644 --- a/main.lua +++ b/main.lua @@ -51,9 +51,12 @@ function love.load() require "scene" require "game.vctrl" -- VCTRL - SCENE.update = function() + function SCENE.update() SCENE = SETTINGS.firstTime and InputConfigScene(true) or TitleScene() end + function SCENE.render() + love.graphics.draw(LOADING_IMAGE_FILE,0,0,0,0.5) + end -- VCTRL.toggle(love.system.getOS()=='Android' or true) VCTRL.new{ -- up down left right --- right left down up diff --git a/scene.lua b/scene.lua index 25c1d0c..ea8220d 100644 --- a/scene.lua +++ b/scene.lua @@ -4,9 +4,7 @@ SCENE = Object:extend() function SCENE:new() end function SCENE:update() end -function SCENE:render() - love.graphics.draw(LOADING_IMAGE_FILE,0,0,0,0.5) -end +function SCENE:render() end -- You can use the class SCENE_onInput to show suggestions for `e` table