How do I center static text?
Posted: Fri Jul 18, 2008 2:36 am
Here's my command:
env->addStaticText( (const wchar_t *)catagorys[columns].c_str(), core::rect<s32>(
10 + ((screen.Width-20)/game.numberOfCatagorys)*(columns),
10,
((screen.Width-20)/game.numberOfCatagorys)*(columns+1),
70),
true, true, 0, 0, true);
I want to center the text in the rectangle I created in that GUI command. How do I do this.
Question on the side: why are the character types for irrlicht so screwed up? What happened to good old char or string? what is const wchar_t * anyway?
env->addStaticText( (const wchar_t *)catagorys[columns].c_str(), core::rect<s32>(
10 + ((screen.Width-20)/game.numberOfCatagorys)*(columns),
10,
((screen.Width-20)/game.numberOfCatagorys)*(columns+1),
70),
true, true, 0, 0, true);
I want to center the text in the rectangle I created in that GUI command. How do I do this.
Question on the side: why are the character types for irrlicht so screwed up? What happened to good old char or string? what is const wchar_t * anyway?