From 9d8b14f91e17c8fe10791e1fb0f45669eec3dcef Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Sun, 6 Jan 2019 20:14:33 +0100
Subject: Improved timer and translations
---
BinaryFun.pro | 2 +-
qml/cover/CoverPage.qml | 2 +-
qml/pages/FirstPage.qml | 12 ++++++------
qml/pages/LeaderBoard.qml | 19 ++++++++++++++++++-
translations/BinaryFun-de.ts | 28 ++++++++++++++++------------
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 @@
CoverPage
- My Cover
- Mein Cover
+ Binary Fun
+ Binary Fun
FirstPage
- Show Page 2
-
+ Yeeha!
+ Juhuu!
+
+
+ Leaderboard
+ Bestenliste
Binary Fun
-
+ Binary Fun
-
-
- SettingsPage
- Nested Page
- Unterseite
+ Play again!
+ Nochmal spielen!
+
+
+ LeaderBoard
- Item
- Element
+ Under Construction!
+
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 @@
CoverPage
- My Cover
+ Binary Fun
FirstPage
- Show Page 2
+ Yeeha!
+
+
+
+ Leaderboard
Binary Fun
-
-
- SettingsPage
- Nested Page
+ Play again!
+
+
+ LeaderBoard
- Item
+ Under Construction!
--
cgit v1.2.3