blob: 2913be2be89fa1a06c31f2ce2ab42da9e72769b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package config
// Menu struct describes a screen menu
type Menu struct {
// Banner is the banner to display before the menu
Banner string `yaml:"Banner"`
// XOffset is the X offset between the banner and the menu
XOffset int `yaml:"XOffset"`
// YOffset is the Y offset between the banner and the menu
YOffset int `yaml:"YOffset"`
// Commands is the list of commands in the menu
MenuEntries []MenuEntry `yaml:"MenuEntries"`
}
// MenuEntry struct describes a menu entry
type MenuEntry struct {
// Key is the key associated with the action. We need to store it as a string because of how yaml unmarshal works
Key string `yaml:"Key"`
// Label is the text displayed on the menu
Label string `yaml:"Label"`
// Action is the action executed when the menu entry is selected
Action string `yaml:"Action"`
}
|