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: buyCreditDialog
   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}
   }

   MouseArea {
     anchors.fill: parent
   }

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

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

     Text {
       text: "Unlock Achievements or buy credit packs to get more Levels!"
       anchors.horizontalCenter: parent.horizontalCenter
       color: "white"
       font.family: fontHUD.name
     }

     Rectangle {
       height: 40
       width: buyCreditDialog.width
       anchors.horizontalCenter: parent.horizontalCenter
       color: "white"
       opacity: 0.8
       Text {
         text: "Buy 5 Credits"
         anchors.centerIn: parent
         font.pixelSize: 21
         font.family: fontHUD.name
       }
       MouseArea {
         anchors.fill: parent
         onClicked: {
           flurry.logEvent("IAP.Buy5Credits")
           levelStore.buyItem(levelStore.money5Pack.itemId)
           buyCreditDialog.opacity = 0
         }
       }
     }
     Rectangle {
       height: 40
       width: buyCreditDialog.width
       anchors.horizontalCenter: parent.horizontalCenter
       color: "white"
       opacity: 0.8
       Text {
         text: "Buy 10 Credits"
         anchors.centerIn: parent
         font.pixelSize: 21
         font.family: fontHUD.name
       }
       MouseArea {
         anchors.fill: parent
         onClicked: {
           flurry.logEvent("IAP.Buy10Credits")
           levelStore.buyItem(levelStore.money10Pack.itemId)
           buyCreditDialog.opacity = 0
         }
       }
     }
     Rectangle {
       height: 40
       width: buyCreditDialog.width
       anchors.horizontalCenter: parent.horizontalCenter
       color: "white"
       opacity: 0.8
       Text {
         text: "Buy 50 Credits"
         anchors.centerIn: parent
         font.pixelSize: 21
         font.family: fontHUD.name
       }
       MouseArea {
         anchors.fill: parent
         onClicked: {
           flurry.logEvent("IAP.Buy50Credits")
           levelStore.buyItem(levelStore.money50Pack.itemId)
           buyCreditDialog.opacity = 0
         }
       }
     }
   }

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