diff --git a/squirrelbattle/display/display_manager.py b/squirrelbattle/display/display_manager.py index 20cdb3c..0e9cf04 100644 --- a/squirrelbattle/display/display_manager.py +++ b/squirrelbattle/display/display_manager.py @@ -53,7 +53,8 @@ class DisplayManager: self.messagedisplay.update_message(self.game.message) def refresh(self) -> None: - if self.game.state == GameMode.PLAY: + if self.game.state == GameMode.PLAY \ + or self.game.state == GameMode.INVENTORY: # The map pad has already the good size self.mapdisplay.refresh(0, 0, self.rows * 4 // 5, self.mapdisplay.pack.tile_width @@ -66,8 +67,11 @@ class DisplayManager: self.rows // 5 - 1, self.cols * 4 // 5) self.hbar.refresh(self.rows * 4 // 5, 0, 1, self.cols * 4 // 5) self.vbar.refresh(0, self.cols * 4 // 5, self.rows, 1) - elif self.game.state == GameMode.INVENTORY: - self.inventorydisplay.refresh(0, 0, self.rows, self.cols) + if self.game.state == GameMode.INVENTORY: + self.inventorydisplay.refresh(self.rows // 10, + self.cols // 2, + 8 * self.rows // 10, + 2 * self.cols // 5) elif self.game.state == GameMode.MAINMENU: self.mainmenudisplay.refresh(0, 0, self.rows, self.cols) elif self.game.state == GameMode.SETTINGS: