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

Durdles - 2-Player Action Game

 import Felgo 3.0
 import QtQuick 2.0
 import "../common"
 import ".."

 SceneBase {
   id:settingScene

   // background
   Image {
     z: -2
     id: background
     source: "../../assets/img/SettingsBG.png"

     // use this if the image should be centered, which is the most common case
     // if the image should be aligned at the bottom, probably the whole scene should be aligned at the bottom, and the image should be shifted up by the delta between the imagesSize and the scene.y!
     anchors.centerIn: parent
     scale: 0.5
   }

   // back button to leave scene
   MenuButton {
     label.height: 45
     label.width: 45
     label.source: "../../assets/img/Back.png"
     color: "transparent"
     z: 10
     anchors.right: gameWindowAnchorItem.right
     anchors.verticalCenter: gameWindowAnchorItem.verticalCenter
     onClicked: settingScene.backButtonPressed()
   }

   Column {
     anchors.top: parent.top
     anchors.topMargin: 20
     anchors.horizontalCenter: parent.horizontalCenter
     width: parent.width - 40
     spacing: 20

     // header settings
     Text {
       font.family: standardFont.name
       font.pixelSize: 36
       text: "Settings"
       color: "black"
     }

     // header easy or expert controls
     Text {
       font.family: standardFont.name
       font.pixelSize: 24
       text: "Shot Control"
       color: "black"
     }

     // header background music
     Text {
       font.family: standardFont.name
       font.pixelSize: 24
       text: "Background Music"
       color: "black"
     }

     // header sound effects
     Text {
       font.family: standardFont.name
       font.pixelSize: 24
       text: "Sound Effects"
       color: "black"
     }
   }

   Column {
     anchors.right: parent.right
     anchors.rightMargin: 20
     anchors.top: parent.top
     anchors.topMargin: 77
     spacing: 8

     // button to switch between easy and hard controls
     MenuButton {
       label.source: active ? "../../assets/img/Switch_Hard.png" : "../../assets/img/Switch_Easy.png"
       active: !GameInfo.easyMode
       opacity: 1
       onClicked: {
         GameInfo.easyMode ^= true
       }
       width: 90
       height: 40
     }

     // button to turn the music on and off
     MenuButton {
       width: 90
       height: 40
       label.source: active ? "../../assets/img/Switch_Off.png" : "../../assets/img/Switch_On.png"
       active: ! settings.musicEnabled
       opacity: 1
       onClicked:  {
         settings.musicEnabled ^= true
       }
     }

     // button to turn the sound effects on and off
     MenuButton {
       width: 90
       height: 40
       label.source: active ? "../../assets/img/Switch_Off.png" : "../../assets/img/Switch_On.png"
       active: ! settings.soundEnabled
       opacity: 1
       onClicked: {
         settings.soundEnabled ^= true
       }
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded