aboutsummaryrefslogtreecommitdiff
path: root/config/menu.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-01-18 11:58:16 +0100
committerJulien Dessaux2021-01-18 11:58:16 +0100
commit9abea6a4ef590e55efca82570e41754d76a72cc8 (patch)
treece54788b8e94bd833dc37e25338a2a86baf49555 /config/menu.go
parentRemoved extra \n after clear screen sequence (diff)
downloadshell-game-launcher-9abea6a4ef590e55efca82570e41754d76a72cc8.tar.gz
shell-game-launcher-9abea6a4ef590e55efca82570e41754d76a72cc8.tar.bz2
shell-game-launcher-9abea6a4ef590e55efca82570e41754d76a72cc8.zip
Removed needlessly complex menu display offset settings
Diffstat (limited to '')
-rw-r--r--config/menu.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/config/menu.go b/config/menu.go
index a8ea7b0..7321c7b 100644
--- a/config/menu.go
+++ b/config/menu.go
@@ -14,10 +14,6 @@ var reValidKey = regexp.MustCompile(`^\w$`)
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"`
}
@@ -38,14 +34,6 @@ func (m *Menu) validate(name string) error {
return errors.New("Invalid menu name, must be an alphanumeric word and match regex `^[\\w\\._]+$` : " + name)
}
// Banner is just any string, nothing to validate
- // XOffset
- if m.XOffset < 0 {
- return errors.New("XOffset must be a positive integer")
- }
- // YOffset
- if m.YOffset < 0 {
- return errors.New("YOffset must be a positive integer")
- }
// MenuEntries
if len(m.MenuEntries) == 0 {
return errors.New("A Menu needs MenuEntries to be valid")