diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-06-10 00:03:15 -0500 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:20 +0200 |
| commit | 14c6ce4b447c9f4024c9d37aa397f9254de53436 (patch) | |
| tree | e8592610a45bd034df3a04c205e61ed1d3c27841 | |
| parent | 41cd1448bad67386233d1d45d512119d43f98bcb (diff) | |
| download | muhqs-game-14c6ce4b447c9f4024c9d37aa397f9254de53436.tar.gz muhqs-game-14c6ce4b447c9f4024c9d37aa397f9254de53436.zip | |
minor whitespace fixes
| -rw-r--r-- | go/game/movement.go | 2 | ||||
| -rw-r--r-- | go/ui/choice.go | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/go/game/movement.go b/go/game/movement.go index f13acc96..c7a5d9ff 100644 --- a/go/game/movement.go +++ b/go/game/movement.go @@ -33,7 +33,7 @@ func parseMovement(desc any) Movement { log.Panicf("Invalid movement description %s", movementStr) } - swimming := len(tokens) > 1 && tokens[1] == "swimming" + swimming := len(tokens) > 1 && tokens[1] == "swimming" return Movement{r, swimming} } diff --git a/go/ui/choice.go b/go/ui/choice.go index a9027086..9de5fd45 100644 --- a/go/ui/choice.go +++ b/go/ui/choice.go @@ -98,12 +98,12 @@ func NewNumberChoice(x, y int, startValue int, onSubmit func(*NumberChoice)) *Nu if onSubmit != nil { nc.buttons[2] = NewSimpleButton( - x+2*NUMBER_CHOICE_BUTTON_WIDTH+NUMBER_CHOICE_INPUT_WIDTH, y, - NUMBER_CHOICE_SUBMIT_WIDTH, NUMBER_CHOICE_HEIGHT, - "submit", - func(*SimpleButton) { onSubmit(nc) }) -} - nc.EventHandlersMap["click"] = func (x, y int) { + x+2*NUMBER_CHOICE_BUTTON_WIDTH+NUMBER_CHOICE_INPUT_WIDTH, y, + NUMBER_CHOICE_SUBMIT_WIDTH, NUMBER_CHOICE_HEIGHT, + "submit", + func(*SimpleButton) { onSubmit(nc) }) + } + nc.EventHandlersMap["click"] = func(x, y int) { for _, b := range nc.buttons { if b.Contains(x, y) { b.Click(x, y) |
