diff options
| author | troido <troido@protonmail.com> | 2018-09-06 18:51:15 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2018-09-06 18:51:15 +0200 |
| commit | 5bd11fd1914ea6744852b78047b207e521a304f1 (patch) | |
| tree | d60947313eb14470be2e91b1f4975ab933059278 /asciifarm/client/display/display.py | |
| parent | 6c3ff03ab92c2d4493355fdbb31a7ababbba97f4 (diff) | |
made menus switchable so not all menus need to be in view all the time
Diffstat (limited to 'asciifarm/client/display/display.py')
| -rw-r--r-- | asciifarm/client/display/display.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/asciifarm/client/display/display.py b/asciifarm/client/display/display.py index e681945..1d5f542 100644 --- a/asciifarm/client/display/display.py +++ b/asciifarm/client/display/display.py @@ -8,6 +8,7 @@ from .inventory import Inventory from .screen import Screen from .colours import Colours from .messages import Messages +from .switcher import Switcher from .textinput import TextInput from .widget import Widget @@ -47,7 +48,8 @@ class Display: self.characters[name + '-' + ALPHABET[i]] = (charMap["alphabet"][i], fg, bg) self.defaultChar = parseSprite(charMap.get("default", "?")) - self.screen = Screen(self, stdscr, self.colours) + screen = Screen(self, stdscr, self.colours) + self.screen = screen self.widgets = {} @@ -64,6 +66,10 @@ class Display: self.addWidget(Messages(), "msg") self.addWidget(TextInput(), "textinput") + + switcher = Switcher([self.widgets["ground"], self.widgets["inventory"]], 1) + self.addWidget(switcher, "switch") + self.forced = False self.update() |
