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/choice.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/choice.go')
| -rw-r--r-- | go/ui/choice.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/go/ui/choice.go b/go/ui/choice.go index f937646b..5954c1fa 100644 --- a/go/ui/choice.go +++ b/go/ui/choice.go @@ -40,7 +40,9 @@ func (c *Choice) setText() { func (c *Choice) GetChoosen(x, y int) int { i := (y - c.Y) / (c.Height / len(c.choices)) - if i == len(c.choices) { i = i - 1 } + if i == len(c.choices) { + i = i - 1 + } return i } |
