update for scrollView test

This commit is contained in:
Liam 2015-12-23 18:00:30 +08:00
parent 0cac519e5c
commit bcc2ed0e2a
4 changed files with 43 additions and 1 deletions

View File

@ -114,6 +114,7 @@ bool AppDelegate::applicationDidFinishLaunching()
searchPaths.push_back("ccs-res/hd/cocosui/UIEditorTest/UIScrollView/Both");
searchPaths.push_back("ccs-res/hd/cocosui/UIEditorTest/UIScrollView/Horizontal");
searchPaths.push_back("ccs-res/hd/cocosui/UIEditorTest/UIScrollView/Vertical");
searchPaths.push_back("ccs-res/hd/cocosui/UIEditorTest/UIScrollView/ScrollViewAndButton");
searchPaths.push_back("ccs-res/hd/cocosui/UIEditorTest/UISlider");
searchPaths.push_back("ccs-res/hd/cocosui/UIEditorTest/UITextField");
searchPaths.push_back("ccs-res/hd/cocosui/UIEditorTest/UIWidgetAddNode");
@ -155,6 +156,7 @@ bool AppDelegate::applicationDidFinishLaunching()
searchPaths.push_back("ccs-res/cocosui/UIEditorTest/UIScrollView/Both");
searchPaths.push_back("ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal");
searchPaths.push_back("ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical");
searchPaths.push_back("ccs-res/cocosui/UIEditorTest/UIScrollView/ScrollViewAndButton");
searchPaths.push_back("ccs-res/cocosui/UIEditorTest/UISlider");
searchPaths.push_back("ccs-res/cocosui/UIEditorTest/UITextField");
searchPaths.push_back("ccs-res/cocosui/UIEditorTest/UIWidgetAddNode");

View File

@ -11,6 +11,7 @@ UIScrollViewEditorTests::UIScrollViewEditorTests()
ADD_TEST_CASE(UIScrollViewTest_Both_Editor);
// ADD_TEST_CASE(UIScrollViewTest_ScrollToPercentBothDirection_Editor);
// ADD_TEST_CASE(UIScrollViewTest_ScrollToPercentBothDirection_Bounce_Editor);
ADD_TEST_CASE(UIScrollViewTest_ClippingWithNode);
}
// UIScrollViewTest_Vertical_Editor
@ -163,3 +164,29 @@ bool UIScrollViewTest_ScrollToPercentBothDirection_Bounce_Editor::init()
return false;
}
// UIScrollViewTest_Vertical_Editor
UIScrollViewTest_ClippingWithNode::UIScrollViewTest_ClippingWithNode()
{
}
UIScrollViewTest_ClippingWithNode::~UIScrollViewTest_ClippingWithNode()
{
}
bool UIScrollViewTest_ClippingWithNode::init()
{
if (UIScene_Editor::init())
{
Node* node = CSLoader::createNode("cocosui/UIEditorTest/UIScrollView/ScrollViewAndButton/MainScene.csb");
_layout = static_cast<Layout*>(node);
_touchGroup->addChild(_layout);
return true;
}
return false;
}

View File

@ -100,4 +100,17 @@ protected:
cocos2d::ui::Text* _displayValueLabel;
};
class UIScrollViewTest_ClippingWithNode : public UIScene_Editor
{
public:
CREATE_FUNC(UIScrollViewTest_ClippingWithNode);
UIScrollViewTest_ClippingWithNode();
~UIScrollViewTest_ClippingWithNode();
virtual bool init() override;
protected:
cocos2d::ui::Text* _displayValueLabel;
};
#endif /* defined(__TestCpp__UIScrollViewTest_Editor__) */

@ -1 +1 @@
Subproject commit bf3539cccfbeaa32e143fa07c73e4d1d715ab424
Subproject commit ed1fc877d3d58b1980d2602db68d14ce553ac0f9