@cocos99d wrote:
Hi,
I created a Label and LEFT alignment is working on Android device and in iOS simulator but not on my iPhone. Here is the code:
auto labelB4 = Label::createWithSystemFont(TEXT_B4, "", FONT_SIZE); labelB4->setWidth(winSize.width * texBoxX); labelB4->setHorizontalAlignment(TextHAlignment::LEFT); labelB4->setTag(14); labelB4->setVisible(true); labelB4->setColor(TEXT_COLOR); labelB4->setAnchorPoint(Point(0.0,0.5)); labelB4->setPosition(Vec2(winSize.width * texPosX, boutonOut->getContentSize().height / 2)); boutonOut->addChild(labelB4);
If I put TextHAlignment::CENTER or RIGHT then it is ok, but LEFT give me right alignment.
I'v tried to remove the setAnchorPoint(). I'v tried createWithSystemFont() with all parameters (size and both aligments). Tried setMaxLineWidth(), setString() ...
Thank you for any help.
Posts: 2
Participants: 2