4
0
mirror of https://github.com/QuasarApp/Hanoi-Towers.git synced 2025-05-13 18:09:33 +00:00

source for version 1.5

This commit is contained in:
Andrei Yankovich 2018-07-11 21:29:05 +03:00
parent da3b9c689e
commit db3d9c345f
15 changed files with 562 additions and 248 deletions

74
source/SwitchLvl.qml Normal file

@ -0,0 +1,74 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import "./base" as Base
Rectangle {
id: tumbler
color: "#ffffff"
border.color: "#d5d4d4"
visible: false
signal start(var lvl);
property var spin: spin
Tumbler {
visibleItemCount : 5;
id: spin
model: 99
property int value: 4
property int maximumValue: 99
function format(){
}
delegate: Text {
color: Qt.rgba(0.5,0.5,0.5,1 / (Math.abs(spin.currentIndex - modelData)))
text: "" + (modelData + 1)
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: (spin.height / 4) / (Math.abs(spin.currentIndex - modelData) + 1 )
}
onValueChanged: {
currentIndex = value - 1
}
onCurrentIndexChanged: {
value = currentIndex + 1;
}
onMaximumValueChanged: {
model = maximumValue
}
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.bottomMargin: closeTumbler.height + 5
}
Base.BaseButton{
id: closeTumbler
text: qsTr("Start")
onClicked: {
tumbler.visible = false;
start(spin.value);
}
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
}
width: (height / 4)
}

@ -15,7 +15,7 @@ Item {
readonly property string atlColor: Utils.primaryColor()
readonly property string backgroundColor: Utils.backgroundColor()
readonly property string backgroundAltColor: Utils.backgroundAltColor()
readonly property int pading: Utils.dp(Screen.pixelDensity, 10);
}

@ -1,6 +1,8 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.3
import BackEnd 1.0
import "./base" as Base
@ -18,65 +20,54 @@ Rectangle {
id: backEnd
}
Base.Theme {
id: theme
}
MouseArea {
id: mouse
}
Base.BaseButton {
id: b_start
text: qsTr("Start")
onClicked: {
gameWindow.start(spin.value)
}
anchors.right: about.left
anchors.rightMargin: 5;
width: mouseContener.width
height: mouseContener.height
}
Base.BaseButton {
id: b_exit
text: qsTr("Exit")
anchors.right: gameWindow.right
anchors.rightMargin: 5;
width: mouseContener.width
height: mouseContener.height
onClicked: {
Qt.quit()
}
}
Base.BaseButton {
id: about
text: qsTr("About")
anchors.right: b_exit.left
anchors.rightMargin: 5;
width: mouseContener.width
height: mouseContener.height
onClicked: {
gameWindow.parent.source = "about.qml"
}
}
Rectangle {
id: s_start
Rectangle {
Base.BaseText {
font.bold: true
font.pointSize: height / text.length * 2
horizontalAlignment: Text.AlignHCenter
styleColor: "#973c3c"
verticalAlignment: Text.AlignVCenter
text: qsTr("Tower height:")
anchors.fill: parent
}
anchors.left: parent.left
width: parent.width / 2.2
RowLayout{
height: gameWindow.height * 0.1
Item {
id: mouseContener
property var mouseObj: null
width: parent.width * 0.13
height: parent.height
function clear() {
if (mouseObj) {
mouseObj.destroy()
}
}
function push(obj) {
mouseObj = obj
obj.parent = this
return true
}
function top() {
return mouseObj
}
function pop() {
mouseObj = null
}
}
Base.BaseText {
font.bold: true
font.pointSize: height / text.length * 2
horizontalAlignment: Text.AlignHCenter
styleColor: "#973c3c"
verticalAlignment: Text.AlignVCenter
text: qsTr("Tower height:")
}
Base.BaseButton {
id: frame
text: "" + (spin.currentIndex + 1)
text: qsTr("lvl ") + (tumbler.spin.currentIndex + 1)
width: parent.width / 2.2
height: parent.height
@ -84,57 +75,38 @@ Rectangle {
tumbler.visible = true;
}
anchors.right: parent.right
anchors.rightMargin: 5;
}
anchors.right: b_start.left
width: mouseContener.width * 2.5
height: mouseContener.height
}
Rectangle {
id: step
property int ste: 0
width: parent.width *0.05
height: mouseContener.height
Text {
font.bold: true
font.pointSize: 14
horizontalAlignment: Text.AlignHCenter
styleColor: "#973c3c"
verticalAlignment: Text.AlignVCenter
text: "" + step.ste
anchors.fill: parent
}
anchors.left: mouseContener.right
}
Item {
id: mouseContener
property var mouseObj: null
width: parent.width * 0.13
height: parent.height * 0.1
x: mouse.mouseX
y: mouse.mouseY
function clear() {
if (mouseObj) {
mouseObj.destroy()
Rectangle {
id: step
property int ste: 0
width: parent.width *0.05
height: mouseContener.height
Text {
font.bold: true
font.pointSize: 14
horizontalAlignment: Text.AlignHCenter
styleColor: "#973c3c"
verticalAlignment: Text.AlignVCenter
text: qsTr("step ") + step.ste
anchors.fill: parent
}
}
function push(obj) {
mouseObj = obj
obj.parent = this
return true
}
function top() {
return mouseObj
}
function pop() {
mouseObj = null
Base.BaseButton {
id: b_exit
text: qsTr("Return to main menu")
onClicked: {
gameWindow.parent.source = "menu/MainMenu.qml"
}
}
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
}
function launch(){
@ -146,13 +118,11 @@ Rectangle {
function start(value) {
spin.maximumValue = backEnd.reed
tumbler.spin.maximumValue = backEnd.reed
if (backEnd.reed <= value || value < 0)
spin.value = all = value = backEnd.reed
tumbler.spin.value = all = value = backEnd.reed
else {
spin.value = all = value
tumbler.spin.value = all = value
}
step.ste = 0
tower1.clear()
@ -175,6 +145,7 @@ Rectangle {
}
}
function trigered(obj) {
tumbler.visible = false;
if (mouseContener.mouseObj) {
if (obj.push(mouseContener.top())) {
if(oldTower !== obj) step.ste++
@ -187,21 +158,21 @@ Rectangle {
}
}
if (tower2.items.length === all || tower3.items.length === all) {
if (all == spin.maximumValue) {
backEnd.save(spin.value = spin.maximumValue = all + 1)
if (all == tumbler.spin.maximumValue) {
backEnd.save(tumbler.spin.value = tumbler.spin.maximumValue = all + 1)
popUp.text = qsTr("You have passed the level in %0 steps and unlocked level %1" +
"\n Minimum steps for this lvl: %2").
arg(step.ste).arg(all + 1).arg(backEnd.getMinSteps(all));
popUp.open()
start(spin.value)
start(tumbler.spin.value)
} else {
popUp.text = qsTr("You have passed the level in %0 steps.\n" +
"Minimum steps for this lvl: %1").
arg(step.ste).arg(backEnd.getMinSteps(all));
popUp.open()
start(++spin.value)
start(++tumbler.spin.value)
}
}
}
@ -242,82 +213,17 @@ Rectangle {
}
}
Rectangle {
SwitchLvl {
id: tumbler
color: "#ffffff"
border.color: "#d5d4d4"
visible: false
Tumbler {
visibleItemCount : 5;
id: spin
model: 99
property int value: 4
property int maximumValue: 99
function format(){
}
delegate: Text {
color: Qt.rgba(0.5,0.5,0.5,1 / (Math.abs(spin.currentIndex - modelData)))
text: "" + (modelData + 1)
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: (spin.height / 4) / (Math.abs(spin.currentIndex - modelData) + 1 )
}
onValueChanged: {
currentIndex = value - 1
}
onCurrentIndexChanged: {
value = currentIndex + 1;
}
onMaximumValueChanged: {
model = maximumValue
}
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.bottomMargin: closeTumbler.height + 5
x: frame.x
y: frame.y + frame.height
width: frame.width
height: parent.height * 0.7
onStart: {
gameWindow.start(lvl);
}
Base.BaseButton{
id: closeTumbler
text: qsTr("Ok")
onClicked: {
tumbler.visible = false;
}
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
}
width: (height / 4)
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 20
anchors.bottomMargin: 20
}
Help{

@ -9,6 +9,47 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Config</name>
<message>
<location filename="../menu/Config.qml" line="27"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/Config.qml" line="34"/>
<source>Return to main menu</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/Config.qml" line="68"/>
<source>Standart color</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/Config.qml" line="78"/>
<source>Random color</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/Config.qml" line="87"/>
<source>Animation</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Header</name>
<message>
<location filename="../menu/Header.qml" line="6"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/Header.qml" line="15"/>
<source>Main menu</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Help</name>
<message>
@ -27,6 +68,42 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainMenu</name>
<message>
<location filename="../menu/MainMenu.qml" line="21"/>
<source>Hanoi Towers</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="42"/>
<source>start</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="55"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="68"/>
<source>Config</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="81"/>
<source>exit</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SwitchLvl</name>
<message>
<location filename="../SwitchLvl.qml" line="62"/>
<source>Start</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>about</name>
<message>
@ -48,42 +125,37 @@
<context>
<name>game</name>
<message>
<location filename="../game.qml" line="26"/>
<source>Start</source>
<location filename="../game.qml" line="61"/>
<source>lvl </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../game.qml" line="37"/>
<source>Exit</source>
<location filename="../game.qml" line="82"/>
<source>step </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../game.qml" line="48"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../game.qml" line="67"/>
<location filename="../game.qml" line="93"/>
<source>Tower height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../game.qml" line="192"/>
<location filename="../game.qml" line="98"/>
<source>Return to main menu</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../game.qml" line="162"/>
<source>You have passed the level in %0 steps and unlocked level %1
Minimum steps for this lvl: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../game.qml" line="199"/>
<location filename="../game.qml" line="169"/>
<source>You have passed the level in %0 steps.
Minimum steps for this lvl: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../game.qml" line="301"/>
<source>Ok</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>main</name>

Binary file not shown.

@ -9,6 +9,47 @@
<translation></translation>
</message>
</context>
<context>
<name>Config</name>
<message>
<location filename="../menu/Config.qml" line="27"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../menu/Config.qml" line="34"/>
<source>Return to main menu</source>
<translation></translation>
</message>
<message>
<location filename="../menu/Config.qml" line="68"/>
<source>Standart color</source>
<translation></translation>
</message>
<message>
<location filename="../menu/Config.qml" line="78"/>
<source>Random color</source>
<translation></translation>
</message>
<message>
<location filename="../menu/Config.qml" line="87"/>
<source>Animation</source>
<translation></translation>
</message>
</context>
<context>
<name>Header</name>
<message>
<location filename="../menu/Header.qml" line="6"/>
<source></source>
<translation></translation>
</message>
<message>
<location filename="../menu/Header.qml" line="15"/>
<source>Main menu</source>
<translation></translation>
</message>
</context>
<context>
<name>Help</name>
<message>
@ -31,6 +72,42 @@
<translation></translation>
</message>
</context>
<context>
<name>MainMenu</name>
<message>
<location filename="../menu/MainMenu.qml" line="21"/>
<source>Hanoi Towers</source>
<translation></translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="42"/>
<source>start</source>
<translation></translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="55"/>
<source>About</source>
<translation></translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="68"/>
<source>Config</source>
<translation></translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="81"/>
<source>exit</source>
<translation></translation>
</message>
</context>
<context>
<name>SwitchLvl</name>
<message>
<location filename="../SwitchLvl.qml" line="62"/>
<source>Start</source>
<translation></translation>
</message>
</context>
<context>
<name>about</name>
<message>
@ -57,44 +134,51 @@
<context>
<name>game</name>
<message>
<location filename="../game.qml" line="26"/>
<source>Start</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../game.qml" line="37"/>
<source>Exit</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../game.qml" line="48"/>
<source>About</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../game.qml" line="67"/>
<location filename="../game.qml" line="61"/>
<source>lvl </source>
<translation> </translation>
</message>
<message>
<location filename="../game.qml" line="82"/>
<source>step </source>
<translation> </translation>
</message>
<message>
<location filename="../game.qml" line="93"/>
<source>Tower height:</source>
<translation></translation>
</message>
<message>
<location filename="../game.qml" line="192"/>
<location filename="../game.qml" line="98"/>
<source>Return to main menu</source>
<translation></translation>
</message>
<message>
<location filename="../game.qml" line="162"/>
<source>You have passed the level in %0 steps and unlocked level %1
Minimum steps for this lvl: %2</source>
<translation> %0 %1
lvlの最小手順%2</translation>
</message>
<message>
<location filename="../game.qml" line="199"/>
<location filename="../game.qml" line="169"/>
<source>You have passed the level in %0 steps.
Minimum steps for this lvl: %1</source>
<translation>%0
lvlの最小手順%1</translation>
</message>
<message>
<location filename="../game.qml" line="301"/>
<source>Ok</source>
<translation></translation>
</message>
</context>
<context>
<name>main</name>

Binary file not shown.

@ -9,6 +9,47 @@
<translation>ok</translation>
</message>
</context>
<context>
<name>Config</name>
<message>
<location filename="../menu/Config.qml" line="27"/>
<source>Settings</source>
<translation>Настройки</translation>
</message>
<message>
<location filename="../menu/Config.qml" line="34"/>
<source>Return to main menu</source>
<translation>Вернутся в главное меню</translation>
</message>
<message>
<location filename="../menu/Config.qml" line="68"/>
<source>Standart color</source>
<translation>Классическая подсветка</translation>
</message>
<message>
<location filename="../menu/Config.qml" line="78"/>
<source>Random color</source>
<translation>Разноцветная подсветка</translation>
</message>
<message>
<location filename="../menu/Config.qml" line="87"/>
<source>Animation</source>
<translation>Анимация</translation>
</message>
</context>
<context>
<name>Header</name>
<message>
<location filename="../menu/Header.qml" line="6"/>
<source></source>
<translation></translation>
</message>
<message>
<location filename="../menu/Header.qml" line="15"/>
<source>Main menu</source>
<translation>Главное меню</translation>
</message>
</context>
<context>
<name>Help</name>
<message>
@ -27,6 +68,42 @@
<translation>Ok</translation>
</message>
</context>
<context>
<name>MainMenu</name>
<message>
<location filename="../menu/MainMenu.qml" line="21"/>
<source>Hanoi Towers</source>
<translation>Ханойские Башни</translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="42"/>
<source>start</source>
<translation>Начать</translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="55"/>
<source>About</source>
<translation>об Авторах</translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="68"/>
<source>Config</source>
<translation>Настройки</translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="81"/>
<source>exit</source>
<translation>Выход</translation>
</message>
</context>
<context>
<name>SwitchLvl</name>
<message>
<location filename="../SwitchLvl.qml" line="62"/>
<source>Start</source>
<translation>Начать</translation>
</message>
</context>
<context>
<name>about</name>
<message>
@ -53,43 +130,54 @@
<context>
<name>game</name>
<message>
<location filename="../game.qml" line="26"/>
<source>Start</source>
<translation>Начать</translation>
<translation type="vanished">Начать</translation>
</message>
<message>
<location filename="../game.qml" line="37"/>
<source>Exit</source>
<translation>Выход</translation>
<translation type="vanished">Выход</translation>
</message>
<message>
<location filename="../game.qml" line="48"/>
<source>About</source>
<translation>об Авторах</translation>
<translation type="vanished">об Авторах</translation>
</message>
<message>
<location filename="../game.qml" line="67"/>
<location filename="../game.qml" line="61"/>
<source>lvl </source>
<translation>Уровень </translation>
</message>
<message>
<location filename="../game.qml" line="82"/>
<source>step </source>
<translation>шаг </translation>
</message>
<message>
<location filename="../game.qml" line="93"/>
<source>Tower height:</source>
<translation>Высота башни:</translation>
</message>
<message>
<location filename="../game.qml" line="192"/>
<location filename="../game.qml" line="98"/>
<source>Return to main menu</source>
<translation>Вернутся в главное меню</translation>
</message>
<message>
<location filename="../game.qml" line="162"/>
<source>You have passed the level in %0 steps and unlocked level %1
Minimum steps for this lvl: %2</source>
<translation>Вы прошли этот уровень за %0 шагов и разблокировали уровень %1
Минимум шагов на этом уровне: %2</translation>
</message>
<message>
<location filename="../game.qml" line="199"/>
<location filename="../game.qml" line="169"/>
<source>You have passed the level in %0 steps.
Minimum steps for this lvl: %1</source>
<translation>Вы прошли этот уровень за %0 шагов
Минимум шагов на этом уровне: %1</translation>
</message>
<message>
<location filename="../game.qml" line="301"/>
<source>Ok</source>
<translation>Ok</translation>
<translation type="vanished">Ok</translation>
</message>
</context>
<context>

Binary file not shown.

@ -9,6 +9,47 @@
<translation>ok</translation>
</message>
</context>
<context>
<name>Config</name>
<message>
<location filename="../menu/Config.qml" line="27"/>
<source>Settings</source>
<translation>ayarlar</translation>
</message>
<message>
<location filename="../menu/Config.qml" line="34"/>
<source>Return to main menu</source>
<translation>Ana menüye dön</translation>
</message>
<message>
<location filename="../menu/Config.qml" line="68"/>
<source>Standart color</source>
<translation>Klasik arka ışık</translation>
</message>
<message>
<location filename="../menu/Config.qml" line="78"/>
<source>Random color</source>
<translation>Çok renkli arka ışık</translation>
</message>
<message>
<location filename="../menu/Config.qml" line="87"/>
<source>Animation</source>
<translation>animasyon</translation>
</message>
</context>
<context>
<name>Header</name>
<message>
<location filename="../menu/Header.qml" line="6"/>
<source></source>
<translation></translation>
</message>
<message>
<location filename="../menu/Header.qml" line="15"/>
<source>Main menu</source>
<translation>Ana menü</translation>
</message>
</context>
<context>
<name>Help</name>
<message>
@ -27,6 +68,42 @@
<translation>ok</translation>
</message>
</context>
<context>
<name>MainMenu</name>
<message>
<location filename="../menu/MainMenu.qml" line="21"/>
<source>Hanoi Towers</source>
<translation>Hanoi Kuleleri</translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="42"/>
<source>start</source>
<translation>başlamak</translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="55"/>
<source>About</source>
<translation>hakkında</translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="68"/>
<source>Config</source>
<translation>ayarlar</translation>
</message>
<message>
<location filename="../menu/MainMenu.qml" line="81"/>
<source>exit</source>
<translation>çıkış</translation>
</message>
</context>
<context>
<name>SwitchLvl</name>
<message>
<location filename="../SwitchLvl.qml" line="62"/>
<source>Start</source>
<translation>başla</translation>
</message>
</context>
<context>
<name>about</name>
<message>
@ -53,43 +130,54 @@
<context>
<name>game</name>
<message>
<location filename="../game.qml" line="26"/>
<source>Start</source>
<translation>başla</translation>
<translation type="vanished">başla</translation>
</message>
<message>
<location filename="../game.qml" line="37"/>
<source>Exit</source>
<translation>çıkış</translation>
<translation type="vanished">çıkış</translation>
</message>
<message>
<location filename="../game.qml" line="48"/>
<source>About</source>
<translation>hakkında</translation>
<translation type="vanished">hakkında</translation>
</message>
<message>
<location filename="../game.qml" line="67"/>
<location filename="../game.qml" line="61"/>
<source>lvl </source>
<translation>seviye </translation>
</message>
<message>
<location filename="../game.qml" line="82"/>
<source>step </source>
<translation>adım </translation>
</message>
<message>
<location filename="../game.qml" line="93"/>
<source>Tower height:</source>
<translation>Kule yüksekliği:</translation>
</message>
<message>
<location filename="../game.qml" line="192"/>
<location filename="../game.qml" line="98"/>
<source>Return to main menu</source>
<translation>Ana menüye dön</translation>
</message>
<message>
<location filename="../game.qml" line="162"/>
<source>You have passed the level in %0 steps and unlocked level %1
Minimum steps for this lvl: %2</source>
<translation>Seviyeyi %0 adımından geçirdiniz ve %1 kilidini açtınız
Bu lvl için minimum adımlar: %2</translation>
</message>
<message>
<location filename="../game.qml" line="199"/>
<location filename="../game.qml" line="169"/>
<source>You have passed the level in %0 steps.
Minimum steps for this lvl: %1</source>
<translation>Seviyeyi %0 adımından geçtiniz.
Bu lvl için minimum adımlar:%1</translation>
</message>
<message>
<location filename="../game.qml" line="301"/>
<source>Ok</source>
<translation>ok</translation>
<translation type="vanished">ok</translation>
</message>
</context>
<context>

@ -29,6 +29,17 @@ Page {
verticalAlignment: Text.AlignVCenter
font.pixelSize: theme.headerSize;
}
Base.BaseButton {
text: qsTr("Return to main menu");
Layout.alignment: Qt.AlignRight
Layout.rightMargin: theme.pading
onClicked: {
menuPage.parent.source = "MainMenu.qml"
}
}
anchors.fill: parent
}
@ -49,6 +60,7 @@ Page {
ColumnLayout {
id: colors
width: parent.width * 0.5
RadioButton {
id: r1
@ -70,26 +82,15 @@ Page {
}
}
RowLayout{
CheckBox{
Base.BaseText{
text: qsTr("Move animation:");
text: qsTr("Animation")
checked: backEnd.animation
onCheckedChanged: {
backEnd.animation = checked;
}
StatusIndicator {
anchors.centerIn: parent
active: backEnd.animation;
color: "#800af587"
MouseArea {
anchors.fill: parent
onClicked:{
backEnd.animation = !parent.active;
}
}
}
Layout.alignment: Qt.AlignCenter
}
Layout.alignment: Qt.AlignLeft
}
anchors.fill: parent

@ -43,14 +43,14 @@ Rectangle{
Behavior on x{
NumberAnimation
{
easing.type: Easing.OutElastic
easing.type: (backEnd.animation)? Easing.OutElastic : Easing.OutExpo
duration: 1000
}
}
Behavior on y{
NumberAnimation
{
easing.type: Easing.OutElastic
easing.type: (backEnd.animation)? Easing.OutElastic : Easing.OutExpo
duration: 1000
}
}

@ -17,6 +17,7 @@
<file>menu/MainMenu.qml</file>
<file>menu/Header.qml</file>
<file>menu/Config.qml</file>
<file>SwitchLvl.qml</file>
</qresource>
<qresource prefix="/textures">
<file>res/wood.png</file>

Binary file not shown.

Before

(image error) Size: 12 KiB

After

(image error) Size: 20 KiB

Binary file not shown.

Before

(image error) Size: 21 KiB

After

(image error) Size: 28 KiB