Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Platformer with Level Editor

 import QtQuick 2.0
 import Felgo 3.0
 import "../../common"

 DialogBase {
   id: publishDialog

   Text {
     anchors.centerIn: parent

     text: "Do you really want to publish this level?"

     color: "white"
   }

   // Buttons ------------------------------------------

   PlatformerTextButton {
     id: okButton

     screenText: "Ok"

     width: 100

     anchors.bottom: parent.bottom
     anchors.bottomMargin: 50
     anchors.left: parent.left
     anchors.leftMargin: 100

     onClicked: {
       // save level and publish it
       editorOverlay.saveLevel()
       levelEditor.publishLevel()

       // close dialog
       publishDialog.opacity = 0
     }
   }

   PlatformerTextButton {
     id: cancelButton

     screenText: "Cancel"

     width: 100

     anchors.bottom: parent.bottom
     anchors.bottomMargin: 50
     anchors.right: parent.right
     anchors.rightMargin: 100

     // when clicking "cancel" we only close the dialog
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded