From 3d1d8ba0a772c3c038f072095d87d0b46bd1efb2 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 15 Jan 2021 16:08:31 +0100 Subject: Added generation of the menu display --- client/state.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 client/state.go (limited to 'client/state.go') 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 +} -- cgit v1.2.3