Page 1 of 1

Text Size in layout

Posted: Wed Jun 23, 2010 15:47
by Handy
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. :)

Re: Text Size in layout

Posted: Thu Jun 24, 2010 12:02
by Handy
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?

Re: Text Size in layout

Posted: Thu Jun 24, 2010 20:53
by agamemnus
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.