mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-05-01 09:04:58 +00:00
feat: Update mouse grab behavior and add gamepad state handling in InputState
This commit is contained in:
@@ -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