Changed the behaviour of DisplayManager to match previous commit and fixed tests and bootstrap accordingly
This commit is contained in:
@ -5,6 +5,7 @@ from dungeonbattle.display.menudisplay import MenuDisplay, MainMenuDisplay
|
||||
from dungeonbattle.display.texturepack import TexturePack
|
||||
from typing import Any
|
||||
from dungeonbattle.game import Game, GameMode
|
||||
from dungeonbattle.enums import DisplayAction
|
||||
|
||||
|
||||
class DisplayManager:
|
||||
@ -23,6 +24,12 @@ class DisplayManager:
|
||||
self.update_game_components()
|
||||
self.settingsmenudisplay.update_menu(self.game.settings_menu)
|
||||
|
||||
def handle_display_action(self, action:DisplayAction) -> None:
|
||||
if action == DisplayAction.REFRESH:
|
||||
self.refresh()
|
||||
elif action == DisplayAction.UPDATE:
|
||||
self.update_game_components()
|
||||
|
||||
def update_game_components(self) -> None:
|
||||
for d in self.displays:
|
||||
d.pack = TexturePack.get_pack(self.game.settings.TEXTURE_PACK)
|
||||
|
Reference in New Issue
Block a user