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: infoDialog
   width: levelScene.gameWindowAnchorItem.width
   height: levelScene.gameWindowAnchorItem.height
   anchors.centerIn: parent

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

   // is set from LevelScene in onShowInfoClicked
   property variant levelData

   Behavior on opacity {
     NumberAnimation { duration: 150}
   }

   MouseArea {
     anchors.fill: parent
   }

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

   Text {
     anchors.centerIn: parent
     // the ranking is the ranking in the current level-list shown; i.e. if the weekly levellist is shown it is the position in the weekly list
     // if the friend levels are shown, the pos is the position in the list! thus this is not really interesting to display and only confusing for players! so don't display it
     text: levelData ? "Downloads: " + levelData.times_downloaded + "\nAverage Rating: " + (levelData.average_quality).toFixed(1)/* + "\nRanking:" + levelData.pos*/ : ""
     color: "white"
     font.pixelSize: 17
     font.family: fontHUD.name
   }

   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: infoDialog.opacity = 0
       }
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded