mirror of https://github.com/axmolengine/axmol.git
32 lines
595 B
C
32 lines
595 B
C
|
|
||
|
#ifndef __TestCpp__CustomImageView__
|
||
|
#define __TestCpp__CustomImageView__
|
||
|
|
||
|
#include "CocosGUI.h"
|
||
|
|
||
|
USING_NS_CC;
|
||
|
using namespace cocos2d::ui;
|
||
|
|
||
|
class CustomImageView : public ImageView
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
CustomImageView();
|
||
|
~CustomImageView();
|
||
|
|
||
|
static CustomImageView* create();
|
||
|
static Ref* createInstance();
|
||
|
|
||
|
void setText(const std::string& text);
|
||
|
const std::string& getText() const;
|
||
|
|
||
|
protected:
|
||
|
virtual bool init() override;
|
||
|
virtual void initRenderer() override;
|
||
|
|
||
|
protected:
|
||
|
LabelTTF* _label;
|
||
|
};
|
||
|
|
||
|
#endif /* defined(__TestCpp__CustomImageView__) */
|