diff --git a/cocos/ui/UIButton.cpp b/cocos/ui/UIButton.cpp index 3188c512e2..f7e92b5f90 100644 --- a/cocos/ui/UIButton.cpp +++ b/cocos/ui/UIButton.cpp @@ -364,7 +364,7 @@ void Button::onPressStateChangedToNormal() { _buttonNormalRenderer->stopAllActions(); _buttonClickedRenderer->stopAllActions(); - Action *zoomAction = ScaleTo::create(0.05f, _normalTextureScaleXInSize, _normalTextureScaleYInSize); + Action *zoomAction = ScaleTo::create(ZOOM_ACTION_TIME_STEP, _normalTextureScaleXInSize, _normalTextureScaleYInSize); _buttonNormalRenderer->runAction(zoomAction); _buttonClickedRenderer->setScale(_pressedTextureScaleXInSize, _pressedTextureScaleYInSize); @@ -394,7 +394,7 @@ void Button::onPressStateChangedToPressed() { _buttonNormalRenderer->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); _buttonNormalRenderer->setScale(_pressedTextureScaleXInSize + _zoomScale, _pressedTextureScaleYInSize + _zoomScale); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp index 7d3917246e..265af8be64 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp @@ -277,7 +277,7 @@ bool UITextFieldTest_LineWrap::init() textField->ignoreContentAdaptWithSize(false); ((Label*)(textField->getVirtualRenderer()))->setLineBreakWithoutSpace(true); textField->setContentSize(Size(240, 170)); - textField->setText("input words here"); + textField->setString("input words here"); textField->setTextHorizontalAlignment(TextHAlignment::CENTER); textField->setTextVerticalAlignment(TextVAlignment::CENTER); textField->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f));