solitare/qml/WinOverlay.qml

36 lines
721 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
2024-12-12 19:02:12 +00:00
signal restart
2024-12-09 20:02:43 +00:00
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"
2024-12-12 19:02:12 +00:00
onClicked: {
GameState.dealCards();
winOverlay.restart();
}
2024-12-09 20:02:43 +00:00
anchors.top: winText.bottom
anchors.horizontalCenter: parent.horizontalCenter
}
}