2014-03-04 16:51:35 +08:00
|
|
|
#include "UITextTest_Editor.h"
|
2014-03-11 17:13:54 +08:00
|
|
|
#include "ui/CocosGUI.h"
|
2014-03-04 16:51:35 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
UITextEditorTests::UITextEditorTests()
|
2014-07-01 15:47:40 +08:00
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
ADD_TEST_CASE(UITextTest_Editor);
|
2014-07-01 15:47:40 +08:00
|
|
|
}
|
2015-04-03 14:31:03 +08:00
|
|
|
// UITextTest_Editor
|
|
|
|
using namespace ui;
|
2014-07-01 15:47:40 +08:00
|
|
|
|
|
|
|
bool UITextTest_Editor::init()
|
|
|
|
{
|
|
|
|
if (UIScene_Editor::init())
|
|
|
|
{
|
2014-10-18 14:48:27 +08:00
|
|
|
Node* node = CSLoader::createNode("cocosui/UIEditorTest/UILabel/crossplatform_UILabel_Editor_1.csb");
|
2014-10-10 10:44:16 +08:00
|
|
|
Node* child = node->getChildByTag(5);
|
|
|
|
child->removeFromParent();
|
|
|
|
_layout = static_cast<Layout*>(child);
|
2014-07-01 15:47:40 +08:00
|
|
|
_touchGroup->addChild(_layout);
|
2014-10-10 10:44:16 +08:00
|
|
|
|
2014-07-01 15:47:40 +08:00
|
|
|
this->configureGUIScene();
|
2014-10-10 10:44:16 +08:00
|
|
|
|
2014-03-04 16:51:35 +08:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2014-03-11 17:13:54 +08:00
|
|
|
}
|