mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6769 from ricardoquesada/interpolate_fix
default value is 0.5 for interpolation
This commit is contained in:
commit
0cfc7827de
|
@ -755,6 +755,7 @@ ui::Slider* ShaderMultiTexture::createSliderCtl()
|
||||||
slider->loadBarTexture("cocosui/sliderTrack.png");
|
slider->loadBarTexture("cocosui/sliderTrack.png");
|
||||||
slider->loadSlidBallTextures("cocosui/sliderThumb.png", "cocosui/sliderThumb.png", "");
|
slider->loadSlidBallTextures("cocosui/sliderThumb.png", "cocosui/sliderThumb.png", "");
|
||||||
slider->loadProgressBarTexture("cocosui/sliderProgress.png");
|
slider->loadProgressBarTexture("cocosui/sliderProgress.png");
|
||||||
|
slider->setPercent(50);
|
||||||
|
|
||||||
slider->setPosition(Vec2(screenSize.width / 2.0f, screenSize.height / 3.0f));
|
slider->setPosition(Vec2(screenSize.width / 2.0f, screenSize.height / 3.0f));
|
||||||
addChild(slider);
|
addChild(slider);
|
||||||
|
@ -801,7 +802,7 @@ bool ShaderMultiTexture::init()
|
||||||
_sprite->setGLProgramState(glprogramstate);
|
_sprite->setGLProgramState(glprogramstate);
|
||||||
|
|
||||||
glprogramstate->setUniformTexture("u_texture1", texture1);
|
glprogramstate->setUniformTexture("u_texture1", texture1);
|
||||||
|
glprogramstate->setUniformFloat("u_interpolate",0.5);
|
||||||
|
|
||||||
// slider
|
// slider
|
||||||
createSliderCtl();
|
createSliderCtl();
|
||||||
|
|
Loading…
Reference in New Issue