diff options
Diffstat (limited to 'pkg/gui/menu_panel.go')
-rw-r--r-- | pkg/gui/menu_panel.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/gui/menu_panel.go b/pkg/gui/menu_panel.go index 94a889506..8f368ce92 100644 --- a/pkg/gui/menu_panel.go +++ b/pkg/gui/menu_panel.go @@ -9,6 +9,7 @@ import ( ) type menuItem struct { + displayString string displayStrings []string onPress func() error } @@ -62,7 +63,11 @@ func (gui *Gui) createMenuNew(title string, items []*menuItem, createMenuOptions stringArrays := make([][]string, len(items)) for i, item := range items { - stringArrays[i] = item.displayStrings + if item.displayStrings == nil { + stringArrays[i] = []string{item.displayString} + } else { + stringArrays[i] = item.displayStrings + } } list := utils.RenderDisplayStrings(stringArrays) |