upgrading issue 0.5.0

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

mkolb
Just popping in
Just popping in
Posts: 7
Joined: Mon Jan 22, 2007 07:46
Contact:

upgrading issue 0.5.0

Postby mkolb » Tue Feb 06, 2007 10:53

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!!!

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Feb 06, 2007 13:50

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!

mkolb
Just popping in
Just popping in
Posts: 7
Joined: Mon Jan 22, 2007 07:46
Contact:

Postby mkolb » Tue Feb 06, 2007 14:35

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?

mkolb
Just popping in
Just popping in
Posts: 7
Joined: Mon Jan 22, 2007 07:46
Contact:

Postby mkolb » Tue Feb 06, 2007 15:23

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

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Feb 06, 2007 20:43

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...


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 3 guests