From a059fa9bb1ace39cf5fdcfd489a90f5d778c9344 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 20 Aug 2025 14:44:06 +0200 Subject: add game and settings menus --- go/activities/buttonList.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'go/activities') 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) -- cgit v1.2.3