Commit 9e4f4043 authored by Timothée Giet's avatar Timothée Giet
Browse files

learn_digits, add repeat button

parent 7d5cd82f
......@@ -70,7 +70,13 @@ ActivityBase {
property string locale: ApplicationSettings.locale
property bool isHorizontal: layoutArea.width >= layoutArea.height
onStart: { Activity.start(items) }
onStart: {
if(!DownloadManager.areVoicesRegistered()) {
repeatItem.visible = false;
repeatItem.enabled = false;
}
Activity.start(items)
}
onStop: { Activity.stop() }
Item {
......@@ -90,6 +96,25 @@ ActivityBase {
anchors.right: layoutArea.right
}
Item {
id: repeatArea
width: textArea.width
height: textArea.height
anchors.right: textArea.left
anchors.verticalCenter: textArea.verticalCenter
}
BarButton {
id: repeatItem
source: "qrc:/gcompris/src/core/resource/bar_repeat.svg"
sourceSize.width: repeatArea.height > repeatArea.width ?
repeatArea.width * 0.6 : repeatArea.height * 0.6
anchors.centerIn: repeatArea
onClicked:{
Activity.playLetter(items.question.toString());
}
}
Item {
id: textArea
width: questionArea.width * 0.3
......
......@@ -30,6 +30,7 @@ var questionsLeft;
var questionsArray;
function start(items_) {
Core.checkForVoices(items_.main);
items = items_;
numberOfLevel = items.levels.length;
currentLevel = 0;
......
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