2014-12-01 21:50:05 +08:00
|
|
|
#include "CustomWidgetCallbackBindTest.h"
|
|
|
|
|
|
|
|
#include "../../CustomGUIScene.h"
|
|
|
|
#include "cocostudio/ActionTimeline/CSLoader.h"
|
2015-03-31 19:55:56 +08:00
|
|
|
#include "cocostudio/CocoStudio.h"
|
2014-12-01 21:50:05 +08:00
|
|
|
#include "base/ObjectFactory.h"
|
|
|
|
#include "CustomRootNode.h"
|
|
|
|
#include "CustomRootNodeReader.h"
|
|
|
|
|
|
|
|
USING_NS_CC;
|
|
|
|
using namespace flatbuffers;
|
|
|
|
|
|
|
|
// CustomWidgetCallbackBindScene
|
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
bool CustomWidgetCallbackBindScene::init()
|
2014-12-01 21:50:05 +08:00
|
|
|
{
|
2015-04-03 14:31:03 +08:00
|
|
|
if (TestCase::init())
|
|
|
|
{
|
|
|
|
CSLoader* instance = CSLoader::getInstance();
|
|
|
|
instance->registReaderObject("CustomRootNodeReader",
|
|
|
|
(ObjectFactory::Instance)CustomRootNodeReader::getInstance);
|
|
|
|
|
|
|
|
auto layer = CSLoader::createNode("cocosui/CustomTest/CustomWidgetCallbackBindTest/CustomWidgetCallbackBindTest.csb");
|
|
|
|
addChild(layer);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2014-12-01 21:50:05 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
return false;
|
2014-12-01 21:50:05 +08:00
|
|
|
}
|
|
|
|
|
2015-03-31 11:22:34 +08:00
|
|
|
void CustomWidgetCallbackBindScene::onExit()
|
|
|
|
{
|
2015-03-31 19:55:56 +08:00
|
|
|
cocostudio::destroyCocosStudio();
|
2015-03-31 11:22:34 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
TestCase::onExit();
|
2014-12-01 21:50:05 +08:00
|
|
|
}
|