mirror of https://github.com/axmolengine/axmol.git
remove auto scale text
This commit is contained in:
parent
880929f102
commit
7b0f41ed7b
|
@ -548,10 +548,7 @@ void Button::normalTextureScaleChangedWithSize()
|
|||
_normalTextureScaleYInSize = scaleY;
|
||||
}
|
||||
}
|
||||
if (_titleRenderer->getString().size() > 0) {
|
||||
_titleRenderer->setScaleX(_titleRenderer->getScaleX() + _normalTextureScaleXInSize - 1.0);
|
||||
_titleRenderer->setScaleY(_titleRenderer->getScaleY() + _normalTextureScaleYInSize - 1.0);
|
||||
}
|
||||
|
||||
_buttonNormalRenderer->setPosition(_contentSize.width / 2.0f, _contentSize.height / 2.0f);
|
||||
}
|
||||
|
||||
|
|
|
@ -482,6 +482,7 @@ bool UIButtonTestSwitchScale9::init()
|
|||
"cocosui/animationbuttonpressed.png");
|
||||
button->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f));
|
||||
button->addTouchEventListener(CC_CALLBACK_2(UIButtonTestSwitchScale9::touchEvent, this));
|
||||
button->setTitleText("Button Title");
|
||||
button->ignoreContentAdaptWithSize(false);
|
||||
|
||||
_uiLayer->addChild(button);
|
||||
|
|
Loading…
Reference in New Issue