solitare/qml/WinOverlay.qml

31 lines
642 B
QML
Raw Normal View History

2024-12-09 20:02:43 +00:00
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
}
}