Merge lp:~vthompson/dropping-letters/fix-1196867 into lp:dropping-letters

Proposed by Victor Thompson
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 65
Merged at revision: 65
Proposed branch: lp:~vthompson/dropping-letters/fix-1196867
Merge into: lp:dropping-letters
Diff against target: 44 lines (+5/-1)
1 file modified
dropping-letters.qml (+5/-1)
To merge this branch: bzr merge lp:~vthompson/dropping-letters/fix-1196867
Reviewer Review Type Date Requested Status
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+234765@code.launchpad.net

Commit message

* Disable tiles when game ends.
* Disable pause button when game ends.

Description of the change

* Disable tiles when game ends.
* Disable pause button when game ends.

To post a comment you must log in.
65. By Victor Thompson

Disable pause button if game has ended.

Revision history for this message
Victor Thompson (vthompson) wrote :

Disabled the pause button if the game has ended, otherwise the user can toggle the pause button after the game ends and letters continue to fall.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Hah! nice.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dropping-letters.qml'
--- dropping-letters.qml 2014-09-13 18:26:27 +0000
+++ dropping-letters.qml 2014-09-16 04:34:07 +0000
@@ -28,6 +28,7 @@
28 droptimer.start();28 droptimer.start();
29 toolbar.opened = false;29 toolbar.opened = false;
30 game.paused = false;30 game.paused = false;
31 game.ended = false;
31 }32 }
3233
33 Page {34 Page {
@@ -54,7 +55,7 @@
54 objectName: "pause_game"55 objectName: "pause_game"
55 text: game.paused ? i18n.tr("Resume") : i18n.tr("Pause")56 text: game.paused ? i18n.tr("Resume") : i18n.tr("Pause")
56 iconName: game.paused ? "media-playback-start": "media-playback-pause"57 iconName: game.paused ? "media-playback-start": "media-playback-pause"
57 enabled: flipable.flipped58 enabled: flipable.flipped && !game.ended
58 onTriggered: {59 onTriggered: {
59 if (game.paused) {60 if (game.paused) {
60 droptimer.start();61 droptimer.start();
@@ -545,6 +546,7 @@
545 lm.get(idx).letters.append({ letter: main.getRandomWeightedLetter() });546 lm.get(idx).letters.append({ letter: main.getRandomWeightedLetter() });
546 if (lm.get(idx).letters.count >= 10) {547 if (lm.get(idx).letters.count >= 10) {
547 droptimer.stop();548 droptimer.stop();
549 game.ended = true;
548 if (volume.supportsMedia) {550 if (volume.supportsMedia) {
549 gameover.play();551 gameover.play();
550 }552 }
@@ -562,6 +564,7 @@
562 id: game564 id: game
563 objectName: "gametile"565 objectName: "gametile"
564 property int squaresize: Math.min((flipable.width) / 7, (flipable.height - (flipable.minChromeHeight * 2)) / 10)566 property int squaresize: Math.min((flipable.width) / 7, (flipable.height - (flipable.minChromeHeight * 2)) / 10)
567 property bool ended: false;
565 property bool paused: false;568 property bool paused: false;
566 anchors.top: topbar.bottom569 anchors.top: topbar.bottom
567 anchors.bottom: bottombar.top570 anchors.bottom: bottombar.top
@@ -621,6 +624,7 @@
621 color: "#ffffff"624 color: "#ffffff"
622 }625 }
623 MouseArea {626 MouseArea {
627 enabled: !game.ended
624 anchors.fill: parent628 anchors.fill: parent
625 onClicked: {629 onClicked: {
626 if (!box.selected) {630 if (!box.selected) {

Subscribers

People subscribed via source and target branches