Add guy loading of scene

This commit is contained in:
CaiWenzhi 2013-09-15 17:10:59 +08:00 committed by James Chen
parent 4843046d17
commit cf4b8c0163
2 changed files with 6 additions and 3 deletions

View File

@ -316,16 +316,16 @@ NS_CC_EXT_BEGIN
}
else if(comName != NULL && strcmp(comName, "GUIComponent") == 0)
{
/* cocos2d::extension::UILayer *pLayer = cocos2d::extension::UILayer::create();
cocos2d::extension::UILayer *pLayer = cocos2d::extension::UILayer::create();
pLayer->scheduleUpdate();
UIWidget* widget=cocos2d::extension::UIHelper::instance()->createWidgetFromJsonFile(pPath.c_str());
pLayer->addWidget(widget);
CCComRender *pRender = CCComRender::create(pLayer, "GUIComponent");
ComRender *pRender = ComRender::create(pLayer, "GUIComponent");
if (pComName != NULL)
{
pRender->setName(pComName);
}
gb->addComponent(pRender);*/
gb->addComponent(pRender);
}
CC_SAFE_DELETE(subDict);

View File

@ -72,10 +72,13 @@
#include "CocoStudio/Components/CCComController.h"
#include "CocoStudio/Components/CCComRender.h"
#include "CocoStudio/GUI/System/CocosGUI.h"
#include "CocoStudio/Json/CSContentJsonDictionary.h"
#include "CocoStudio/Json/DictionaryHelper.h"
#include "CocoStudio/Reader/CCSSceneReader.h"
#include "CocoStudio/Reader/CCSGUIReader.h"