mirror of https://github.com/axmolengine/axmol.git
udpate for ui button state change event
This commit is contained in:
parent
57e6631918
commit
19ed3d1965
|
@ -435,7 +435,15 @@ void Button::onPressStateChangedToNormal()
|
|||
_buttonClickedRenderer->setScale(_pressedTextureScaleXInSize, _pressedTextureScaleYInSize);
|
||||
|
||||
_titleRenderer->stopAllActions();
|
||||
_titleRenderer->runAction(zoomAction->clone());
|
||||
if (_unifySize)
|
||||
{
|
||||
Action *zoomTitleAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, 1, 1);
|
||||
_titleRenderer->runAction(zoomTitleAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
_titleRenderer->runAction(zoomAction->clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -483,6 +491,15 @@ void Button::onPressStateChangedToPressed()
|
|||
_titleRenderer->stopAllActions();
|
||||
//we must call zoomAction->clone here
|
||||
_titleRenderer->runAction(zoomAction->clone());
|
||||
if (_unifySize)
|
||||
{
|
||||
Action *zoomTitleAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, 1 + _zoomScale, 1 + _zoomScale);
|
||||
_titleRenderer->runAction(zoomTitleAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
_titleRenderer->runAction(zoomAction->clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue