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

ChickenOutbreak2 Demo

 import QtQuick 2.0

 // gets used for the text elements in the menus for the game name and score
 Item {
   width: coinText.width+coinImage.width+(displayCustomCoins ? 5 : 6.75)
   height: 20

   property bool displayBonusCoins: false
   property int bonusCoins: 0
   property bool displayCustomCoins: false
   property int customCoins: 0
   property int pixelSize: 20
   property string color: "#f5b68a"

   Image {
     id: coinImage
     source: displayCustomCoins ? "../assets/saveit_single.png" : "../assets/coin_single.png"
     width: displayCustomCoins ? 20 : 15.25
     height: 20
     anchors.verticalCenter: parent.verticalCenter
   }

   Text {
     id: coinText
     color: parent.color
     font.family: fontHUD.name
     font.pixelSize: parent.pixelSize
     text: getText()
     x: displayCustomCoins ? 25 : 22
     anchors.verticalCenter: parent.verticalCenter
   }

   function getText() {
     if(displayBonusCoins)
       return bonusCoins + qsTr(" earned")
     else if(displayCustomCoins)
       return customCoins+""
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded