diff --git a/qml/FoundationPiles.qml b/qml/FoundationPiles.qml index ffd41c6..3f12b1c 100644 --- a/qml/FoundationPiles.qml +++ b/qml/FoundationPiles.qml @@ -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 - isFaceDown: false + 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 + } + } } } }