TextRestrainedInside - is the static textbox enough big?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.

TextRestrainedInside - is the static textbox enough big?

Postby ibax » Fri Apr 21, 2017 2:49 pm

Hello,

I would like to check if the text which I put into a static text box, fits into the box area or not.
Something similar like the 'isTextRestrainedInside()' function, but if I understood good, it returns the value of the 'setTextRestrainedInside()' parameter of a static text.

But how to check, whether the static text box is enough big or not?

Why do I need this? There are so many possible resolutions available by a graphic card, but the font size can be selected by the user. It can occur, that in one resolution the static text box is enough big, but in a smaller resolution some words goes outside the static text box area. I would like to solve this somehow...

Thanks...
ibax
 
Posts: 179
Joined: Thu Jun 21, 2007 8:56 am
Location: hungary

Re: TextRestrainedInside - is the static textbox enough big?

Postby CuteAlien » Fri Apr 21, 2017 2:57 pm

IGUIFont::getDimension should at least give you the dimensions for the text-string. Thought not sure if it works well with line-breaks.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8251
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany


Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 1 guest