Commit c91b3437 authored by Akshat Tandon's avatar Akshat Tandon Committed by Johnny Jazeix
Browse files

letter-in-word, stopping plane at lower levels so that the letter stays there.

parent 7b987935
...@@ -181,11 +181,11 @@ Item { ...@@ -181,11 +181,11 @@ Item {
if(spelling.charAt(i) == Activity.currentLetter){ if(spelling.charAt(i) == Activity.currentLetter){
tempword = spelling.substring(j,i); tempword = spelling.substring(j,i);
if(i!=j){ if(i!=j){
console.log(tempword) //console.log(tempword)
components.append({"textdata": tempword}) components.append({"textdata": tempword})
} }
components.append({"textdata": Activity.currentLetter}); components.append({"textdata": Activity.currentLetter});
console.log(Activity.currentLetter) //console.log(Activity.currentLetter)
//console.log('qwe:') //console.log('qwe:')
//console.log(tempword) //console.log(tempword)
j = i + 1; j = i + 1;
...@@ -194,12 +194,12 @@ Item { ...@@ -194,12 +194,12 @@ Item {
if(j < spelling.length){ if(j < spelling.length){
tempword = spelling.substring(j, spelling.length); tempword = spelling.substring(j, spelling.length);
components.append({"textdata": tempword}) components.append({"textdata": tempword})
console.log(tempword) //console.log(tempword)
//console.log(tempword) //console.log(tempword)
//console.log(componenetsArr.length) //console.log(componenetsArr.length)
} }
console.log('*/*/') //console.log('*/*/')
console.log(components.length) //console.log(components.length)
......
...@@ -242,9 +242,11 @@ ActivityBase { ...@@ -242,9 +242,11 @@ ActivityBase {
target: planeText target: planeText
properties: "x" properties: "x"
from: - planeText.width from: - planeText.width
to: background.width //to:background.width/2 - planeText.width/2
duration: 11000 to: bar.level <= 2 ? background.width/4 : background.width
easing.type: Easing.OutInCirc duration: bar.level <= 2 ? 5500: 11000
//easing.type: Easing.OutQuad
easing.type: bar.level <= 2 ? Easing.OutQuad: Easing.OutInCirc
} }
} }
......
...@@ -127,6 +127,7 @@ function shuffleString(s) ...@@ -127,6 +127,7 @@ function shuffleString(s)
} }
function initLevel() { function initLevel() {
//console.log("**********Current level: " + currentLevel)
var componentsArr; var componentsArr;
items.bar.level = currentLevel + 1; items.bar.level = currentLevel + 1;
if (currentSubLevel == 0 && !incorrectFlag) { if (currentSubLevel == 0 && !incorrectFlag) {
...@@ -167,9 +168,10 @@ function initLevel() { ...@@ -167,9 +168,10 @@ function initLevel() {
var locale = GCompris.ApplicationInfo.getVoicesLocale(items.locale); var locale = GCompris.ApplicationInfo.getVoicesLocale(items.locale);
currentLetter = questions[currentSubLevel]; currentLetter = questions[currentSubLevel];
items.question = currentLetter items.question = currentLetter
if(currentLevel <= 2){ items.animateX.restart();
items.animateX.restart(); //if(currentLevel <= 2){
}
//}
if (GCompris.ApplicationSettings.isAudioVoicesEnabled && if (GCompris.ApplicationSettings.isAudioVoicesEnabled &&
GCompris.DownloadManager.haveLocalResource( GCompris.DownloadManager.haveLocalResource(
GCompris.DownloadManager.getVoicesResourceForLocale(locale))) { GCompris.DownloadManager.getVoicesResourceForLocale(locale))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment