Skip to content

Commit

Permalink
InputHandler: Temporary disable input handler
Browse files Browse the repository at this point in the history
fix #754

At this time I have no good idea for fix on this, but because this
causes that giu is useless, I've decided to disable very specific part of the framework that is not essential
  • Loading branch information
gucio321 committed Mar 5, 2024
1 parent 774b2ce commit d239ddb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions MasterWindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,15 @@ func (w *MasterWindow) SetShouldClose(v bool) {
func (w *MasterWindow) SetInputHandler(handler InputHandler) {
Context.InputHandler = handler

w.backend.SetKeyCallback(func(key, scanCode, action, modifier int) {
k, m, a := keyFromGLFWKey(imgui.GLFWKey(key)), Modifier(modifier), Action(action)
handler.Handle(k, m, a)
if w.additionalInputCallback != nil {
w.additionalInputCallback(k, m, a)
}
})
/*
w.backend.SetKeyCallback(func(key, scanCode, action, modifier int) {
k, m, a := keyFromGLFWKey(imgui.GLFWKey(key)), Modifier(modifier), Action(action)
handler.Handle(k, m, a)
if w.additionalInputCallback != nil {
w.additionalInputCallback(k, m, a)
}
})
*/
}

// SetAdditionalInputHandlerCallback allows to set an input callback to handle more events (not only these from giu.inputHandler).
Expand Down

0 comments on commit d239ddb

Please sign in to comment.