cococococos 2 d-Xノード(CCLabelAtlas.h)API
2367 ワード
本論文はhttp://blog.csdn.net/runaying ,引用は出典を明記しなければならない!
cococococos 2 d-Xノード(CCLabelAtlas.h)API
みなさんがよりよく勉強できるように、私のブログを見ることを強くおすすめします。 Cocos 2 d-X権威ガイドノート
cococococos 2 d-Xノード(CCLabelAtlas.h)API
みなさんがよりよく勉強できるように、私のブログを見ることを強くおすすめします。 Cocos 2 d-X権威ガイドノート
///cocos2d-x-3.0alpha0/cocos2dx/label_nodes
#ifndef __CCLABEL_ATLAS_H__
#define __CCLABEL_ATLAS_H__
#include "base_nodes/CCAtlasNode.h"
NS_CC_BEGIN
/**
* @addtogroup GUI
* @{
* @addtogroup label
* @{
*/
/** @brief LabelAtlas AtlasNode .
.
LabelAtlas Label:
- LabelAtlas Label
- LabelAtlas "characters" //
- LabelAtlas "characters" ,
LabelBMFont . , .
*/
class CC_DLL LabelAtlas : public AtlasNode, public LabelProtocol
{
public:
/**
* @js ctor
*/
LabelAtlas()
:_string("")
{}
/**
* @js NA
* @lua NA
*/
virtual ~LabelAtlas()
{
_string.clear();
}
/** 、 char map (the atlas)、 、 、 atlas LabelAtlas , */
static LabelAtlas * create(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
/** 、 LabelAtlas
@since v2.0
*/
static LabelAtlas* create(const char *string, const char *fntFile);
/** 、 char map (the atlas)、 、 、 atlas LabelAtlas*/
bool initWithString(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
/** 、 LabelAtlas
@since v2.0
*/
bool initWithString(const char *string, const char *fntFile);
/** 、 texture、 ( 、 atlas LabelAtlas */
bool initWithString(const char* string, Texture2D* texture, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap);
// super methods
virtual void updateAtlasValues();
virtual void setString(const char *label);
virtual const char* getString(void) const;
#if CC_LABELATLAS_DEBUG_DRAW
virtual void draw();
#endif
protected:
// string to render
std::string _string;
// the first char in the charmap
unsigned int _mapStartChar;
};
// end of GUI group
/// @}
/// @}
NS_CC_END
#endif //__CCLABEL_ATLAS_H__