From 4206d7fe5cf450fbc1f9a16e8d57b85c08df3dab Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 17 Jun 2025 11:43:34 -0500 Subject: make input events consumable Having a input queue of consumable input events allow widgets to prevent the further handling of the same event by different collections by consuming the event. --- go/client/keybindings.go | 1 + go/client/startMenu.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'go/client') diff --git a/go/client/keybindings.go b/go/client/keybindings.go index b39a0da4..2bfc52c7 100644 --- a/go/client/keybindings.go +++ b/go/client/keybindings.go @@ -17,6 +17,7 @@ type ( var tapToHandle ui.Tap func (g *Game) handleKeyBindings(bindings keyBindings) { + // FIXME: Use new ui.InputEvent queue for _k, a := range bindings { var remove bool diff --git a/go/client/startMenu.go b/go/client/startMenu.go index 10b9e23d..c3377a40 100644 --- a/go/client/startMenu.go +++ b/go/client/startMenu.go @@ -151,7 +151,7 @@ func (m *startMenu) Update() error { m.sealed = nil } - if err := ui.TouchManager.Update(); err != nil { + if err := ui.Update(); err != nil { return err } -- cgit v1.2.3