import QtQuick 2.0 import Sailfish.Silica 1.0 Dialog { id: page property int dots property int ghostEnabled property int musicEnabled property int sfxEnabled property int highscoreValue property int onlineEnabled SilicaFlickable { id: flickable anchors.fill: parent contentHeight: column.height Column { id: column width: page.width spacing: Theme.paddingLarge DialogHeader { title: qsTr("Settings") } TextSwitch { id: dotSwitch automaticCheck: false checked: dots ? true : false text: checked ? qsTr("Squares") : qsTr("Dots") description: qsTr("Changes the shape of the blocks") onClicked: { if (dots === 0) { dots = 1 } else { dots = 0 } } } TextSwitch { id: ghostSwitch automaticCheck: false checked: ghostEnabled ? true : false text: checked ? qsTr("Ghost Enabled") : qsTr("Ghost Disabled") description: qsTr("Display a hint of where the block will fall") onClicked: { if (ghostEnabled === 0) { ghostEnabled = 1 } else { ghostEnabled = 0 } } } TextSwitch { id: sfxSwitch automaticCheck: false checked: sfxEnabled ? true : false text: checked ? qsTr("SoundFX Enabled") : qsTr("SoundFX Disabled") description: qsTr("Play sound effects in game") onClicked: { if (sfxEnabled === 0) { sfxEnabled = 1 } else { sfxEnabled = 0 } } } TextSwitch { id: musicSwitch automaticCheck: false checked: musicEnabled ? true : false text: checked ? qsTr("Music Enabled") : qsTr("Music Disabled") description: qsTr("Play music in game") enabled: true /// enable if music should be included?! onClicked: { if (musicEnabled === 0) { musicEnabled = 1 } else { musicEnabled = 0 } } } /* TextSwitch { id: onlineSwitch automaticCheck: false checked: onlineEnabled ? true : false text: checked ? qsTr("Online highscores Enabled") : qsTr("Online highscores Disabled") description: qsTr("Save scores online to compare scores with other players") enabled: true /// enable if music should be included?! onClicked: { if (onlineEnabled === 0) { onlineEnabled = 1 } else { onlineEnabled = 0 } } } */ } } }