diff options
author | Julien Dessaux | 2020-12-23 12:01:05 +0100 |
---|---|---|
committer | Julien Dessaux | 2020-12-23 12:01:05 +0100 |
commit | 484734ab36b06a9e6d35348e357312d99522302c (patch) | |
tree | cb8e57bd56316b1a111ab7a3f13444344deeca2f /config/menu.go | |
parent | Initial import (diff) | |
download | shell-game-launcher-484734ab36b06a9e6d35348e357312d99522302c.tar.gz shell-game-launcher-484734ab36b06a9e6d35348e357312d99522302c.tar.bz2 shell-game-launcher-484734ab36b06a9e6d35348e357312d99522302c.zip |
Implemented the configuration file format
Diffstat (limited to '')
-rw-r--r-- | config/menu.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/config/menu.go b/config/menu.go new file mode 100644 index 0000000..2913be2 --- /dev/null +++ b/config/menu.go @@ -0,0 +1,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"` +} |