[Python] How to control the text size in a screen?

Sto

Should i code today ...
Joined
Dec 15, 2005
Messages
1,144
Location
Marseille (France)
I try to display some text in a screen.

I've created a panel in the screen, with i want to include 3 lines of text. (with a dds attached to the panel or not)
First i've use setLabelAt or setTextAt centering the tree lines in the panel. But no matter what font I choose for fontTypes, i always get the same size of text.
Then i've tried to attach 3 panels in to the first panel with vertical layout -> i get the same thing.

The color of the text is always white (anyway to change that?).

I've found no example in the screens to help me understanding how to display text in a screen. Any help or example will be greatly appreciated.

Tcho !

Edit : I must be blind, or perhaps a little too much tired ^^.

To control color and text size with a screen, the text must have this added : szText = u"<color=255,255,0><font=3b>" + localText.getText("TXT_KEY", ()) + u"</font></color>". The fonts are 1, 1b, 2, 2b, 3, 3b, 4, 4b (not sure i get them all, the number for the size and b for the letter pencil ). Now i don't understand what's the fontStyles in the label or text function is used for !?
 
Back
Top Bottom