2014-03-04 16:51:35 +08:00
|
|
|
|
|
|
|
#ifndef __TestCpp__CustomImageView__
|
|
|
|
#define __TestCpp__CustomImageView__
|
|
|
|
|
2014-03-05 21:18:51 +08:00
|
|
|
#include "gui/CocosGUI.h"
|
2014-03-04 16:51:35 +08:00
|
|
|
|
2014-03-07 15:36:45 +08:00
|
|
|
class CustomImageView : public cocos2d::ui::ImageView
|
2014-03-04 16:51:35 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CustomImageView();
|
|
|
|
~CustomImageView();
|
|
|
|
|
|
|
|
static CustomImageView* create();
|
2014-03-07 15:36:45 +08:00
|
|
|
static cocos2d::Ref* createInstance();
|
2014-03-04 16:51:35 +08:00
|
|
|
|
|
|
|
void setText(const std::string& text);
|
|
|
|
const std::string& getText() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual bool init() override;
|
|
|
|
virtual void initRenderer() override;
|
|
|
|
|
|
|
|
protected:
|
2014-03-07 15:36:45 +08:00
|
|
|
cocos2d::LabelTTF* _label;
|
2014-03-04 16:51:35 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* defined(__TestCpp__CustomImageView__) */
|