submarine: Fix Vanne animations not working from keyboard controls
ClosedPublic

Authored by rudranilbasu on Dec 22 2017, 10:37 AM.

Details

Summary

Since most of the Animation Components attached to each of the Vannes of the
Ballast tanks do the same function, it is replaced with two functions ballastTankOnAnim
and ballastTankOffAnim, which is called via the updateVannes() function.

The updateVannes() function is also called from Submarine.qml, to fix the error of
the animations not being called via the keyboard controls.

Also fixed Vannes' state not updating on level changes by adding a reset() method
which sets the angle of the visible Vannes to zero

rotateLeftFill.angle = 0
rotateLeftFlush.angle = 0

rotateCentralFill.angle = 0
rotateCentralFlush.angle = 0

rotateRightFill.angle = 0
rotateRightFlush.angle = 0

Diff Detail

Repository
R2 GCompris
Lint
Lint Skipped
Unit
Unit Tests Skipped
rudranilbasu created this revision.Dec 22 2017, 10:37 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptDec 22 2017, 10:37 AM
Restricted Application added a subscriber: KDE Edu. · View Herald Transcript
rudranilbasu requested review of this revision.Dec 22 2017, 10:37 AM
jjazeix added inline comments.Jan 12 2018, 2:05 PM
src/activities/submarine/Controls.qml
43

all of these information are the same for the 3 ballasts. Is there a way to factorise it too?

jjazeix requested changes to this revision.Mar 10 2018, 1:59 PM
This revision now requires changes to proceed.Mar 10 2018, 1:59 PM
timotheegiet accepted this revision.Mar 10 2018, 4:04 PM

Good enough to go, thank you

jjazeix accepted this revision.Mar 10 2018, 4:08 PM
This revision is now accepted and ready to land.Mar 10 2018, 4:08 PM
timotheegiet closed this revision.Mar 10 2018, 4:09 PM