label:fixed getter for font size and font name.

This commit is contained in:
Dhilan007 2014-03-14 15:18:45 +08:00
parent 971b1dd557
commit 5f6fbc6a33
2 changed files with 3 additions and 17 deletions

View File

@ -35,7 +35,7 @@ NS_CC_BEGIN
const int FontAtlas::CacheTextureWidth = 1024;
const int FontAtlas::CacheTextureHeight = 1024;
const char* FontAtlas::EVENT_PURGE_TEXTURES = "FontAtlasPurgeTextures";
const char* FontAtlas::EVENT_PURGE_TEXTURES = "__cc_FontAtlasPurgeTextures";
FontAtlas::FontAtlas(Font &theFont)
: _font(&theFont)

View File

@ -1036,13 +1036,7 @@ void Label::setFontName(const std::string& fontName)
const std::string& Label::getFontName() const
{
switch (_currentLabelType)
{
case LabelType::TTF:
return _fontConfig.fontFilePath;
default:
return _fontDefinition._fontName;
}
return _fontName;
}
void Label::setFontSize(int fontSize)
@ -1056,15 +1050,7 @@ void Label::setFontSize(int fontSize)
int Label::getFontSize() const
{
switch (_currentLabelType)
{
case LabelType::TTF:
return _fontConfig.fontSize;
case LabelType::STRING_TEXTURE:
return _fontDefinition._fontSize;
default:
return 0;
}
return _fontSize;
}
///// PROTOCOL STUFF