|
|
@ -7,13 +7,31 @@ import "2048.js" as MyScript
|
|
|
|
|
|
|
|
|
|
|
|
ApplicationWindow {
|
|
|
|
ApplicationWindow {
|
|
|
|
visible: true
|
|
|
|
visible: true
|
|
|
|
width: 560
|
|
|
|
width: 550
|
|
|
|
height: 730
|
|
|
|
height: 740
|
|
|
|
title: qsTr("2048 Game");
|
|
|
|
title: qsTr("2048 Game");
|
|
|
|
|
|
|
|
flags: Qt.Window | Qt.MSWindowsFixedSizeDialogHint
|
|
|
|
|
|
|
|
|
|
|
|
x: (Screen.width - width) / 2
|
|
|
|
x: (Screen.width - width) / 2
|
|
|
|
y: (Screen.height - height) / 2
|
|
|
|
y: (Screen.height - height) / 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
menuBar: MenuBar {
|
|
|
|
|
|
|
|
Menu {
|
|
|
|
|
|
|
|
title: qsTr("File")
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
|
|
|
|
text: qsTr("New Game")
|
|
|
|
|
|
|
|
shortcut: "Ctrl+N"
|
|
|
|
|
|
|
|
onTriggered: MyScript.startupFunction();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
|
|
|
|
text: qsTr("Exit")
|
|
|
|
|
|
|
|
shortcut: "Ctrl+Q"
|
|
|
|
|
|
|
|
onTriggered: Qt.quit();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
Item {
|
|
|
|
id: helper
|
|
|
|
id: helper
|
|
|
|
property var myColors: {"bglight": "#FAF8EF",
|
|
|
|
property var myColors: {"bglight": "#FAF8EF",
|
|
|
|