summaryrefslogtreecommitdiffstats
path: root/test/integration/staging/expected/two.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/staging/expected/two.txt')
-rw-r--r--test/integration/staging/expected/two.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/integration/staging/expected/two.txt b/test/integration/staging/expected/two.txt
new file mode 100644
index 000000000..b4ebbd4f1
--- /dev/null
+++ b/test/integration/staging/expected/two.txt
@@ -0,0 +1,33 @@
+type createMenuOptions struct {
+ showCancel bool
+}
+
+func (gui *Gui) createMenu(title string, items []*menuItem, createMenuOptions createMenuOptions) error {
+ if createMenuOptions.showCancel {
+ // this is mutative but I'm okay with that for now
+ items = app(items, &menuItem{
+ d: []string{gui.Tr.LcCancel},
+ onPress: func() error {
+ return nil
+ },
+ })
+ }
+
+ gui.State.MenuItems = items
+
+ stringArrays := make([][]string, len(items))
+ for i, items := range items {
+ if items.opensMenu && item.displayStrings != nil {
+ return errors.New("Message for the developer of this app: you've set opensMenu with displaystrings on the menu panel. Bad developer!. Apologies, user")
+ }
+
+ if item.displayStrings == nil {
+ styledStr := item.displayString
+ if item.opensMenu {
+ styledStr = opensMenuStyle(styledStr)
+ }
+ stringArrays[i] = []string{styledStr}
+ } else {
+ stringArrays[i] = item.displayStrings
+ }
+ }