Multi-Scene-Multi-Level Demo
import Felgo 4.0
import QtQuick 2.0
import "../common"
SceneBase {
id: selectLevelScene
signal levelPressed(string selectedLevel)
Rectangle {
anchors.fill: parent.gameWindowAnchorItem
color: "#ece468"
}
MenuButton {
text: "Back"
anchors.right: selectLevelScene.gameWindowAnchorItem.right
anchors.rightMargin: 10
anchors.top: selectLevelScene.gameWindowAnchorItem.top
anchors.topMargin: 10
onClicked: backButtonPressed()
}
Grid {
anchors.centerIn: parent
spacing: 10
columns: 5
MenuButton {
text: "1"
width: 50
height: 50
onClicked: {
levelPressed("Level1.qml")
}
}
MenuButton {
text: "2"
width: 50
height: 50
onClicked: {
levelPressed("Level2.qml")
}
}
MenuButton {
text: "3"
width: 50
height: 50
onClicked: {
levelPressed("Level3.qml")
}
}
Repeater {
model: 10
MenuButton {
text: " "
width: 50
height: 50
}