remove auto scale text

This commit is contained in:
andyque 2014-09-15 09:28:56 +08:00
parent 880929f102
commit 7b0f41ed7b
2 changed files with 2 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);