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){
|
||||
SliderEx *slider = dynamic_cast<SliderEx *>(sender);
|
||||
switch(event){
|
||||
case Slider::EventType::ON_PERCENTAGE_CHANGED:
|
||||
case Slider::EventType::ON_SLIDEBALL_DOWN:
|
||||
_updateTimeSlider = false;
|
||||
break;
|
||||
|
@ -340,6 +339,9 @@ bool AudioControlTest::init()
|
|||
}
|
||||
case Slider::EventType::ON_SLIDEBALL_CANCEL:
|
||||
_updateTimeSlider = true;
|
||||
case Slider::EventType::ON_PERCENTAGE_CHANGED:
|
||||
default:
|
||||
//ignore
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue