Platformer with Level Editor
import QtQuick 2.0
import Felgo 3.0
import "../../common"
DialogBase {
id: ratingDialog
property var levelData
signal levelRated
PlatformerImageButton {
image.source: "../../../assets/ui/rate_5stars.png"
width: 175
height: 30
anchors.centerIn: parent
anchors.verticalCenterOffset: -100
onClicked: rateLevel(5)
}
PlatformerImageButton {
image.source: "../../../assets/ui/rate_4stars.png"
width: 175
height: 30
anchors.centerIn: parent
anchors.verticalCenterOffset: -50
onClicked: rateLevel(4)
}
PlatformerImageButton {
image.source: "../../../assets/ui/rate_3stars.png"
width: 175
height: 30
anchors.centerIn: parent
onClicked: rateLevel(3)
}
PlatformerImageButton {
image.source: "../../../assets/ui/rate_2stars.png"
width: 175
height: 30
anchors.centerIn: parent
anchors.verticalCenterOffset: 50
onClicked: rateLevel(2)
}
PlatformerImageButton {
image.source: "../../../assets/ui/rate_1star.png"
width: 175
height: 30
anchors.centerIn: parent
anchors.verticalCenterOffset: 100
onClicked: rateLevel(1)
}
function rateLevel(rating) {
levelEditor.rateLevel( { levelId: levelData.levelId, quality: rating } )
levelScene.reloadLevels()