diff --git a/cocos/ui/UIButton.cpp b/cocos/ui/UIButton.cpp index dbb8fdc768..c1a92fbfe0 100644 --- a/cocos/ui/UIButton.cpp +++ b/cocos/ui/UIButton.cpp @@ -187,6 +187,10 @@ void Button::setScale9Enabled(bool able) _brightStyle = BrightStyle::NONE; setBright(_bright); + + _normalTextureAdaptDirty = true; + _pressedTextureAdaptDirty = true; + _disabledTextureAdaptDirty = true; } bool Button::isScale9Enabled()const diff --git a/cocos/ui/UIImageView.cpp b/cocos/ui/UIImageView.cpp index 11c127f2ba..ff8296ae69 100644 --- a/cocos/ui/UIImageView.cpp +++ b/cocos/ui/UIImageView.cpp @@ -186,6 +186,7 @@ void ImageView::setScale9Enabled(bool able) ignoreContentAdaptWithSize(_prevIgnoreSize); } setCapInsets(_capInsets); + _imageRendererAdaptDirty = true; } bool ImageView::isScale9Enabled()const diff --git a/cocos/ui/UILoadingBar.cpp b/cocos/ui/UILoadingBar.cpp index aa610196ac..917a07e3ed 100644 --- a/cocos/ui/UILoadingBar.cpp +++ b/cocos/ui/UILoadingBar.cpp @@ -217,6 +217,7 @@ void LoadingBar::setScale9Enabled(bool enabled) } setCapInsets(_capInsets); setPercent(_percent); + _barRendererAdaptDirty = true; } bool LoadingBar::isScale9Enabled()const @@ -334,6 +335,7 @@ void LoadingBar::barRendererScaleChangedWithSize() if (_scale9Enabled) { setScale9Scale(); + _barRenderer->setScale(1.0f); } else { diff --git a/cocos/ui/UISlider.cpp b/cocos/ui/UISlider.cpp index 5ed1308f86..0547752e4e 100644 --- a/cocos/ui/UISlider.cpp +++ b/cocos/ui/UISlider.cpp @@ -40,6 +40,7 @@ IMPLEMENT_CLASS_GUI_INFO(Slider) Slider::Slider(): _barRenderer(nullptr), _progressBarRenderer(nullptr), +_barTextureSize(Size::ZERO), _progressBarTextureSize(Size::ZERO), _slidBallNormalRenderer(nullptr), _slidBallPressedRenderer(nullptr), @@ -168,6 +169,7 @@ void Slider::loadBarTexture(const std::string& fileName, TextureResType texType) _barRendererAdaptDirty = true; _progressBarRendererDirty = true; updateContentSizeWithTextureSize(_barRenderer->getContentSize()); + _barTextureSize = _barRenderer->getContentSize(); } void Slider::loadProgressBarTexture(const std::string& fileName, TextureResType texType) @@ -218,6 +220,8 @@ void Slider::setScale9Enabled(bool able) } setCapInsetsBarRenderer(_capInsetsBarRenderer); setCapInsetProgressBarRebderer(_capInsetsProgressBarRenderer); + _barRendererAdaptDirty = true; + _progressBarRendererDirty = true; } bool Slider::isScale9Enabled()const @@ -508,10 +512,11 @@ void Slider::barRendererScaleChangedWithSize() if (_scale9Enabled) { _barRenderer->setPreferredSize(_contentSize); + _barRenderer->setScale(1.0f); } else { - Size btextureSize = _barRenderer->getContentSize(); + Size btextureSize = _barTextureSize; if (btextureSize.width <= 0.0f || btextureSize.height <= 0.0f) { _barRenderer->setScale(1.0f); diff --git a/cocos/ui/UISlider.h b/cocos/ui/UISlider.h index 1a57245fad..1262cea4e3 100644 --- a/cocos/ui/UISlider.h +++ b/cocos/ui/UISlider.h @@ -245,6 +245,7 @@ protected: protected: Scale9Sprite* _barRenderer; Scale9Sprite* _progressBarRenderer; + Size _barTextureSize; Size _progressBarTextureSize; Sprite* _slidBallNormalRenderer; diff --git a/cocos/ui/UIWidget.cpp b/cocos/ui/UIWidget.cpp index afb98bf8f8..d99e0a8042 100644 --- a/cocos/ui/UIWidget.cpp +++ b/cocos/ui/UIWidget.cpp @@ -465,6 +465,10 @@ void Widget::ignoreContentAdaptWithSize(bool ignore) this->setContentSize(_customSize); return; } + if (_ignoreSize == ignore) + { + return; + } _ignoreSize = ignore; if (_ignoreSize) { diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp index 882bdcd2b6..a349aec452 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp @@ -184,6 +184,88 @@ void UIButtonTest_Scale9::touchEvent(Ref *pSender, Widget::TouchEventType type) } } +// UIButtonTest_Scale9_State_Change +UIButtonTest_Scale9_State_Change::UIButtonTest_Scale9_State_Change() + : _displayValueLabel(nullptr) +{ + +} + +UIButtonTest_Scale9_State_Change::~UIButtonTest_Scale9_State_Change() +{ + +} + +bool UIButtonTest_Scale9_State_Change::init() +{ + if (UIScene::init()) + { + Size widgetSize = _widget->getContentSize(); + + // Add a label in which the button events will be displayed + _displayValueLabel = Text::create("No Event", "fonts/Marker Felt.ttf", 32); + _displayValueLabel->setAnchorPoint(Vec2(0.5f, -1.0f)); + _displayValueLabel->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f)); + _uiLayer->addChild(_displayValueLabel); + + // Add the alert + Text* alert = Text::create("Button scale9 render", "fonts/Marker Felt.ttf", 30); + alert->setColor(Color3B(159, 168, 176)); + alert->setPosition(Vec2(widgetSize.width / 2.0f, + widgetSize.height / 2.0f - alert->getContentSize().height * 1.75f)); + _uiLayer->addChild(alert); + + // Create the button + Button* button = Button::create("cocosui/backtotopnormal.png", "cocosui/backtotoppressed.png"); + // open scale9 render + button->ignoreContentAdaptWithSize(false); + button->setScale9Enabled(true); + button->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f)); + button->setContentSize(Size(200, 60)); + button->setCapInsets(Rect(30,10,40,20)); + button->setPressedActionEnabled(false); + button->addTouchEventListener(CC_CALLBACK_2(UIButtonTest_Scale9_State_Change::touchEvent, this)); + _uiLayer->addChild(button); + + return true; + } + return false; +} + +void UIButtonTest_Scale9_State_Change::touchEvent(Ref *pSender, Widget::TouchEventType type) +{ + switch (type) + { + case Widget::TouchEventType::BEGAN: + _displayValueLabel->setString(String::createWithFormat("Touch Down")->getCString()); + break; + + case Widget::TouchEventType::MOVED: + _displayValueLabel->setString(String::createWithFormat("Touch Move")->getCString()); + break; + + case Widget::TouchEventType::ENDED: + { + _displayValueLabel->setString(String::createWithFormat("Touch Up")->getCString()); + Button *btn = (Button*)pSender; + if (btn->isScale9Enabled()) + { + btn->setScale9Enabled(false); + } + else + btn->setScale9Enabled(true); + } + break; + + case Widget::TouchEventType::CANCELED: + _displayValueLabel->setString(String::createWithFormat("Touch Cancelled")->getCString()); + break; + + default: + break; + } +} + // UIButtonTest_PressAction UIButtonTest_PressedAction::UIButtonTest_PressedAction() : _displayValueLabel(nullptr) diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h index 54951fe366..485c70d0db 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h @@ -53,6 +53,19 @@ protected: Text* _displayValueLabel; }; +class UIButtonTest_Scale9_State_Change : public UIScene +{ +public: + UIButtonTest_Scale9_State_Change(); + ~UIButtonTest_Scale9_State_Change(); + bool init(); + void touchEvent(Ref *pSender, Widget::TouchEventType type); + +protected: + UI_SCENE_CREATE_FUNC(UIButtonTest_Scale9_State_Change) + Text* _displayValueLabel; +}; + class UIButtonTest_PressedAction : public UIScene { public: diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp index 3228d57abf..e6c458d474 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp @@ -62,6 +62,50 @@ bool UIImageViewTest_Scale9::init() return false; } +// UIImageViewTest_Scale9_State_Change + +bool UIImageViewTest_Scale9_State_Change::init() +{ + if (UIScene::init()) + { + Size widgetSize = _widget->getContentSize(); + + Text* alert = Text::create("Click The Image", "fonts/Marker Felt.ttf", 26); + alert->setColor(Color3B(159, 168, 176)); + alert->setPosition(Vec2(widgetSize.width / 2.0f, + widgetSize.height / 2.0f - alert->getContentSize().height * 2.125f)); + + _uiLayer->addChild(alert); + + // Create the imageview + ImageView* imageView = ImageView::create("cocosui/ccicon.png"); + imageView->ignoreContentAdaptWithSize(false); + imageView->setScale9Enabled(true); + imageView->setContentSize(Size(100, 100)); + imageView->setCapInsets(Rect(20,20,20,20)); + imageView->setPosition(Vec2(widgetSize.width / 2.0f, + widgetSize.height / 2.0f)); + + imageView->setTouchEnabled(true); + imageView->addTouchEventListener([=](Ref* sender, Widget::TouchEventType type){ + if (type == Widget::TouchEventType::ENDED) { + if (imageView->isScale9Enabled()) + { + imageView->setScale9Enabled(false); + } + else + imageView->setScale9Enabled(true); + } + }); + + _uiLayer->addChild(imageView); + + return true; + } + return false; +} + + // UIImageViewTest_ContentSize bool UIImageViewTest_ContentSize::init() diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h index 6ed85b932f..cf78b366ee 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h @@ -45,6 +45,15 @@ protected: UI_SCENE_CREATE_FUNC(UIImageViewTest_Scale9) }; +class UIImageViewTest_Scale9_State_Change : public UIScene +{ +public: + bool init(); + +protected: + UI_SCENE_CREATE_FUNC(UIImageViewTest_Scale9_State_Change) +}; + class UIImageViewTest_ContentSize : public UIScene { public: diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp index d35da4c331..94e1062365 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp @@ -339,3 +339,61 @@ void UILoadingBarTest_Right_Scale9::nextCallback(Ref* sender, Widget::TouchEvent UIScene::nextCallback(sender, type); } } + + +// UILoadingBarTest_Scale9_State_Change + +UILoadingBarTest_Scale9_State_Change::UILoadingBarTest_Scale9_State_Change() + : _count(0) +{ + +} + +UILoadingBarTest_Scale9_State_Change::~UILoadingBarTest_Scale9_State_Change() +{ + +} + +bool UILoadingBarTest_Scale9_State_Change::init() +{ + if (UIScene::init()) + { + Size widgetSize = _widget->getContentSize(); + + // Add the alert + Text *alert = Text::create("LoadingBar right scale9 render", "fonts/Marker Felt.ttf", 20); + alert->setColor(Color3B(159, 168, 176)); + alert->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f - alert->getContentSize().height * 2.7f)); + _uiLayer->addChild(alert); + + // Create the loading bar + LoadingBar* loadingBar = LoadingBar::create("cocosui/sliderThumb.png"); + loadingBar->setTag(0); + loadingBar->ignoreContentAdaptWithSize(false); + //loadingBar->setScale9Enabled(true); + loadingBar->setCapInsets(Rect(0, 0, 0, 0)); + loadingBar->setContentSize(Size(200, 80)); + loadingBar->setDirection(LoadingBar::Direction::LEFT); + loadingBar->setPercent(100); + + loadingBar->setTouchEnabled(true); + loadingBar->addTouchEventListener([=](Ref* sender, Widget::TouchEventType type){ + if (type == Widget::TouchEventType::ENDED) { + if (loadingBar->isScale9Enabled()) + { + loadingBar->setScale9Enabled(false); + } + else + loadingBar->setScale9Enabled(true); + } + }); + + loadingBar->setPosition(Vec2(widgetSize.width / 2.0f, + widgetSize.height / 2.0f + loadingBar->getContentSize().height / 4.0f)); + + _uiLayer->addChild(loadingBar); + + return true; + } + return false; +} \ No newline at end of file diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h index 7bb1406672..c6c8a4d56a 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h @@ -95,4 +95,16 @@ protected: int _count; }; +class UILoadingBarTest_Scale9_State_Change : public UIScene +{ +public: + UILoadingBarTest_Scale9_State_Change(); + ~UILoadingBarTest_Scale9_State_Change(); + bool init(); + +protected: + UI_SCENE_CREATE_FUNC(UILoadingBarTest_Scale9_State_Change) + int _count; +}; + #endif /* defined(__TestCpp__UILoadingBarTest__) */ diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp index 1eea8a741a..5de0885b90 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp @@ -36,6 +36,7 @@ static const char* s_testArray[] = { "UIButtonTest", "UIButtonTest_Scale9", + "UIButtonTest_Scale9_State_Change", "UIButtonTest_PressedAction", "UIButtonTest_Title", "UIButtonTest_RemoveSelf", @@ -55,16 +56,19 @@ static const char* s_testArray[] = "UICheckBoxDefaultBehaviorTest", "UISliderTest", "UISliderTest_Scale9", + "UISliderTest_Scale9_Stata_Change", "UISliderNormalDefaultTest", "UISliderDisabledDefaultTest", "UIImageViewTest", "UIImageViewTest_Scale9", + "UIImageViewTest_Scale9_State_Change", "UIImageViewTest_ContentSize", "UIImageViewFlipTest", "UILoadingBarTest_Left", "UILoadingBarTest_Right", + "UILoadingBarTest_Scale9_State_Change", "UILoadingBarTest_Left_Scale9", "UILoadingBarTest_Right_Scale9", @@ -210,6 +214,8 @@ Scene *UISceneManager::currentUIScene() case kUIButtonTest_Scale9: return UIButtonTest_Scale9::sceneWithTitle(s_testArray[_currentUISceneId]); + case kUIButtonTest_Scale9_State_Change: + return UIButtonTest_Scale9_State_Change::sceneWithTitle(s_testArray[_currentUISceneId]); case kUIButtonTest_PressedAction: return UIButtonTest_PressedAction::sceneWithTitle(s_testArray[_currentUISceneId]); @@ -245,6 +251,8 @@ Scene *UISceneManager::currentUIScene() case kUISliderTest_Scale9: return UISliderTest_Scale9::sceneWithTitle(s_testArray[_currentUISceneId]); + case kUISliderTest_Scale9_State_Change: + return UISliderTest_Scale9_State_Change::sceneWithTitle(s_testArray[_currentUISceneId]); case kUISliderNormalDefaultTest: return UISliderNormalDefaultTest::sceneWithTitle(s_testArray[_currentUISceneId]); case kUISliderDisabledDefaultTest: @@ -255,6 +263,8 @@ Scene *UISceneManager::currentUIScene() case kUIImageViewTest_Scale9: return UIImageViewTest_Scale9::sceneWithTitle(s_testArray[_currentUISceneId]); + case kUIImageViewTest_Scale9_State_Change: + return UIImageViewTest_Scale9_State_Change::sceneWithTitle(s_testArray[_currentUISceneId]); case kUIImageViewTest_ContentSize: return UIImageViewTest_ContentSize::sceneWithTitle(s_testArray[_currentUISceneId]); case kUIImageViewFlipTest: @@ -266,6 +276,9 @@ Scene *UISceneManager::currentUIScene() case kUILoadingBarTest_Right: return UILoadingBarTest_Right::sceneWithTitle(s_testArray[_currentUISceneId]); + case kUILoadingBarTest_Scale9_State_Change: + return UILoadingBarTest_Scale9_State_Change::sceneWithTitle(s_testArray[_currentUISceneId]); + case kUILoadingBarTest_Left_Scale9: return UILoadingBarTest_Left_Scale9::sceneWithTitle(s_testArray[_currentUISceneId]); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h index d50545ff7d..f0613a2680 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h @@ -33,6 +33,7 @@ enum { kUIButtonTest = 0, kUIButtonTest_Scale9, + kUIButtonTest_Scale9_State_Change, kUIButtonTest_PressedAction, kUIButtonTest_Title, kUIButtonTest_RemoveSelf, @@ -51,15 +52,18 @@ enum kUICheckBoxDefaultBehaviorTest, kUISliderTest, kUISliderTest_Scale9, + kUISliderTest_Scale9_State_Change, kUISliderNormalDefaultTest, kUISliderDisabledDefaultTest, kUIImageViewTest, kUIImageViewTest_Scale9, + kUIImageViewTest_Scale9_State_Change, kUIImageViewTest_ContentSize, kUIImageViewFlipTest, kUILoadingBarTest_Left, kUILoadingBarTest_Right, + kUILoadingBarTest_Scale9_State_Change, kUILoadingBarTest_Left_Scale9, kUILoadingBarTest_Right_Scale9, kUITextAtlasTest, diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp index 708f1719da..7ba93aea87 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp @@ -116,6 +116,73 @@ void UISliderTest_Scale9::sliderEvent(Ref *pSender, Slider::EventType type) } } +// UISliderTest_Scale9_State_Change + +UISliderTest_Scale9_State_Change::UISliderTest_Scale9_State_Change() + : _displayValueLabel(nullptr) +{ + +} + +UISliderTest_Scale9_State_Change::~UISliderTest_Scale9_State_Change() +{ +} + +bool UISliderTest_Scale9_State_Change::init() +{ + if (UIScene::init()) + { + Size widgetSize = _widget->getContentSize(); + + // Add a label in which the slider alert will be displayed + _displayValueLabel = Text::create("Click the slider thumb", "fonts/Marker Felt.ttf", 32); + _displayValueLabel->setAnchorPoint(Vec2(0.5f, -1)); + _displayValueLabel->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f)); + _uiLayer->addChild(_displayValueLabel); + + // Add the alert + Text *alert = Text::create("Slider scale9 render", "fonts/Marker Felt.ttf", 30); + alert->setColor(Color3B(159, 168, 176)); + alert->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f - alert->getContentSize().height * 1.75f)); + _uiLayer->addChild(alert); + + // Create the slider + Slider* slider = Slider::create(); + slider->loadBarTexture("cocosui/sliderballnormal.png"); + slider->loadSlidBallTextures("cocosui/sliderThumb.png", "cocosui/sliderThumb.png", ""); + slider->loadProgressBarTexture("cocosui/slider_bar_active_9patch.png"); + slider->ignoreContentAdaptWithSize(false); + slider->setScale9Enabled(true); + slider->setCapInsets(Rect(0, 0, 0, 0)); + slider->setContentSize(Size(200.0f, 60)); + slider->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f/* + slider->getSize().height * 3.0f*/)); + slider->addTouchEventListener([=](Ref* sender, Widget::TouchEventType type){ + if (type == Widget::TouchEventType::ENDED) { + if (slider->isScale9Enabled()) + { + slider->setScale9Enabled(false); + } + else + slider->setScale9Enabled(true); + } + }); + _uiLayer->addChild(slider); + + + return true; + } + return false; +} + +void UISliderTest_Scale9_State_Change::sliderEvent(Ref *pSender, Slider::EventType type) +{ + if (type == Slider::EventType::ON_PERCENTAGE_CHANGED) + { + Slider* slider = dynamic_cast(pSender); + int percent = slider->getPercent(); + _displayValueLabel->setString(String::createWithFormat("Percent %d", percent)->getCString()); + } +} // UISliderNormalDefaultTest diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.h index 6395f63339..0d9f4865c5 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.h @@ -53,6 +53,19 @@ protected: Text* _displayValueLabel; }; +class UISliderTest_Scale9_State_Change : public UIScene +{ +public: + UISliderTest_Scale9_State_Change(); + ~UISliderTest_Scale9_State_Change(); + bool init(); + void sliderEvent(Ref* pSender, Slider::EventType type); + +protected: + UI_SCENE_CREATE_FUNC(UISliderTest_Scale9_State_Change) + Text* _displayValueLabel; +}; + class UISliderNormalDefaultTest : public UIScene {