updateColor should be called after updating quads on alignText

This commit is contained in:
Hanju Kim 2014-01-23 17:27:28 +09:00
parent 44b2d5d3b8
commit c042c5f3db
1 changed files with 3 additions and 2 deletions

View File

@ -33,6 +33,7 @@
#include "CCDirector.h" #include "CCDirector.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "CCFont.h" #include "CCFont.h"
#include "CCDrawingPrimitives.h"
#define DISTANCEFIELD_ATLAS_FONTSIZE 50 #define DISTANCEFIELD_ATLAS_FONTSIZE 50
@ -321,8 +322,6 @@ void Label::setString(const std::string& text)
// align text // align text
alignText(); alignText();
updateColor();
} }
void Label::setAlignment(TextHAlignment alignment) void Label::setAlignment(TextHAlignment alignment)
@ -473,6 +472,8 @@ void Label::alignText()
insertQuadFromSprite(_reusedLetter,vaildIndex++); insertQuadFromSprite(_reusedLetter,vaildIndex++);
} }
} }
updateColor();
} }
bool Label::computeHorizontalKernings(unsigned short int *stringToRender) bool Label::computeHorizontalKernings(unsigned short int *stringToRender)