Page 1 of 1

upgrading issue 0.5.0

Posted: Tue Feb 06, 2007 10:53
by mkolb
Hi all,

as some others I'm also experiencing some issues when moving from 0.4.x to 0.5.0:

I want to center text in a StaticText widget, tried with
Window::setProperty("HorzFormatting","CentreAligned");
but that didn't work.

I want to set the text colour of a button, i tried with
Pushbutton::setProperty("NormalTextColour","tl:ff808000 tr:ff808000 bl:77808000 br:ff808000");
but that didn't work.

I am also getting a strange exception, where I don't even can imagine where it comes from:
Exception: There is no Property named 'NormalTextColour' available in the set.

This exception does not occur when creating the widgets but somewhere in Ogre::Root::renderOneFrame()

Can anyone help me? Thanks in advance!!!

Posted: Tue Feb 06, 2007 13:50
by scriptkid
Hi,

i don't see a HorzFormatting in the documentation anymore. I'll have a look at home where i have the sources, tonight.

The NormalTextColour is only available for Editboxes. This is why you get the error message. Each widget has a PropertySet, which is a very generic way of changing properties without having to know a widget's exact type, which would be required for usual 'setters'. SetProperty is a virtual method, but you call it specifically for PushButton so it fails, because it lacks that property.

I think that TextColours has more support.

Good luck!

Posted: Tue Feb 06, 2007 14:35
by mkolb
Thank, you!

Could you please post then here what you found out?
At the time it's very difficult to develop with CEGUI, since the docs are overlapping on the whole webpage, some are 0.4, some are 0.5.
When is it planned to clear these things up?

Posted: Tue Feb 06, 2007 15:23
by mkolb
Another odd thing is, that
Window::setProperty("HorzFormatting","WordWrapCentreAligned");
did the trick, since I wanted to center text in a StaticText widget.

But I don't think this should be correct at all

Posted: Tue Feb 06, 2007 20:43
by scriptkid
Hi,

the HorzFormatting is a valid property, but defined in the Falagard part (the .looknfeel files). I always tend to forget this ;-)

However "CentreAligned" is not a valid value. Valid ones can be found here (look for HorzFormatting:
http://svn.sourceforge.net/viewvc/crayz ... iew=markup

Your sample is correct, the WordWrap part is just in case the text won't fit on one line. Then it will still be centered (while wrapped).

HTH.

PS. Not sure about the cleaning up of docs. Now and then the team members or other wiki-users update stuff to 0.5, but there isn't a real plan or something for this...