2018-09-09 15:05:52 +03:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Window 2.2
|
2018-11-14 23:15:36 +03:00
|
|
|
import QtQuick.Controls 2.2
|
2018-09-09 15:05:52 +03:00
|
|
|
|
2018-11-14 23:15:36 +03:00
|
|
|
ApplicationWindow {
|
|
|
|
id: mainWindow;
|
|
|
|
visible: true;
|
|
|
|
width: 1140;
|
|
|
|
height: 540;
|
|
|
|
title: qsTr("SnakeOnTheRoad");
|
2018-11-12 20:00:37 +03:00
|
|
|
|
|
|
|
readonly property int pointCount: 100;
|
|
|
|
|
|
|
|
property real point: (width < height) ? width/pointCount : height/pointCount;
|
|
|
|
|
2018-11-14 23:15:36 +03:00
|
|
|
Scene {
|
2018-11-25 03:24:41 +03:00
|
|
|
id: scane;
|
2019-07-29 11:45:04 +03:00
|
|
|
model: contr;
|
2018-11-14 23:15:36 +03:00
|
|
|
anchors.fill: parent;
|
2018-11-12 20:00:37 +03:00
|
|
|
}
|
|
|
|
|
2018-11-25 18:10:08 +03:00
|
|
|
MainMenu {
|
2018-11-14 23:15:36 +03:00
|
|
|
|
2019-07-29 11:45:04 +03:00
|
|
|
model: (contr)? contr.mainMenuModel: null;
|
2018-11-25 18:10:08 +03:00
|
|
|
anchors.fill: parent;
|
|
|
|
visible: scane.showMenu;
|
|
|
|
|
2019-07-29 11:45:04 +03:00
|
|
|
onPlayGame: {
|
|
|
|
scane.showMenu = false;
|
2018-11-25 18:10:08 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2018-09-09 15:05:52 +03:00
|
|
|
}
|