show is_over in warsTree & fator resources paths
This commit is contained in:
parent
a9cd4c9e27
commit
d869017646
28 changed files with 783 additions and 628 deletions
|
|
@ -2,7 +2,7 @@ from typing import List, TYPE_CHECKING
|
|||
|
||||
from PyQt6.QtWidgets import QDialog, QMessageBox
|
||||
|
||||
from warchron.constants import ItemType, RefreshScope
|
||||
from warchron.constants import ItemType, RefreshScope, Icons, IconName
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from warchron.controller.app_controller import AppController
|
||||
|
|
@ -59,9 +59,9 @@ class RoundController:
|
|||
battle = self.app.model.create_battle(
|
||||
round_id=rnd.id, sector_id=sect.id
|
||||
)
|
||||
state_icon = ".\\src\\warchron\\view\\ui\\../resources/hourglass.png"
|
||||
state_icon = Icons.get(IconName.ONGOING)
|
||||
if battle.is_finished():
|
||||
state_icon = ".\\src\\warchron\\view\\ui\\../resources/tick.png"
|
||||
state_icon = Icons.get(IconName.DONE)
|
||||
if battle.player_1_id:
|
||||
camp_part = camp.participants[battle.player_1_id]
|
||||
player_1_name = self.app.model.get_participant_name(
|
||||
|
|
@ -86,13 +86,13 @@ class RoundController:
|
|||
p1_icon = None
|
||||
p2_icon = None
|
||||
if battle.is_draw():
|
||||
p1_icon = ".\\src\\warchron\\view\\ui\\../resources/balance.png"
|
||||
p2_icon = ".\\src\\warchron\\view\\ui\\../resources/balance.png"
|
||||
p1_icon = Icons.get(IconName.DRAW)
|
||||
p2_icon = Icons.get(IconName.DRAW)
|
||||
elif battle.winner_id:
|
||||
if battle.winner_id == battle.player_1_id:
|
||||
p1_icon = ".\\src\\warchron\\view\\ui\\../resources/trophy.png"
|
||||
p1_icon = Icons.get(IconName.WIN)
|
||||
elif battle.winner_id == battle.player_2_id:
|
||||
p2_icon = ".\\src\\warchron\\view\\ui\\../resources/trophy.png"
|
||||
p2_icon = Icons.get(IconName.WIN)
|
||||
battles_for_display.append(
|
||||
BattleDTO(
|
||||
id=battle.sector_id,
|
||||
|
|
@ -141,6 +141,7 @@ class RoundController:
|
|||
return
|
||||
self.app.is_dirty = True
|
||||
self.app.navigation.refresh(RefreshScope.CURRENT_SELECTION_DETAILS)
|
||||
self.app.navigation.refresh(RefreshScope.WARS_TREE)
|
||||
|
||||
# Choice methods
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue