About ItemListbox && ItemEntry

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

singbol
Not too shy to talk
Not too shy to talk
Posts: 36
Joined: Sun Aug 23, 2009 04:44

About ItemListbox && ItemEntry

Postby singbol » Thu Sep 17, 2009 09:07

Hi, I'm not ask the same question and I think I should place it in the Beginners Help.
I want to insert into the ItemListbox some Items, which are combined windows, such as StaticImage、StaticText、StaticImage.and I now know that I should insert ItemEntry based class object into ItemListbox.
In order to achive this, I write a class Named NewItemEntry: public ItemEntry.
and In it's constructor, I add four new child window(StaticImage、StaticText、StaticImage、StaticImage) to this NewItemEntry, and the next step I create a new object NewItemEntry *pMyItem = new NewItemEntry(...)
ItemListbox::addItem(pMyItem), it gives me an exception ("ItemEntry::getItemPixelSize must be implementd...")
I don't know how to solve this .
I'm waiting for your suggestion!Thank you !

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

Re: About ItemListbox && ItemEntry

Postby CrazyEddie » Thu Sep 17, 2009 19:29

I know from the other thread that you fixed this, but for completeness, the reason this fails is because you're trying to create your new window type directly which is not allowed in CEGUI. New window types must be registered with the system, you then need a falagard mapping that can assign an appropriate WindowRenderer in order that the new window type can draw imagery specified in a WidgetLook XML definition. The type specified by this mapping is then created via the WindowManager.

For info about registering a window type with CEGUI, this post: viewtopic.php?p=14730#p14730 covers the way to do that, though we have vastly simplified this in the upcoming 0.7.0 release.

CE.

singbol
Not too shy to talk
Not too shy to talk
Posts: 36
Joined: Sun Aug 23, 2009 04:44

Re: About ItemListbox && ItemEntry

Postby singbol » Fri Sep 18, 2009 01:44

OK, Thank you so much!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 26 guests