Modify mk file and solve warnings

This commit is contained in:
CaiWenzhi 2014-03-06 16:15:03 +08:00
Родитель dc7abd07c0
Коммит bd5c11b5ee
32 изменённых файлов: 110 добавлений и 35 удалений

Просмотреть файл

@ -34,7 +34,7 @@ namespace cocostudio {
#define kCCSVersion 1.0
typedef void (Ref::*SEL_ParseEvent)(const std::string&, Ref*, const rapidjson::Value&);
typedef void (cocos2d::Ref::*SEL_ParseEvent)(const std::string&, cocos2d::Ref*, const rapidjson::Value&);
#define parseselector(_SELECTOR) (SEL_ParseEvent)(&_SELECTOR)
class GUIReader : public cocos2d::Ref

Просмотреть файл

@ -34,6 +34,20 @@ set(CS_SRC
TriggerBase.cpp
TriggerMng.cpp
TriggerObj.cpp
WidgetReader/WidgetReader.cpp
WidgetReader/ButtonReader/ButtonReader.cpp
WidgetReader/CheckBoxReader/CheckBoxReader.cpp
WidgetReader/ImageViewReader/ImageViewReader.cpp
WidgetReader/LayoutReader/LayoutReader.cpp
WidgetReader/ListViewReader/ListViewReader.cpp
WidgetReader/LoadingBarReader/LoadingBarReader.cpp
WidgetReader/PageViewReader/PageViewReader.cpp
WidgetReader/ScrollViewReader/ScrollViewReader.cpp
WidgetReader/SliderReader/SliderReader.cpp
WidgetReader/TextAtlasReader/TextAtlasReader.cpp
WidgetReader/TextBMFontReader/TextBMFontReader.cpp
WidgetReader/TextFieldReader/TextFieldReader.cpp
WidgetReader/TextReader/TextReader.cpp
)
include_directories(

Просмотреть файл

@ -3,6 +3,9 @@
#include "ButtonReader.h"
#include "gui/UIButton.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static ButtonReader* instanceButtonReader = NULL;

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static ButtonReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "CheckBoxReader.h"
#include "gui/UICheckBox.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static CheckBoxReader* instanceCheckBoxReader = NULL;

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static CheckBoxReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "ImageViewReader.h"
#include "gui/UIImageView.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static ImageViewReader* instanceImageViewReader = NULL;

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static ImageViewReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "LayoutReader.h"
#include "gui/UILayout.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static LayoutReader* instanceLayoutReader = NULL;
@ -28,7 +31,7 @@ namespace cocostudio
return instanceLayoutReader;
}
void LayoutReader::setPropsFromJsonDictionary(ui::Widget *widget, const rapidjson::Value &options)
void LayoutReader::setPropsFromJsonDictionary(Widget *widget, const rapidjson::Value &options)
{
WidgetReader::setPropsFromJsonDictionary(widget, options);

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static LayoutReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "ListViewReader.h"
#include "gui/UIListView.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static ListViewReader* instanceListViewReader = NULL;
@ -28,7 +31,7 @@ namespace cocostudio
return instanceListViewReader;
}
void ListViewReader::setPropsFromJsonDictionary(ui::Widget *widget, const rapidjson::Value &options)
void ListViewReader::setPropsFromJsonDictionary(Widget *widget, const rapidjson::Value &options)
{
ScrollViewReader::setPropsFromJsonDictionary(widget, options);

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static ListViewReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "LoadingBarReader.h"
#include "gui/UILoadingBar.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static LoadingBarReader* instanceLoadingBar = NULL;

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static LoadingBarReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "PageViewReader.h"
#include "gui/UIPageView.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static PageViewReader* instancePageViewReader = NULL;
@ -28,7 +31,7 @@ namespace cocostudio
return instancePageViewReader;
}
void PageViewReader::setPropsFromJsonDictionary(ui::Widget *widget, const rapidjson::Value &options)
void PageViewReader::setPropsFromJsonDictionary(Widget *widget, const rapidjson::Value &options)
{
LayoutReader::setPropsFromJsonDictionary(widget, options);
}

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static PageViewReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "ScrollViewReader.h"
#include "gui/UIScrollView.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static ScrollViewReader* instanceScrollViewReader = NULL;

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static ScrollViewReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "SliderReader.h"
#include "gui/UISlider.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static SliderReader* instanceSliderReader = NULL;

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static SliderReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "TextAtlasReader.h"
#include "gui/UITextAtlas.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static TextAtlasReader* instanceTextAtalsReader = NULL;

Просмотреть файл

@ -39,7 +39,7 @@ namespace cocostudio
static TextAtlasReader* getInstance();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "TextBMFontReader.h"
#include "gui/UITextBMFont.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static TextBMFontReader* instanceTextBMFontReader = NULL;

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static TextBMFontReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "TextFieldReader.h"
#include "gui/UITextField.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static TextFieldReader* instanceTextFieldReader = NULL;
@ -33,7 +36,7 @@ namespace cocostudio
WidgetReader::setPropsFromJsonDictionary(widget, options);
cocos2d::ui::TextField* textField = static_cast<cocos2d::ui::TextField*>(widget);
TextField* textField = static_cast<TextField*>(widget);
bool ph = DICTOOL->checkObjectExist_json(options, "placeHolder");
if (ph)
{

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static TextFieldReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -3,6 +3,9 @@
#include "TextReader.h"
#include "gui/UIText.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static TextReader* instanceTextReader = NULL;

Просмотреть файл

@ -40,7 +40,7 @@ namespace cocostudio
static TextReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -2,6 +2,9 @@
#include "WidgetReader.h"
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
static WidgetReader* instanceWidgetReader = NULL;
@ -32,7 +35,7 @@ namespace cocostudio
CC_SAFE_DELETE(instanceWidgetReader);
}
void WidgetReader::setPropsFromJsonDictionary(cocos2d::ui::Widget *widget, const rapidjson::Value &options)
void WidgetReader::setPropsFromJsonDictionary(Widget *widget, const rapidjson::Value &options)
{
bool ignoreSizeExsit = DICTOOL->checkObjectExist_json(options, "ignoreSize");
if (ignoreSizeExsit)
@ -145,7 +148,7 @@ namespace cocostudio
}
}
void WidgetReader::setColorPropsFromJsonDictionary(ui::Widget *widget, const rapidjson::Value &options)
void WidgetReader::setColorPropsFromJsonDictionary(Widget *widget, const rapidjson::Value &options)
{
bool op = DICTOOL->checkObjectExist_json(options, "opacity");
if (op)
@ -166,7 +169,7 @@ namespace cocostudio
widget->setAnchorPoint(Point(apxf, apyf));
bool flipX = DICTOOL->getBooleanValue_json(options, "flipX");
bool flipY = DICTOOL->getBooleanValue_json(options, "flipY");
widget->setFlipX(flipX);
widget->setFlipY(flipY);
widget->setFlippedX(flipX);
widget->setFlippedY(flipY);
}
}

Просмотреть файл

@ -32,7 +32,7 @@
namespace cocostudio
{
class WidgetReader : public Ref, public WidgetReaderProtocol
class WidgetReader : public cocos2d::Ref, public WidgetReaderProtocol
{
public:
DECLARE_CLASS_WIDGET_READER_INFO
@ -43,8 +43,8 @@ namespace cocostudio
static WidgetReader* getInstance();
static void purge();
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setColorPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options);
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
virtual void setColorPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
};
}

Просмотреть файл

@ -36,17 +36,13 @@ namespace cocos2d
}
}
USING_NS_CC;
using namespace ui;
namespace cocostudio
{
class WidgetReaderProtocol
{
public:
virtual ~WidgetReaderProtocol() {};
virtual void setPropsFromJsonDictionary(Widget* widget, const rapidjson::Value& options) = 0;
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options) = 0;
};
}

Просмотреть файл

@ -74,23 +74,46 @@ set(SAMPLE_SRC
Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp
Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/acts.cpp
Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/cons.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CocoStudioGUITest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.cpp
Classes/ExtensionsTest/CocoStudioGUITest/GUIEditorTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CustomGUIScene.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIScene.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UILabelAtlasTest/UILabelAtlasTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UILabelBMFontTest/UILabelBMFontTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UILabelTest/UILabelTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIScene_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomReader.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp
Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp
Classes/NewRendererTest/NewRendererTest.cpp
Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp