31 lines
642 B
QML
31 lines
642 B
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import Solitare
|
|
|
|
Rectangle {
|
|
id: winOverlay
|
|
color: "black"
|
|
opacity: 0.8
|
|
visible: GameState.gameWon === true
|
|
anchors.fill: parent
|
|
|
|
Text {
|
|
id: winText
|
|
|
|
text: "YOU WON!"
|
|
font.pixelSize: 50
|
|
color: "white"
|
|
font.bold: true
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
Button {
|
|
text: "Restart"
|
|
onClicked: GameState.dealCards()
|
|
anchors.top: winText.bottom
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
}
|
|
}
|