[solved] ListBoxTextItem::setText() not updating window

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Mikademus
CEGUI MVP
CEGUI MVP
Posts: 130
Joined: Wed Mar 18, 2009 19:14

[solved] ListBoxTextItem::setText() not updating window

Postby Mikademus » Wed Mar 18, 2009 21:01

In my learning CEGUI under OGRE I've made a spiffy FPS-related info window consisting of a MultiColumnList. The design went nice, and it draws, the only problem is that it doesn't update the text fields when calling setText() on them*.

Or rather, it seems that if will update once, and then not accept new updates. This makes my FPS counter somewhat dull and uninformative, I'm sad to say :(

Is this an issue, or am I doing something wrong?


* If calling every frame it will update the first time, if calling every second starting the second after booting the app it will actually never be updated... O.o
Last edited by Mikademus on Thu Mar 19, 2009 15:48, edited 1 time in total.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Postby Jamarr » Thu Mar 19, 2009 15:20

The MCL does not update automatically; this is by design to avoid performance issues when updating a lot of items. You need to do this after you've finished updating the list:

Code: Select all

mcl->handleUpdatedItemData();

User avatar
Mikademus
CEGUI MVP
CEGUI MVP
Posts: 130
Joined: Wed Mar 18, 2009 19:14

Postby Mikademus » Thu Mar 19, 2009 15:48

Thanks! That was it!

I was going to make an article at the wiki about using MCLs, but I couldn't register... :( Pity, since CEGUI really needs more documentation and guides.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Fri Mar 20, 2009 09:30

Mikademus wrote:I was going to make an article at the wiki about using MCLs, but I couldn't register... :( Pity, since CEGUI really needs more documentation and guides.

Since you're posting here, you're already registered. The forums, mantis and the wiki all use a single unified registration and log in:

Wiki Main Page wrote:To edit this wiki or to contribute to this site, you must be a registered on our forums


HTH

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 39 guests