diff --git a/dungeonbattle/display/display_manager.py b/dungeonbattle/display/display_manager.py index 5c249c8..ea5c8ca 100644 --- a/dungeonbattle/display/display_manager.py +++ b/dungeonbattle/display/display_manager.py @@ -1,7 +1,7 @@ import curses from dungeonbattle.display.mapdisplay import MapDisplay from dungeonbattle.display.statsdisplay import StatsDisplay -from dungeonbattle.display.menudisplay import MainMenuDisplay +from dungeonbattle.display.menudisplay import MenuDisplay, MainMenuDisplay from dungeonbattle.display.texturepack import TexturePack from typing import Any from dungeonbattle.game import Game, GameMode @@ -17,9 +17,11 @@ class DisplayManager: self.statsdisplay = StatsDisplay(screen, pack) self.mainmenudisplay = MainMenuDisplay(self.game.main_menu, screen, pack) + self.settingsmenudisplay = MenuDisplay(screen, pack) self.displays = [self.statsdisplay, self.mapdisplay, - self.mainmenudisplay] + self.mainmenudisplay, self.settingsmenudisplay] self.update_game_components() + self.settingsmenudisplay.update_menu(self.game.settings_menu) def update_game_components(self) -> None: for d in self.displays: @@ -34,6 +36,8 @@ class DisplayManager: self.rows // 5, self.cols) if self.game.state == GameMode.MAINMENU: self.mainmenudisplay.refresh(0, 0, self.rows, self.cols) + if self.game.state == GameMode.SETTINGS: + self.settingsmenudisplay.refresh(0, 0, self.rows, self.cols-1) self.resize_window() def resize_window(self) -> bool: diff --git a/dungeonbattle/display/menudisplay.py b/dungeonbattle/display/menudisplay.py index aeed447..9dd416d 100644 --- a/dungeonbattle/display/menudisplay.py +++ b/dungeonbattle/display/menudisplay.py @@ -22,7 +22,7 @@ class MenuDisplay(Display): def update_pad(self) -> None: for i in range(self.trueheight): - self.pad.addstr(i, 0, " ") + self.pad.addstr(i, 0, " " + self.values[i]) # set a marker on the selected line self.pad.addstr(self.menu.position, 0, ">")