本文来自http://blog.csdn.net/runaying ,引用必须注明出处!
cocos2d-X 节点(UILabelBMFont.h)API
温馨提醒:为了大家能更好学习,强烈推荐大家看看本人的这篇博客 Cocos2d-X权威指南笔记
///cocos2d-x-3.0alpha0/extensions/CocoStudio/GUI/UIWidgets
#ifndef __UILABELBMFONT_H__
#define __UILABELBMFONT_H__
#include "../BaseClasses/UIWidget.h"
NS_CC_EXT_BEGIN
class UILabelBMFont : public UIWidget
{
public:
/**
* Default constructor
*/
UILabelBMFont();
/**
* Default destructor
*/
virtual ~UILabelBMFont();
/**
* Allocates and initializes.
*/
static UILabelBMFont* create();
/** 使用 初始字符串和FNT文件 初始化一个 bitmap font atlas */
void setFntFile(const char* fileName);
/** set string value for labelbmfont*/
void setText(const char* value);
/** get string value for labelbmfont*/
const char* getStringValue();
virtual void setAnchorPoint(const Point &pt);
virtual const Size& getContentSize() const;
virtual Node* getVirtualRenderer();
/**
* Returns the "class name" of widget. //返回 widget的 名字
*/
virtual const char* getDescription() const;
protected:
virtual void initRenderer();
virtual void onSizeChanged();
void labelBMFontScaleChangedWithSize();
protected:
LabelBMFont* _labelBMFontRenderer;
bool _fntFileHasInit;
};
NS_CC_EXT_END
#endif /* defined(__UILabelBMFont__) */