Go 1.22+fix input bug

This commit is contained in:
bloeys
2024-04-12 23:55:21 +04:00
parent e22525e2ee
commit b060dcdbe9
4 changed files with 24 additions and 4 deletions

View File

@ -39,6 +39,14 @@ func (w *Window) handleInputs() {
imguiCaptureMouse := imIo.WantCaptureMouse()
imguiCaptureKeyboard := imIo.WantCaptureKeyboard()
if imguiCaptureMouse {
input.ClearMouseState()
}
if imguiCaptureKeyboard {
input.ClearKeyboardState()
}
for event := sdl.PollEvent(); event != nil; event = sdl.PollEvent() {
//Fire callbacks