From cf4b8c01633a142f097fda05c5b1cc4dbd209aad Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Sun, 15 Sep 2013 17:10:59 +0800 Subject: [PATCH] Add guy loading of scene --- extensions/CocoStudio/Reader/CCSSceneReader.cpp | 6 +++--- extensions/cocos-ext.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/CocoStudio/Reader/CCSSceneReader.cpp b/extensions/CocoStudio/Reader/CCSSceneReader.cpp index f0d25afef9..cc49a97398 100644 --- a/extensions/CocoStudio/Reader/CCSSceneReader.cpp +++ b/extensions/CocoStudio/Reader/CCSSceneReader.cpp @@ -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); diff --git a/extensions/cocos-ext.h b/extensions/cocos-ext.h index 9d5e3f0501..3e70ae7fde 100644 --- a/extensions/cocos-ext.h +++ b/extensions/cocos-ext.h @@ -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"