aboutsummaryrefslogtreecommitdiff
path: root/go/activities
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-20 14:44:06 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:57:42 +0200
commita059fa9bb1ace39cf5fdcfd489a90f5d778c9344 (patch)
tree8907fbb2246c829d85d995694c35b229761ad5b8 /go/activities
parenta702781e58fc6db55aca6b61b1eb556bfca481b2 (diff)
downloadmuhqs-game-a059fa9bb1ace39cf5fdcfd489a90f5d778c9344.tar.gz
muhqs-game-a059fa9bb1ace39cf5fdcfd489a90f5d778c9344.zip
add game and settings menus
Diffstat (limited to 'go/activities')
-rw-r--r--go/activities/buttonList.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/go/activities/buttonList.go b/go/activities/buttonList.go
index 55e5d0de..f3ea9f23 100644
--- a/go/activities/buttonList.go
+++ b/go/activities/buttonList.go
@@ -14,12 +14,13 @@ type ButtonList struct {
}
const (
- BUTTON_LIST_BUTTON_WIDTH = 250
+ // TODO: determine required with for the displayed labels
+ BUTTON_LIST_BUTTON_WIDTH = 450
BUTTON_LIST_BUTTON_HEIGHT = 75
BUTTON_LIST_BUTTON_PADDING = 40
)
-func NewButtonList(width, height int, labels []string, handlers []func()) *ButtonList {
+func NewButtonList(width, height int, labels []string, handlers []func(*ui.SimpleButton)) *ButtonList {
bl := &ButtonList{ui.Collection{Width: width, Height: height}}
if len(labels) != len(handlers) {
@@ -35,7 +36,7 @@ func NewButtonList(width, height int, labels []string, handlers []func()) *Butto
BUTTON_LIST_BUTTON_WIDTH,
BUTTON_LIST_BUTTON_HEIGHT,
labels[i],
- func(*ui.SimpleButton) { handler() },
+ handler,
)
bl.AddWidget(btn)