From 03b67b0bf1399a9ac2bded7af82d6ae682e52ef3 Mon Sep 17 00:00:00 2001 From: Qiaoyong Zhong Date: Mon, 21 Apr 2014 18:41:41 +0800 Subject: [PATCH] save label setting --- qml/2048.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qml/2048.js b/qml/2048.js index 0b8dc1c..d137aaf 100644 --- a/qml/2048.js +++ b/qml/2048.js @@ -75,6 +75,8 @@ function startupFunction() { console.log("Updating new high score..."); settings.setValue("bestScore", bestScore); } + if (label !== settings.value("label", "2048")) + settings.setValue("label", label); console.log("Started a new game"); } @@ -465,5 +467,7 @@ function cleanUpAndQuit() { console.log("Updating new high score..."); settings.setValue("bestScore", bestScore); } + if (label !== settings.value("label", "2048")) + settings.setValue("label", label); Qt.quit(); }