mirror of https://github.com/axmolengine/axmol.git
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
|
|
enum {
|
|
kCCLabelAutomaticWidth = -1,
|
|
};
|
|
|
|
class CCLabelBMFont : public CCSpriteBatchNode
|
|
{
|
|
CCLabelBMFont();
|
|
~CCLabelBMFont();
|
|
bool init();
|
|
void setString(const char *label);
|
|
void setString(const char *label, bool fromUpdate);
|
|
void setCString(const char *label);
|
|
const char* getString(void) const;
|
|
|
|
void setAnchorPoint(const CCPoint & var);
|
|
void setAlignment(CCTextAlignment alignment);
|
|
void setWidth(float width);
|
|
void setLineBreakWithoutSpace(bool breakWithoutSpace);
|
|
void setScale(float scale);
|
|
void setScaleX(float scaleX);
|
|
void setScaleY(float scaleY);
|
|
|
|
void setFntFile(const char* fntFile);
|
|
const char* getFntFile();
|
|
|
|
void setColor(const Color3B& color);
|
|
const Color3B& getColor(void) const;
|
|
|
|
GLubyte getOpacity(void) const;
|
|
void setOpacity(GLubyte opacity);
|
|
|
|
bool isOpacityModifyRGB() const;
|
|
void setOpacityModifyRGB(bool isOpacityModifyRGB);
|
|
|
|
static void purgeCachedData();
|
|
static CCLabelBMFont * create(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointMake(0, 0));
|
|
static CCLabelBMFont * create();
|
|
};
|