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: levelTimeLimitDialog

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

   PlatformerTextButton {
     id: allTime

     screenText: "All Time"

     width: 175

     anchors.centerIn: parent
     anchors.verticalCenterOffset: -50

     onClicked: {
       setTimeLimit(0)
     }
   }

   PlatformerTextButton {
     id: thisWeek

     screenText: "This Week"

     width: 175

     anchors.centerIn: parent

     onClicked: {
       setTimeLimit(24 * 7)
     }
   }

   PlatformerTextButton {
     id: today

     screenText: "Today"

     width: 175

     anchors.centerIn: parent
     anchors.verticalCenterOffset: 50

     onClicked: {
       setTimeLimit(24)
     }
   }

   function setTimeLimit(newTimeLimit) {
     // set new time limit
     levelScene.timeLimit = newTimeLimit

     // close dialog
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded