diff options
author | Marvin Borner | 2019-01-06 20:14:33 +0100 |
---|---|---|
committer | Marvin Borner | 2019-01-06 20:14:33 +0100 |
commit | 9d8b14f91e17c8fe10791e1fb0f45669eec3dcef (patch) | |
tree | 0ac52df7adce82112ddbb56276e04ef586f47798 | |
parent | 15d852bcf57c490eff232bbc8d60d6728bd54658 (diff) |
Improved timer and translations
-rw-r--r-- | BinaryFun.pro | 2 | ||||
-rw-r--r-- | qml/cover/CoverPage.qml | 2 | ||||
-rw-r--r-- | qml/pages/FirstPage.qml | 12 | ||||
-rw-r--r-- | qml/pages/LeaderBoard.qml | 19 | ||||
-rw-r--r-- | translations/BinaryFun-de.ts | 28 | ||||
-rw-r--r-- | translations/BinaryFun.ts | 18 |
6 files changed, 53 insertions, 28 deletions
diff --git a/BinaryFun.pro b/BinaryFun.pro index a2b2c84..bfffd72 100644 --- a/BinaryFun.pro +++ b/BinaryFun.pro @@ -25,7 +25,7 @@ DISTFILES += qml/BinaryFun.qml \ rpm/BinaryFun.yaml \ translations/*.ts \ BinaryFun.desktop \ - qml/pages/SettingsPage.qml + qml/pages/LeaderBoard.qml SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172 diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml index fc562d5..cf58ea4 100644 --- a/qml/cover/CoverPage.qml +++ b/qml/cover/CoverPage.qml @@ -5,7 +5,7 @@ CoverBackground { Label { id: label anchors.centerIn: parent - text: qsTr("My Cover") + text: qsTr("Binary Fun") } CoverActionList { diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml index d45208f..c0702ac 100644 --- a/qml/pages/FirstPage.qml +++ b/qml/pages/FirstPage.qml @@ -31,7 +31,7 @@ Page { console.log("Correct rows:" + JSON.stringify(correctRows)); if (Object.keys(correctRows).every(function(k){ return correctRows[k] })) { - gameover.text = "Yeeha!"; + gameover.text = qsTr("Yeeha!"); newGameBtn.visible = true; timer.stop() } @@ -62,8 +62,8 @@ Page { PullDownMenu { MenuItem { - text: qsTr("Show Page 2") - onClicked: pageStack.push(Qt.resolvedUrl("SettingsPage.qml")) + text: qsTr("Leaderboard") + onClicked: pageStack.push(Qt.resolvedUrl("LeaderBoard.qml")) } } @@ -178,7 +178,7 @@ Page { Button { id: newGameBtn - text: "New Game!" + text: qsTr("Play again!") visible: false anchors.horizontalCenter: parent.horizontalCenter onClicked: newGame() @@ -191,7 +191,7 @@ Page { Label { id: timerLabel - text: "0" + text: "0.0" anchors.horizontalCenter: parent.horizontalCenter } @@ -200,7 +200,7 @@ Page { interval: 10 running: true repeat: true - onTriggered: timerLabel.text = (parseInt(timerLabel.text) + 1) / 100 + onTriggered: timerLabel.text = (parseFloat(timerLabel.text) + 0.01).toFixed(2).toString() } } } diff --git a/qml/pages/LeaderBoard.qml b/qml/pages/LeaderBoard.qml index 9c36e13..596b0e2 100644 --- a/qml/pages/LeaderBoard.qml +++ b/qml/pages/LeaderBoard.qml @@ -1,5 +1,22 @@ import QtQuick 2.0 +import Sailfish.Silica 1.0 -Item { +Page { + id: page + allowedOrientations: Orientation.All + SilicaFlickable { + anchors.fill: parent + contentHeight: column.height + + Column { + id: column + width: page.width + spacing: Theme.paddingLarge + + PageHeader { + title: qsTr("Under Construction!") + } + } + } } diff --git a/translations/BinaryFun-de.ts b/translations/BinaryFun-de.ts index 388fcb0..9e31b46 100644 --- a/translations/BinaryFun-de.ts +++ b/translations/BinaryFun-de.ts @@ -4,30 +4,34 @@ <context> <name>CoverPage</name> <message> - <source>My Cover</source> - <translation>Mein Cover</translation> + <source>Binary Fun</source> + <translation type="unfinished">Binary Fun</translation> </message> </context> <context> <name>FirstPage</name> <message> - <source>Show Page 2</source> - <translation type="unfinished"></translation> + <source>Yeeha!</source> + <translation type="unfinished">Juhuu!</translation> + </message> + <message> + <source>Leaderboard</source> + <translation type="unfinished">Bestenliste</translation> </message> <message> <source>Binary Fun</source> - <translation type="unfinished"></translation> + <translation type="unfinished">Binary Fun</translation> </message> -</context> -<context> - <name>SettingsPage</name> <message> - <source>Nested Page</source> - <translation type="unfinished">Unterseite</translation> + <source>Play again!</source> + <translation type="unfinished">Nochmal spielen!</translation> </message> +</context> +<context> + <name>LeaderBoard</name> <message> - <source>Item</source> - <translation type="unfinished">Element</translation> + <source>Under Construction!</source> + <translation type="unfinished"></translation> </message> </context> </TS> diff --git a/translations/BinaryFun.ts b/translations/BinaryFun.ts index a6b1b42..26f13c8 100644 --- a/translations/BinaryFun.ts +++ b/translations/BinaryFun.ts @@ -4,29 +4,33 @@ <context> <name>CoverPage</name> <message> - <source>My Cover</source> + <source>Binary Fun</source> <translation type="unfinished"></translation> </message> </context> <context> <name>FirstPage</name> <message> - <source>Show Page 2</source> + <source>Yeeha!</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Leaderboard</source> <translation type="unfinished"></translation> </message> <message> <source>Binary Fun</source> <translation type="unfinished"></translation> </message> -</context> -<context> - <name>SettingsPage</name> <message> - <source>Nested Page</source> + <source>Play again!</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>LeaderBoard</name> <message> - <source>Item</source> + <source>Under Construction!</source> <translation type="unfinished"></translation> </message> </context> |