mirror of https://github.com/axmolengine/axmol.git
Merge pull request #19816 from PatriceJiang/fix_audio_engine_slider
[cpp-tests] bugfix NewAudioEngineTests slider callback
This commit is contained in:
commit
1445bca9b0
|
@ -328,7 +328,6 @@ bool AudioControlTest::init()
|
||||||
timeSlider->addEventListener([&](Ref* sender, Slider::EventType event){
|
timeSlider->addEventListener([&](Ref* sender, Slider::EventType event){
|
||||||
SliderEx *slider = dynamic_cast<SliderEx *>(sender);
|
SliderEx *slider = dynamic_cast<SliderEx *>(sender);
|
||||||
switch(event){
|
switch(event){
|
||||||
case Slider::EventType::ON_PERCENTAGE_CHANGED:
|
|
||||||
case Slider::EventType::ON_SLIDEBALL_DOWN:
|
case Slider::EventType::ON_SLIDEBALL_DOWN:
|
||||||
_updateTimeSlider = false;
|
_updateTimeSlider = false;
|
||||||
break;
|
break;
|
||||||
|
@ -340,6 +339,9 @@ bool AudioControlTest::init()
|
||||||
}
|
}
|
||||||
case Slider::EventType::ON_SLIDEBALL_CANCEL:
|
case Slider::EventType::ON_SLIDEBALL_CANCEL:
|
||||||
_updateTimeSlider = true;
|
_updateTimeSlider = true;
|
||||||
|
case Slider::EventType::ON_PERCENTAGE_CHANGED:
|
||||||
|
default:
|
||||||
|
//ignore
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue