mirror of https://github.com/axmolengine/axmol.git
clean up
This commit is contained in:
parent
c7c0b0e07a
commit
66c5721fc7
|
@ -28,12 +28,17 @@
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
|
|
||||||
|
const int FontDefinitionTTF::_DEFAUL_ATALS_TEXTURE_SIZE = 1024;
|
||||||
|
|
||||||
FontDefinitionTTF::FontDefinitionTTF():_textImages(0), _commonLineHeight(0)
|
FontDefinitionTTF::FontDefinitionTTF():_textImages(0), _commonLineHeight(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FontDefinitionTTF* FontDefinitionTTF::create(Font *font, int textureSize)
|
FontDefinitionTTF* FontDefinitionTTF::create(Font *font, int textureSize)
|
||||||
{
|
{
|
||||||
|
if (textureSize == 0)
|
||||||
|
textureSize = _DEFAUL_ATALS_TEXTURE_SIZE;
|
||||||
|
|
||||||
FontDefinitionTTF *ret = new FontDefinitionTTF;
|
FontDefinitionTTF *ret = new FontDefinitionTTF;
|
||||||
|
|
||||||
if(!ret)
|
if(!ret)
|
||||||
|
|
|
@ -39,7 +39,7 @@ class CC_DLL FontDefinitionTTF : public Object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static FontDefinitionTTF* create(Font *font, int textureSize = DEFAULT_ATLAS_TEXTURE_SIZE);
|
static FontDefinitionTTF* create(Font *font, int textureSize = 0);
|
||||||
FontAtlas * createFontAtlas();
|
FontAtlas * createFontAtlas();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -54,6 +54,7 @@ private:
|
||||||
TextImage * _textImages;
|
TextImage * _textImages;
|
||||||
std::map<unsigned short, FontLetterDefinition> _fontLettersDefinitionUTF16;
|
std::map<unsigned short, FontLetterDefinition> _fontLettersDefinitionUTF16;
|
||||||
float _commonLineHeight;
|
float _commonLineHeight;
|
||||||
|
static const int _DEFAUL_ATALS_TEXTURE_SIZE;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue