111 lines
2.4 KiB
QML
Raw Normal View History

2018-11-14 23:15:36 +03:00
import QtQuick 2.9
import QtQuick.Controls.Material 2.0
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
Item {
id: item1
2018-11-25 18:10:08 +03:00
property alias level: level
2019-07-29 11:45:04 +03:00
property var model: null
2018-11-14 23:15:36 +03:00
visible: true
2018-11-25 18:10:08 +03:00
z: 1
2019-07-29 11:45:04 +03:00
signal playGame();
2018-11-14 23:15:36 +03:00
2018-11-16 02:08:35 +03:00
2018-11-14 23:15:36 +03:00
ColumnLayout {
id: columnLayout
width: 642
anchors.topMargin: 0
transformOrigin: Item.Center
spacing: -100
anchors.fill: parent
Button {
id: play
text: qsTr("Play game")
2018-11-25 18:10:08 +03:00
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
2018-11-14 23:15:36 +03:00
font.pixelSize: 20
spacing: 4
focusPolicy: Qt.StrongFocus
display: AbstractButton.TextBesideIcon
2018-12-01 21:06:40 +03:00
Layout.preferredHeight: item1.height / 5
Layout.preferredWidth: item1.height * 0.8
2018-11-16 02:08:35 +03:00
onClicked: {
2019-07-29 11:45:04 +03:00
playGame();
if (model)
model.newGame();
2018-11-16 02:08:35 +03:00
}
2018-11-14 23:15:36 +03:00
}
Button {
id: level
2018-12-06 22:49:35 +03:00
text: qsTr("My Status")
2018-11-25 18:10:08 +03:00
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
2018-11-14 23:15:36 +03:00
font.pixelSize: 20
2018-12-01 21:06:40 +03:00
Layout.preferredHeight: item1.height / 5
Layout.preferredWidth: item1.height * 0.8
2018-11-14 23:15:36 +03:00
spacing: 2
2018-12-06 22:49:35 +03:00
onClicked: {
userView._show();
2018-12-06 22:49:35 +03:00
}
2018-11-14 23:15:36 +03:00
}
Button {
id: exit
text: qsTr("Exit")
2018-11-25 18:10:08 +03:00
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
2018-11-14 23:15:36 +03:00
font.pixelSize: 20
2018-12-01 21:06:40 +03:00
Layout.preferredHeight: item1.height / 5
Layout.preferredWidth: item1.height * 0.8
2018-11-14 23:15:36 +03:00
onClicked: {
Qt.quit();
}
}
2018-11-16 02:08:35 +03:00
2018-11-14 23:15:36 +03:00
}
RoundButton {
id: roundButton
x: 569
y: 20
2018-11-25 18:10:08 +03:00
height: 48
clip: false
2018-11-14 23:15:36 +03:00
anchors.right: parent.right
anchors.rightMargin: 23
anchors.top: parent.top
anchors.topMargin: 20
2018-12-06 22:49:35 +03:00
onClicked: {
about._show();
}
2018-11-14 23:15:36 +03:00
}
2018-12-06 22:49:35 +03:00
PagePopUp {
id: about;
width: parent.width / 2
height: parent.height / 2;
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
source: "About.qml"
}
PagePopUp {
id: userView;
width: parent.width / 2
height: parent.height / 2;
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
2018-12-06 22:49:35 +03:00
source: "UserView.qml"
}
2018-12-06 22:49:35 +03:00
2018-11-14 23:15:36 +03:00
}