2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCLabelTTF : public CCSprite
|
|
|
|
{
|
2013-03-29 20:35:38 +08:00
|
|
|
CCLabelTTF();
|
|
|
|
~CCLabelTTF();
|
|
|
|
bool init();
|
2012-02-02 14:26:38 +08:00
|
|
|
void setString(const char *label);
|
2013-07-04 12:50:17 +08:00
|
|
|
const char* getString(void) const;
|
2012-02-02 14:26:38 +08:00
|
|
|
|
2013-07-04 12:50:17 +08:00
|
|
|
CCTextAlignment getHorizontalAlignment() const;
|
2012-08-10 18:14:04 +08:00
|
|
|
void setHorizontalAlignment(CCTextAlignment alignment);
|
|
|
|
|
2013-07-04 12:50:17 +08:00
|
|
|
CCVerticalTextAlignment getVerticalAlignment() const;
|
2012-08-10 18:14:04 +08:00
|
|
|
void setVerticalAlignment(CCVerticalTextAlignment verticalAlignment);
|
|
|
|
|
2013-07-04 12:50:17 +08:00
|
|
|
CCSize getDimensions() const;
|
2012-08-10 18:14:04 +08:00
|
|
|
void setDimensions(CCSize &dim);
|
|
|
|
|
2013-07-04 12:50:17 +08:00
|
|
|
float getFontSize() const;
|
2012-08-10 18:14:04 +08:00
|
|
|
void setFontSize(float fontSize);
|
|
|
|
|
2013-07-04 12:50:17 +08:00
|
|
|
const char* getFontName() const;
|
2012-08-10 18:14:04 +08:00
|
|
|
void setFontName(const char *fontName);
|
|
|
|
|
2012-09-17 14:40:42 +08:00
|
|
|
static CCLabelTTF * create(const char *str, const char *fontName, float fontSize, const CCSize& dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment);
|
2012-08-10 18:14:04 +08:00
|
|
|
static CCLabelTTF * create(const char *str, const char *fontName, float fontSize, const CCSize& dimensions, CCTextAlignment hAlignment);
|
2012-09-17 14:40:42 +08:00
|
|
|
static CCLabelTTF * create(const char *str, const char *fontName, float fontSize);
|
|
|
|
static CCLabelTTF * create();
|
2012-02-02 14:26:38 +08:00
|
|
|
};
|