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

Stack With Friends Demo

 import QtQuick 2.0
 import Felgo 3.0

 Item {
   id: orderDialog
   width: levelScene.gameWindowAnchorItem.width
   height: levelScene.gameWindowAnchorItem.height
   anchors.centerIn: parent

   enabled: opacity > 0 // otherwise this item would receive mouse events when opaque

   Behavior on opacity {
     NumberAnimation { duration: 150}
   }

   // levelOrder is either "created_at", "average_quality" or "times_downloaded"
   signal levelOrderSelected(string levelOrder)

   onLevelOrderSelected: {
     opacity = 0
   }

   MouseArea {
     anchors.fill: parent
   }

   Rectangle {
     color: "black"
     anchors.fill: parent
     opacity: 0.9
   }

   Column {
     id: col
     spacing: 10
     anchors.centerIn: parent

     Rectangle {
       height: 40
       width: orderDialog.width
       anchors.horizontalCenter: parent.horizontalCenter
       color: "white"
       opacity: 0.8
       Text {
         text: "Newest"
         anchors.centerIn: parent
         font.pixelSize: 21
         font.family: fontHUD.name
       }
       MouseArea {
         anchors.fill: parent
         onClicked: {
           levelOrderSelected("created_at")
         }
       }
     }
     Rectangle {
       height: 40
       width: orderDialog.width
       anchors.horizontalCenter: parent.horizontalCenter
       color: "white"
       opacity: 0.8
       Text {
         text: "Highest Rated"
         anchors.centerIn: parent
         font.pixelSize: 21
         font.family: fontHUD.name
       }
       MouseArea {
         anchors.fill: parent
         onClicked: {
           levelOrderSelected("average_quality")
         }
       }
     }
     Rectangle {
       height: 40
       width: orderDialog.width
       anchors.horizontalCenter: parent.horizontalCenter
       color: "white"
       opacity: 0.8
       Text {
         text: "Most Downloaded"
         anchors.centerIn: parent
         font.pixelSize: 21
         font.family: fontHUD.name
       }
       MouseArea {
         anchors.fill: parent
         onClicked: {
           levelOrderSelected("times_downloaded")
         }
       }
     }
   }

   MultiResolutionImage {
     source: "../../../assets/img/gamescene-top.png"
     anchors.horizontalCenter: parent.horizontalCenter
     Item {
       width: 39
       height: 39
       x: 12
       y: -1
       MultiResolutionImage {
         source: "../../../assets/img/back-button.png"
         anchors.centerIn: parent
       }
       MouseArea {
         anchors.fill: parent
         onClicked: orderDialog.opacity = 0
       }
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded