2024-05-31 12:10:00 +01:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
|
|
|
import roulette
|
|
|
|
|
|
|
|
Item {
|
2024-06-02 21:13:43 +01:00
|
|
|
anchors {
|
|
|
|
left: parent.left
|
|
|
|
leftMargin: 10
|
|
|
|
}
|
|
|
|
|
2024-06-01 14:46:10 +01:00
|
|
|
Text {
|
|
|
|
id: croupier
|
|
|
|
text: "Croupier"
|
|
|
|
}
|
|
|
|
|
2024-05-31 12:10:00 +01:00
|
|
|
ColumnLayout {
|
2024-06-01 14:46:10 +01:00
|
|
|
anchors {
|
|
|
|
top: croupier.bottom
|
|
|
|
topMargin: 20
|
2024-05-31 12:10:00 +01:00
|
|
|
}
|
2024-06-01 14:46:10 +01:00
|
|
|
|
|
|
|
spacing: 60
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: 7
|
|
|
|
|
|
|
|
Item {
|
|
|
|
Text {
|
|
|
|
id: label
|
|
|
|
text: "Player " + (index + 1)
|
|
|
|
}
|
|
|
|
|
2024-06-02 21:13:43 +01:00
|
|
|
Rectangle {
|
|
|
|
id: indicator
|
|
|
|
color: "red"
|
|
|
|
height: 10
|
|
|
|
width: 10
|
|
|
|
visible: PlayerAreaModel.focusedPlayer == index
|
|
|
|
opacity: 0.5
|
|
|
|
|
|
|
|
anchors {
|
|
|
|
verticalCenter: inputField.verticalCenter
|
|
|
|
right: inputField.left
|
|
|
|
rightMargin: 5
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-01 14:46:10 +01:00
|
|
|
TextField {
|
2024-06-02 21:13:43 +01:00
|
|
|
id: inputField
|
2024-06-01 14:46:10 +01:00
|
|
|
anchors.top: label.bottom
|
|
|
|
anchors.topMargin: 6
|
|
|
|
|
|
|
|
onTextEdited: PlayerAreaModel.setPlayerName(text, index)
|
2024-06-02 21:13:43 +01:00
|
|
|
onActiveFocusChanged: {
|
|
|
|
if (activeFocus && (focusReason == 0 || focusReason == 1 || focusReason == 2)) {
|
|
|
|
PlayerAreaModel.focusedPlayer = index
|
|
|
|
}
|
|
|
|
}
|
2024-06-01 14:46:10 +01:00
|
|
|
}
|
|
|
|
}
|
2024-05-31 12:10:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|