diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-09-03 14:26:21 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-09-03 14:26:21 +0200 |
| commit | 24a6b1d7aced3e2da8a4c26dfa844a6eaaf4632e (patch) | |
| tree | 40310c055521bad4fc2bd706e8fdb9b7dc1fb2cd /go/ui/update.go | |
| parent | 0587acd2dd03cb92d67ad0651eedda7275c084d7 (diff) | |
| download | muhqs-game-24a6b1d7aced3e2da8a4c26dfa844a6eaaf4632e.tar.gz muhqs-game-24a6b1d7aced3e2da8a4c26dfa844a6eaaf4632e.zip | |
add ui to packages and format code
Diffstat (limited to 'go/ui/update.go')
| -rw-r--r-- | go/ui/update.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/go/ui/update.go b/go/ui/update.go index 9c8ce82c..73c9d787 100644 --- a/go/ui/update.go +++ b/go/ui/update.go @@ -110,7 +110,9 @@ func Update() error { var hoverChange bool if len(TouchManager.taps) > 0 || TouchManager.pan != nil || TouchManager.pinch != nil { hoverEv, hoverChange = longtapHoverDetector.reset() - if hoverChange { AppendInput(hoverEv) } + if hoverChange { + AppendInput(hoverEv) + } } for _, tap := range TouchManager.taps { @@ -125,7 +127,9 @@ func Update() error { } hoverEv, hoverChange = longtapHoverDetector.update(TouchManager.longtap) - if hoverChange { AppendInput(hoverEv) } + if hoverChange { + AppendInput(hoverEv) + } // TODO: handle pinching if TouchManager.pinch != nil { @@ -133,7 +137,9 @@ func Update() error { x, y := ebiten.CursorPosition() hoverEv, hoverChange = hoverDetector.update(x, y) - if hoverChange { AppendInput(hoverEv) } + if hoverChange { + AppendInput(hoverEv) + } scrollX, scrollY := ebiten.Wheel() if scrollX != 0 || scrollY != 0 { |
