Fixed typos

This commit is contained in:
nicomarg 2020-11-12 00:12:30 +01:00
parent 92ab9ae075
commit 61d66ac220
1 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ from dungeonbattle.display.menudisplay import MenuDisplay, MainMenuDisplay
from dungeonbattle.display.texturepack import TexturePack from dungeonbattle.display.texturepack import TexturePack
from typing import Any from typing import Any
from dungeonbattle.game import Game, GameMode from dungeonbattle.game import Game, GameMode
from dungeonbattle.enums import DisplayAction from dungeonbattle.enums import DisplayActions
class DisplayManager: class DisplayManager:
@ -22,12 +22,11 @@ class DisplayManager:
self.displays = [self.statsdisplay, self.mapdisplay, self.displays = [self.statsdisplay, self.mapdisplay,
self.mainmenudisplay, self.settingsmenudisplay] self.mainmenudisplay, self.settingsmenudisplay]
self.update_game_components() self.update_game_components()
self.settingsmenudisplay.update_menu(self.game.settings_menu)
def handle_display_action(self, action:DisplayAction) -> None: def handle_display_action(self, action:DisplayActions) -> None:
if action == DisplayAction.REFRESH: if action == DisplayActions.REFRESH:
self.refresh() self.refresh()
elif action == DisplayAction.UPDATE: elif action == DisplayActions.UPDATE:
self.update_game_components() self.update_game_components()
def update_game_components(self) -> None: def update_game_components(self) -> None:
@ -35,6 +34,7 @@ class DisplayManager:
d.pack = TexturePack.get_pack(self.game.settings.TEXTURE_PACK) d.pack = TexturePack.get_pack(self.game.settings.TEXTURE_PACK)
self.mapdisplay.update_map(self.game.map) self.mapdisplay.update_map(self.game.map)
self.statsdisplay.update_player(self.game.player) self.statsdisplay.update_player(self.game.player)
self.settingsmenudisplay.update_menu(self.game.settings_menu)
def refresh(self) -> None: def refresh(self) -> None:
if self.game.state == GameMode.PLAY: if self.game.state == GameMode.PLAY: