aboutsummaryrefslogtreecommitdiff
path: root/client/state.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-01-15 16:08:31 +0100
committerJulien Dessaux2021-01-15 16:08:31 +0100
commit3d1d8ba0a772c3c038f072095d87d0b46bd1efb2 (patch)
tree4b51303ee3a4e0c094cc3b9ab3aefc1846d85559 /client/state.go
parentHave the configuration loadFile function return a pointer (diff)
downloadshell-game-launcher-3d1d8ba0a772c3c038f072095d87d0b46bd1efb2.tar.gz
shell-game-launcher-3d1d8ba0a772c3c038f072095d87d0b46bd1efb2.tar.bz2
shell-game-launcher-3d1d8ba0a772c3c038f072095d87d0b46bd1efb2.zip
Added generation of the menu display
Diffstat (limited to '')
-rw-r--r--client/state.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/client/state.go b/client/state.go
new file mode 100644
index 0000000..9565efc
--- /dev/null
+++ b/client/state.go
@@ -0,0 +1,23 @@
+package client
+
+import (
+ "shell-game-launcher/config"
+)
+
+type State struct {
+ config *config.Config
+ currentMenu string
+ login string
+}
+
+func NewState(config *config.Config, login string) *State {
+ cs := State{
+ config: config,
+ currentMenu: "anonymous",
+ login: login,
+ }
+ if login != "" {
+ cs.currentMenu = "logged_in"
+ }
+ return &cs
+}