mirror of https://github.com/axmolengine/axmol.git
updateColor should be called after updating quads on alignText
This commit is contained in:
parent
44b2d5d3b8
commit
c042c5f3db
|
@ -33,6 +33,7 @@
|
|||
#include "CCDirector.h"
|
||||
#include "renderer/CCRenderer.h"
|
||||
#include "CCFont.h"
|
||||
#include "CCDrawingPrimitives.h"
|
||||
|
||||
#define DISTANCEFIELD_ATLAS_FONTSIZE 50
|
||||
|
||||
|
@ -321,8 +322,6 @@ void Label::setString(const std::string& text)
|
|||
|
||||
// align text
|
||||
alignText();
|
||||
|
||||
updateColor();
|
||||
}
|
||||
|
||||
void Label::setAlignment(TextHAlignment alignment)
|
||||
|
@ -473,6 +472,8 @@ void Label::alignText()
|
|||
insertQuadFromSprite(_reusedLetter,vaildIndex++);
|
||||
}
|
||||
}
|
||||
|
||||
updateColor();
|
||||
}
|
||||
|
||||
bool Label::computeHorizontalKernings(unsigned short int *stringToRender)
|
||||
|
|
Loading…
Reference in New Issue