Commit f8d79d6b authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

core, better management of ActivityBase's ActivityInfo

No more play the intro voice again when leaving an activity.
parent 84825666
......@@ -27,6 +27,7 @@ import "qrc:/gcompris/src/core/core.js" as Core
ActivityBase {
id: menuActivity
focus: true
activityInfo: ActivityInfoTree.rootMenu
onHome: pageView.depth === 1 ? Core.quit(menuActivity) : pageView.pop()
......@@ -78,6 +79,7 @@ ActivityBase {
function loadActivity() {
activityLoader.item.menu = menuActivity
activityLoader.item.activityInfo = ActivityInfoTree.currentActivity
pageView.push(activityLoader.item)
}
......
......@@ -27,7 +27,7 @@ Item {
property Item main: parent;
property Component pageComponent
property QtObject menu
property QtObject activityInfo: ActivityInfoTree.currentActivity
property QtObject activityInfo
// The global audio item, append to it to play your sounds after the
// intro music
property GCAudio audio
......
......@@ -35,8 +35,6 @@ Window {
minimumHeight: 400
title: "GCompris"
property QtObject currentActivity
onClosing: Core.quit()
GCAudio {
......@@ -81,7 +79,6 @@ Window {
properties.exitItem.pause()
if(!properties.exitItem.isDialog) {
playIntroVoice(properties.enterItem.activityInfo.name)
currentActivity = properties.enterItem
properties.enterItem.audio = audio
properties.enterItem.start()
}
......@@ -106,7 +103,6 @@ Window {
{
properties.exitItem.opacity = 1
properties.enterItem.play()
currentActivity = properties.enterItem
if(!properties.enterItem.isDialog) {
properties.exitItem.stop()
}
......
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