Now, back to the topic. You said I can place a TextProperty element inside a TextComponent (a static text?) (btw. I looked into the falagard pdf and didn't find info's about these two elements, are there any other sources?).
The TextComponent is a Falagard tag that create a area capable of rendering text in the looknfeel. It is not related to the StaticText, in fact the StaticText uses custom rendering to allow the scrollbars.
Unfortunately the Falagard manual has not yet been updated properly but the latest additions are mentioned in the
0.5 release notes In short, the TextProperty element is allowed inside a TextComponent. If it is present the text to render for the TextComponent will be fetched from the property you specify fx: <TextProperty name="RequiredStr" />.
With this you now render the text in the RequiredStr property.
Also FontProperty has been added which works similarly.
So, let's say I have a heading. I place a textproperty in it and than I can center it, change color, etc, right?
Yup. you can use Horz/VertFormat and Colour/Colours/ColourProperty/ColourRectProperty elements in any TextComponent.
Now, next comes the description. Again, only text, will the textcomponent do automatic line breaks and can I add custom line breaks (e.g. a \n)? (I think it will be easy to specify the width of a tooltip to about 20% of the screen and let the height handle by CEGUI, right?)
HorzFormat support multiple word wrapped formats for TextComponents.
I'm not sure where you're going with the 20%, but unfortunately Falagard does not yet provide a element for counting lines in wrapped text. You will need to this in code and (possible) provide it to the looknfeel via a property, which can then be used in a DimOperator chain to get the area you're looking for.
fx:
Code: Select all
<FontDim type="LineSpacing">
<DimOperator op="Multiply">
<PropertyDim name="NumLinesInDescription" />
</DimOperator>
</FontDim>
After that come the stats. Can I specify as much stats as I want in the tooltip skin, even if I don't want to use them? E.g. I add somehting like RequiredStr for an item and RequiredMana for an spell, so I can reuse the tooltips for items and spells?
That should be doable, you can use PropertyLinkDefinition to link properties, it really meant for linking to properties in child windows but IIRC it can be used locally as well.
The tooltip is reusable in fact all your items/spells etc can use the same tooltip instance.
I only want to know if it's really flexible enough, before I go to mess around with it

Greetings
I hope you do

and HTH