2014-03-04 16:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
#include "CustomImageViewReader.h"
|
|
|
|
#include "CustomImageView.h"
|
|
|
|
|
2014-03-07 15:36:45 +08:00
|
|
|
USING_NS_CC;
|
|
|
|
USING_NS_CC_EXT;
|
|
|
|
using namespace cocos2d::ui;
|
|
|
|
using namespace cocostudio;
|
|
|
|
|
2014-07-10 00:45:27 +08:00
|
|
|
static CustomImageViewReader* _instanceCustomImageViewReader = nullptr;
|
2014-03-04 16:51:35 +08:00
|
|
|
|
|
|
|
CustomImageViewReader::CustomImageViewReader()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
CustomImageViewReader::~CustomImageViewReader()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
CustomImageViewReader* CustomImageViewReader::getInstance()
|
|
|
|
{
|
|
|
|
if (!_instanceCustomImageViewReader)
|
|
|
|
{
|
|
|
|
_instanceCustomImageViewReader = new CustomImageViewReader();
|
|
|
|
}
|
|
|
|
return _instanceCustomImageViewReader;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CustomImageViewReader::setProperties(const std::string& classType, cocos2d::ui::Widget *widget, const rapidjson::Value &customOptions)
|
|
|
|
{
|
|
|
|
CustomImageView* custom = static_cast<CustomImageView*>(widget);
|
|
|
|
|
|
|
|
const char* StringTest = DICTOOL->getStringValue_json(customOptions, "StringTest");
|
|
|
|
custom->setText(StringTest);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|