mirror of https://github.com/axmolengine/axmol.git
fix UI related warnings
This commit is contained in:
parent
cc221e5e16
commit
030fe34afa
|
@ -364,7 +364,7 @@ void Button::onPressStateChangedToNormal()
|
||||||
{
|
{
|
||||||
_buttonNormalRenderer->stopAllActions();
|
_buttonNormalRenderer->stopAllActions();
|
||||||
_buttonClickedRenderer->stopAllActions();
|
_buttonClickedRenderer->stopAllActions();
|
||||||
Action *zoomAction = ScaleTo::create(0.05f, _normalTextureScaleXInSize, _normalTextureScaleYInSize);
|
Action *zoomAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, _normalTextureScaleXInSize, _normalTextureScaleYInSize);
|
||||||
_buttonNormalRenderer->runAction(zoomAction);
|
_buttonNormalRenderer->runAction(zoomAction);
|
||||||
_buttonClickedRenderer->setScale(_pressedTextureScaleXInSize, _pressedTextureScaleYInSize);
|
_buttonClickedRenderer->setScale(_pressedTextureScaleXInSize, _pressedTextureScaleYInSize);
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ void Button::onPressStateChangedToPressed()
|
||||||
{
|
{
|
||||||
_buttonNormalRenderer->stopAllActions();
|
_buttonNormalRenderer->stopAllActions();
|
||||||
_buttonClickedRenderer->stopAllActions();
|
_buttonClickedRenderer->stopAllActions();
|
||||||
Action *zoomAction = ScaleTo::create(0.05f, _pressedTextureScaleXInSize + _zoomScale, _pressedTextureScaleYInSize + _zoomScale);
|
Action *zoomAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, _pressedTextureScaleXInSize + _zoomScale, _pressedTextureScaleYInSize + _zoomScale);
|
||||||
_buttonClickedRenderer->runAction(zoomAction);
|
_buttonClickedRenderer->runAction(zoomAction);
|
||||||
_buttonNormalRenderer->setScale(_pressedTextureScaleXInSize + _zoomScale, _pressedTextureScaleYInSize + _zoomScale);
|
_buttonNormalRenderer->setScale(_pressedTextureScaleXInSize + _zoomScale, _pressedTextureScaleYInSize + _zoomScale);
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ bool UITextFieldTest_LineWrap::init()
|
||||||
textField->ignoreContentAdaptWithSize(false);
|
textField->ignoreContentAdaptWithSize(false);
|
||||||
((Label*)(textField->getVirtualRenderer()))->setLineBreakWithoutSpace(true);
|
((Label*)(textField->getVirtualRenderer()))->setLineBreakWithoutSpace(true);
|
||||||
textField->setContentSize(Size(240, 170));
|
textField->setContentSize(Size(240, 170));
|
||||||
textField->setText("input words here");
|
textField->setString("input words here");
|
||||||
textField->setTextHorizontalAlignment(TextHAlignment::CENTER);
|
textField->setTextHorizontalAlignment(TextHAlignment::CENTER);
|
||||||
textField->setTextVerticalAlignment(TextVAlignment::CENTER);
|
textField->setTextVerticalAlignment(TextVAlignment::CENTER);
|
||||||
textField->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f));
|
textField->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f));
|
||||||
|
|
Loading…
Reference in New Issue