Build out very basic layout of menu based on Kivy.
This commit is contained in:
parent
3f408edde6
commit
7b36312ed3
|
@ -0,0 +1,6 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "orange"
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "blue"
|
||||
|
||||
Image {
|
||||
source: 'images/backdrop.jpg'
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: logo
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 20
|
||||
|
||||
color: Qt.rgba(1, 1, 1, 0.5)
|
||||
|
||||
width: parent.width
|
||||
height: logoImage.height
|
||||
|
||||
Image {
|
||||
id: logoImage
|
||||
source: 'images/logo.png'
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: version
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 20
|
||||
|
||||
color: Qt.rgba(1, 1, 1, 0.5)
|
||||
width: parent.width
|
||||
height: 20
|
||||
|
||||
Text {
|
||||
// TODO: Add in a way to dynamically get the version of the app.
|
||||
text: "Version 0.4.0"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 20
|
||||
}
|
||||
}
|
||||
}
|
15
main.qml
15
main.qml
|
@ -3,7 +3,18 @@ import QtQuick.Window 2.2
|
|||
|
||||
Window {
|
||||
visible: true
|
||||
width: 640
|
||||
height: 480
|
||||
width: 800
|
||||
height: 600
|
||||
title: qsTr("justCheckers")
|
||||
|
||||
Loader {
|
||||
id: appPage
|
||||
source: "Menu.qml"
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: appPage.source = "Board.qml"
|
||||
}
|
||||
}
|
||||
|
|
13
qml.qrc
13
qml.qrc
|
@ -1,5 +1,18 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>main.qml</file>
|
||||
<file>Board.qml</file>
|
||||
<file>Menu.qml</file>
|
||||
<file>images/attack_king.png</file>
|
||||
<file>images/attack_pawn.png</file>
|
||||
<file>images/backdrop.jpg</file>
|
||||
<file>images/defend_king.png</file>
|
||||
<file>images/defend_pawn.png</file>
|
||||
<file>images/icon.png</file>
|
||||
<file>images/idea.png</file>
|
||||
<file>images/logo.png</file>
|
||||
<file>images/non_play.png</file>
|
||||
<file>images/play.png</file>
|
||||
<file>images/splash.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Reference in New Issue