diff --git a/config/gui_runtime.json b/config/gui_runtime.json index 8519e4c..8349e17 100644 --- a/config/gui_runtime.json +++ b/config/gui_runtime.json @@ -15,7 +15,7 @@ ], "mouse_grab": { "enabled": true, - "grab_on_click": true, + "grab_on_click": false, "release_on_escape": true, "start_grabbed": false, "hide_cursor": true, diff --git a/scripts/gui.lua b/scripts/gui.lua index 9a7983e..cd58e3b 100644 --- a/scripts/gui.lua +++ b/scripts/gui.lua @@ -103,6 +103,15 @@ function InputState:addTextInput(text) self.textInput = (self.textInput or "") .. (text or "") end +function InputState:setGamepad(connected, leftX, leftY, rightX, rightY, togglePressed) + self.gamepadConnected = connected + self.gamepadLeftX = leftX or 0 + self.gamepadLeftY = leftY or 0 + self.gamepadRightX = rightX or 0 + self.gamepadRightY = rightY or 0 + self.gamepadTogglePressed = togglePressed +end + function InputState:resetTransient() self.textInput = "" self.wheel = 0