mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 13:44:58 +00:00
feat: Update mouse grab behavior and add gamepad state handling in InputState
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user