tie dialog title with context details
This commit is contained in:
parent
aa75a5b84f
commit
9e602e8ca4
8 changed files with 109 additions and 46 deletions
|
|
@ -34,7 +34,7 @@ class TieDialog(QDialog):
|
|||
self.ui: Ui_tieDialog = Ui_tieDialog()
|
||||
self.ui.setupUi(self) # type: ignore
|
||||
self.setWindowIcon(Icons.get(IconName.WARCHRONICO))
|
||||
self.ui.tieContext.setText(self._get_context_title(context_type, context_name))
|
||||
self.ui.tieContext.setText(context_name)
|
||||
grid = self.ui.playersGridLayout
|
||||
icon_path = (RESOURCES_DIR / Icons._paths[IconName.TOKENS]).as_posix()
|
||||
token_html = (
|
||||
|
|
@ -71,17 +71,3 @@ class TieDialog(QDialog):
|
|||
|
||||
def get_bids(self) -> Dict[str, bool]:
|
||||
return {pid: checkbox.isChecked() for pid, checkbox in self._checkboxes.items()}
|
||||
|
||||
@staticmethod
|
||||
def _get_context_title(
|
||||
context_type: ContextType, context_name: str | None = None
|
||||
) -> str:
|
||||
if context_name:
|
||||
return f"{context_name} tie"
|
||||
titles = {
|
||||
ContextType.BATTLE: "Battle tie",
|
||||
ContextType.CAMPAIGN: "Campaign tie",
|
||||
ContextType.WAR: "War tie",
|
||||
ContextType.CHOICE: "Choice tie",
|
||||
}
|
||||
return titles.get(context_type, "Tie")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue