Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCLabelTTF text alignment ignored.... #304

Closed
terenctb opened this issue Jun 19, 2011 · 2 comments
Closed

CCLabelTTF text alignment ignored.... #304

terenctb opened this issue Jun 19, 2011 · 2 comments

Comments

@terenctb
Copy link

CCLabelTTF* pLabel = CCLabelTTF::labelWithString(testString->m_sString.c_str(),CCSizeMake(50,18),CCTextAlignmentRight,"Thonburi", 18);
//CCLabelTTF* pLabel = CCLabelTTF::labelWithString(testString->m_sString.c_str(),"Thonburi", 18);

Both these lines have the text in the same position...Alignment is ignored.

Test on iOS

@walzer
Copy link
Contributor

walzer commented Jun 20, 2011

I just modify HelloWorldScene.cpp

// add a label shows "Hello World"
// create and initialize a label
CCLabelTTF* pLabel = CCLabelTTF::labelWithString("Hello World", CCSizeMake(480, 50),
CCTextAlignmentRight, "Thonburi", 34);

The text alignment right works. Please try to set a larger CCSizeMake, e.g. CCSizeMake(480, 50)

@walzer
Copy link
Contributor

walzer commented Jun 20, 2011

Hi, terenctb, I posted a screenshot for you http://www.cocos2d-x.org/boards/6/topics/1969

@walzer walzer closed this as completed Jun 27, 2011
kawaiSky pushed a commit to kawaiSky/cocos2d-x that referenced this issue Apr 14, 2016
gelldur pushed a commit to gelldur/cocos2d-x that referenced this issue Aug 16, 2016
Support CrystaX NDK for Android builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants