Text Size in layout

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Handy
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 09, 2009 17:02
Location: Sterling Heights, MI

Text Size in layout

Postby Handy » Wed Jun 23, 2010 15:47

Hi,
I am was wondering if it was possible to specify the "Text" size and possibly it's position within a Push Button Widget in a ".layout" file?
Is this possible?
I know that I can change this via the C++ API but I was wondering if this is possible via the xml files.

Thanks soo much for all of you help in advance. :)

Handy
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 09, 2009 17:02
Location: Sterling Heights, MI

Re: Text Size in layout

Postby Handy » Thu Jun 24, 2010 12:02

I was looking at examples and I think that I could use a StaticText Widget for the text portion of the button.
This way I could position the text. It this how it's typically done?

agamemnus
Just can't stay away
Just can't stay away
Posts: 185
Joined: Sun Mar 14, 2010 04:21

Re: Text Size in layout

Postby agamemnus » Thu Jun 24, 2010 20:53

It's called a font size...

The current API creates one texture per font size.

There is no automatic way of loading a new font and size from a pre-existing property definition in a .layout file.

You can add a custom xml tag as a PropertyDefinition and have your program load in a new font with the appropriate font size (as defined in the PropertyDefinition), and then set the font of your window type to the new font.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 6 guests