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...
TextRestrainedInside - is the static textbox enough big?
Re: TextRestrainedInside - is the static textbox enough big?
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.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm