Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GCompris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
27
Issues
27
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
GCompris
Commits
7f1c6365
Commit
7f1c6365
authored
Aug 12, 2020
by
Timothée Giet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
play_rhythm, add dialog to warn that activity will play audio in any case
parent
052aa976
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
src/activities/play_rhythm/PlayRhythm.qml
src/activities/play_rhythm/PlayRhythm.qml
+28
-2
No files found.
src/activities/play_rhythm/PlayRhythm.qml
View file @
7f1c6365
...
...
@@ -39,10 +39,12 @@ ActivityBase {
id
:
background
anchors.fill
:
parent
color
:
"
#ABCDEF
"
signal
start
signal
stop
// if audio is disabled, we display a dialog to tell users this activity requires audio anyway
property
bool
audioDisabled
:
false
Component.onCompleted
:
{
activity
.
start
.
connect
(
start
)
activity
.
stop
.
connect
(
stop
)
...
...
@@ -66,7 +68,12 @@ ActivityBase {
property
bool
isWrongRhythm
:
false
}
onStart
:
{
Activity
.
start
(
items
)
}
onStart
:
{
if
(
!
ApplicationSettings
.
isAudioVoicesEnabled
||
!
ApplicationSettings
.
isAudioEffectsEnabled
)
{
background
.
audioDisabled
=
true
;
}
Activity
.
start
(
items
);
}
onStop
:
{
Activity
.
stop
()
}
property
string
clefType
:
"
Treble
"
...
...
@@ -354,5 +361,24 @@ ActivityBase {
loose
.
connect
(
Activity
.
initSubLevel
)
}
}
Loader
{
id
:
audioNeededDialog
sourceComponent
:
GCDialog
{
parent
:
activity
isDestructible
:
false
message
:
qsTr
(
"
This activity requires audio, so it will play some sounds even if the audio voices or effects are disabled in the main configuration.
"
)
button1Text
:
qsTr
(
"
Quit
"
)
button2Text
:
qsTr
(
"
Continue
"
)
onButton1Hit
:
activity
.
home
();
onClose
:
{
background
.
audioDisabled
=
false
;
}
}
anchors.fill
:
parent
focus
:
true
active
:
background
.
audioDisabled
onStatusChanged
:
if
(
status
==
Loader
.
Ready
)
item
.
start
()
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment