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

ChickenOutbreak2 Demo

 import QtQuick 2.0
 import Felgo 4.0

 Item {
   id: button
   width: 40
   height: 34

   Image {
     source: Qt.resolvedUrl("../assets/button.png")
     width: parent.width
     height: parent.height
   }

   Image {
     source: Qt.resolvedUrl("../assets/music_on.png")
     width: 20
     height: 20
     visible: settings.musicEnabled
     anchors.centerIn: parent
   }

   Image {
     source: Qt.resolvedUrl("../assets/music_off.png")
     width: 20
     height: 20
     visible: !settings.musicEnabled
     anchors.centerIn: parent
   }

   MouseArea {
     anchors.fill: parent

     onClicked: {
       button.scale = 1.0
       audioManager.play(audioManager.idMENUCLICK)
       settings.musicEnabled = !settings.musicEnabled
     }
     onPressed: {
       button.scale = 0.85
     }
     onReleased: {
       button.scale = 1.0
     }
     onCanceled: {
       button.scale = 1.0
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded