Forgot to stage Results.qml file.

Also added thousands separators to numebrs where appropriate.
This commit is contained in:
greek 2024-06-08 12:27:23 +01:00
parent 6e770239c8
commit 256d3740f9
2 changed files with 43 additions and 4 deletions

View file

@ -179,17 +179,17 @@ Item {
currentBet1.betType = b currentBet1.betType = b
currentBet1.n = n currentBet1.n = n
if (b < 7) { if (b < 7) {
currentBet1.text = betTypes[b] + ": " + bet + "g" currentBet1.text = betTypes[b] + ": " + bet.toLocaleString(Qt.locale(), 'f', 0) + "g"
} else { } else {
currentBet1.text = betTypes[b] + " " + (n + 1) + ": " + bet + "g" currentBet1.text = betTypes[b] + " " + (n + 1) + ": " + bet.toLocaleString(Qt.locale(), 'f', 0) + "g"
} }
} else { } else {
currentBet2.betType = b currentBet2.betType = b
currentBet2.n = n currentBet2.n = n
if (b < 7) { if (b < 7) {
currentBet2.text = betTypes[b] + ": " + bet + "g" currentBet2.text = betTypes[b] + ": " + bet.toLocaleString(Qt.locale(), 'f', 0) + "g"
} else { } else {
currentBet2.text = betTypes[b] + " " + (n + 1) + ": " + bet + "g" currentBet2.text = betTypes[b] + " " + (n + 1) + ": " + bet.toLocaleString(Qt.locale(), 'f', 0) + "g"
} }
} }
} }

39
Results.qml Normal file
View file

@ -0,0 +1,39 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import roulette
GridLayout {
rowSpacing: 20
columnSpacing: 50
flow: GridLayout.TopToBottom
rows: 3
anchors {
/* These random IDs com from Results' parent*/
left: payoutButton.right
leftMargin: 30
top: roulette.bottom
topMargin: 20
}
Repeater {
model: 7
Text {
text: ""
Connections {
target: PlayerAreaModel
function onResults(name, n, payout) {
if (index + 1 == n && name != "") {
text = name + ": " + payout.toLocaleString(Qt.locale(), 'f', 0) + "g"
}
}
}
}
}
}