I’m using a CCLabelBMFont to display COMBO information like this:
I first create the CCLabelBMFont like this:
_comboDisplay = CCLabelBMFont::create("N-hit\nCOMBO!", "font.fnt", _screenSizeVisible.width * 0.7f, kCCTextAlignmentCenter);
_comboDisplay->setPosition(ccp(xOffset + _screenSizeVisible.width * 1.5f, _screenSizeVisible.height * 0.75f));
And then, whenever the combo is updated, I do this:
sprintf(szValue, "%i-hit\nCOMBO!", _currentCombo);
So, the problem I have is: after updating the label, that ONE char is shown as at least 2 or 3 new lines: the space between the first and the second lines is HUGE.
If I DON’T update the string since the declaration, then that one char is shown perfectly.
Is there some bug in cocos2d-x 2.1.4 that ends up adding new line characters when sprintf is used? This exact same code doesn’t have this problem in 2.0.4.
Or maybe the way the string is updated has changed since 2.0.4?
Any help is greatly appreciated.