Implements #1331 by changing the Pass Turn button text on Turn 0. (#1333)

This commit is contained in:
bgreman
2021-06-24 10:59:12 -04:00
committed by GitHub
parent a50a6fa917
commit 26743154d8
2 changed files with 7 additions and 1 deletions

View File

@@ -46,7 +46,10 @@ class QTopPanel(QFrame):
self.conditionsWidget = QConditionsWidget()
self.budgetBox = QBudgetBox(self.game)
self.passTurnButton = QPushButton("Pass Turn")
pass_turn_text = "Pass Turn"
if not self.game or self.game.turn == 0:
pass_turn_text = "Begin Campaign"
self.passTurnButton = QPushButton(pass_turn_text)
self.passTurnButton.setIcon(CONST.ICONS["PassTurn"])
self.passTurnButton.setProperty("style", "btn-primary")
self.passTurnButton.clicked.connect(self.passTurn)
@@ -114,6 +117,8 @@ class QTopPanel(QFrame):
self.factionsInfos.setGame(game)
self.passTurnButton.setEnabled(True)
if game and game.turn > 0:
self.passTurnButton.setText("Pass Turn")
if game and game.turn == 0:
self.proceedButton.setEnabled(False)