Widget Galore - Ogre Question

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

PostaL
Just popping in
Just popping in
Posts: 5
Joined: Sat Jan 20, 2007 06:06

Widget Galore - Ogre Question

Postby PostaL » Wed Jan 24, 2007 21:18

Code: Select all

CEGUI::Listbox* StatusInput = (CEGUI::Listbox*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Listbox", (CEGUI::utf8*)"Status Input");
      mEditorGuiSheet->addChildWindow(StatusInput);
      StatusInput->setPosition(CEGUI::Point(0.12f, 0.52f));
      StatusInput->setSize(CEGUI::Size(0.20f, 0.05f));
      StatusInput->setMultiselectEnabled(false);
      CEGUI::ListboxItem* itemListbox= new ListboxTextItem("Example 1", 1);
      itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
      StatusInput->addItem(itemListbox);
      itemListbox = new ListboxTextItem("Example 2", 2);
      itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
      StatusInput->addItem(itemListbox);
      itemListbox = new ListboxTextItem("Example 3", 3);
      itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
      StatusInput->addItem(itemListbox);
      itemListbox = new ListboxTextItem("Example 4", 4);
      itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
      StatusInput->addItem(itemListbox);
      StatusInput->setItemSelectState(itemListbox, true);
      StatusInput->ensureItemIsVisible(itemListbox);


I get 4 errors all being error C2061: syntax error : identifier 'ListboxTextItem'. I'm sure I'm just missing something stupid. Any help?

LennyH
Quite a regular
Quite a regular
Posts: 92
Joined: Thu Nov 30, 2006 20:50

Postby LennyH » Wed Jan 24, 2007 21:47

ListboxItem != ListboxTextItem

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Thu Jan 25, 2007 13:06

As LennyH suggests, change

Code: Select all

CEGUI::ListboxItem* itemListbox= new ListboxTextItem("Example 1", 1);

to

Code: Select all

CEGUI::ListboxTextItem* itemListbox= new ListboxTextItem("Example 1", 1);


You may also need to include "elements/CEGUIListbox.h" and "elements/CEGUIListboxTextItem.h", depending on how your include paths are set up in your compiler (Visual Studio).


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests