Durdles - 2-Player Action Game
import Felgo 4.0
import QtQuick 2.0
import "../common"
import ".."
SceneBase {
id: selectLevelScene
signal levelPressed(string selectedLevel)
Image {
z: -2
id:background
source: Qt.resolvedUrl("../../assets/img/GameBG.png")
anchors.centerIn: parent
scale: 0.5
}
MenuButton {
label.height: 45
label.width: 45
label.source: Qt.resolvedUrl("../../assets/img/Back.png")
color: "transparent"
z: 10
anchors.right: gameWindowAnchorItem.right
anchors.verticalCenter: gameWindowAnchorItem.verticalCenter
onClicked: {
GameInfo.redVictory = 0
GameInfo.blueVictory = 0
selectLevelScene.backButtonPressed()
}
}
Text {
id: headerText
text: "Levels"
color: "black"
font.family: standardFont.name
font.pixelSize: 36
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 130
}
Text {
id: tutorial
text: "Tutorial"
color: "#54A4BF"
font.family: standardFont.name
font.pixelSize: 16
anchors {
top: parent.top
topMargin: 168
left: parent.left
leftMargin: 29
}
}
Grid {
anchors.centerIn: parent
spacing: 2
columns: 5
Repeater {
model: 10
delegate: Rectangle {
width: 52
height: 52
radius: 12
color: "white"
Rectangle {
width: 44
height: 44
anchors.centerIn: parent
radius: 11
color: "#54A4BF"
Rectangle {
width: 40
height: 40
anchors.centerIn: parent
radius: 10
color: "white"
MenuButton {
property int level: index + 1
text: level
width: 36
height: 36
anchors.centerIn: parent
buttonText.color: "#54A4BF"
buttonText.font.family: standardFont.name
buttonText.font.pixelSize: 24
onClicked: {
var levelFile = "Level_"+level+".qml";
if(level < 10)
levelFile = "Level_0"+level+".qml";
levelPressed(levelFile)
}
}
}
}
}