Page 1 of 1

Widget Galore - Ogre Question

Posted: Wed Jan 24, 2007 21:18
by PostaL

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?

Posted: Wed Jan 24, 2007 21:47
by LennyH
ListboxItem != ListboxTextItem

Posted: Thu Jan 25, 2007 13:06
by Rackle
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).