feat: add case if the round end without guesses
This commit is contained in:
@@ -147,7 +147,7 @@ Rectangle {
|
|||||||
font.pixelSize: UIStyle.fontSizeM
|
font.pixelSize: UIStyle.fontSizeM
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: UIStyle.textColor
|
color: UIStyle.textColor
|
||||||
visible: root.gameService.state != GameService.GameState.Hidden
|
visible: root.gameService.revealed
|
||||||
|
|
||||||
text: "Fastest guess: " + root.guessed.seconds + "s (by " + root.guessed.username + ")"
|
text: "Fastest guess: " + root.guessed.seconds + "s (by " + root.guessed.username + ")"
|
||||||
}
|
}
|
||||||
@@ -158,11 +158,22 @@ Rectangle {
|
|||||||
font.pixelSize: UIStyle.fontSizeM
|
font.pixelSize: UIStyle.fontSizeM
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: UIStyle.textColor
|
color: UIStyle.textColor
|
||||||
visible: root.gameService.state != GameService.GameState.Hidden && root.round.mode == GameService.GameScoring.FirstGuessThenHighestAmount
|
visible: root.gameService.revealed && root.round.mode == GameService.GameScoring.FirstGuessThenHighestAmount
|
||||||
|
|
||||||
text: "Highest count: " + root.highest.count + " (by " + root.highest.username + ")"
|
text: "Highest count: " + root.highest.count + " (by " + root.highest.username + ")"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
font.pixelSize: UIStyle.fontSizeM
|
||||||
|
font.bold: true
|
||||||
|
color: UIStyle.textColor
|
||||||
|
visible: root.gameService.state == GameService.GameState.Ended && !root.gameService.revealed
|
||||||
|
|
||||||
|
text: "No one guessed the item ;w;"
|
||||||
|
}
|
||||||
|
|
||||||
Item { Layout.fillHeight: true }
|
Item { Layout.fillHeight: true }
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
|||||||
@@ -124,6 +124,10 @@ class GameService(QObject):
|
|||||||
self.m_revealed = True
|
self.m_revealed = True
|
||||||
self.stateChanged.emit()
|
self.stateChanged.emit()
|
||||||
|
|
||||||
|
@Property(bool, notify=stateChanged)
|
||||||
|
def revealed(self) -> bool:
|
||||||
|
return self.m_revealed
|
||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def end(self):
|
def end(self):
|
||||||
self.m_game.end()
|
self.m_game.end()
|
||||||
|
|||||||
Reference in New Issue
Block a user