Improve foundation pile design when empty
This commit is contained in:
parent
042720d10b
commit
70be6491a3
|
@ -7,11 +7,44 @@ Row {
|
|||
Repeater {
|
||||
model: 4 // Each of the 4 suits
|
||||
|
||||
CardModel {
|
||||
Item {
|
||||
id: foundationPile
|
||||
width: foundationCard.width
|
||||
height: foundationCard.height
|
||||
|
||||
required property int index // passed from repeater
|
||||
|
||||
card: GameState.foundation[index].length > 0 ? GameState.foundation[index][0] : null
|
||||
CardModel {
|
||||
id: foundationCard
|
||||
|
||||
anchors.fill: parent
|
||||
visible: GameState.foundation[parent.index].length > 0
|
||||
|
||||
card: GameState.foundation[parent.index].length > 0 ? GameState.foundation[parent.index][0] : null
|
||||
isFaceDown: false
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: emptyPileRect
|
||||
|
||||
anchors.fill: parent
|
||||
visible: GameState.foundation[parent.index].length === 0
|
||||
|
||||
color: "gray"
|
||||
border.color: "white"
|
||||
border.width: 3
|
||||
opacity: 0.4
|
||||
radius: 10
|
||||
|
||||
Text {
|
||||
text: "A"
|
||||
color: "white"
|
||||
font.pixelSize: 40
|
||||
font.bold: true
|
||||
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue