I found this snippet that i've modified on the wiki and i was wondering if the heap allocation is later handled by the listbox?
Code: Select all
CEGUI::String text("test");
ListboxTextItem* item = new ListboxTextItem(text);
Listbox* chatBox = static_cast<Listbox*>(CEGUI::WindowManager::getSingletonPtr()->getWindow("/ChatBox/List"));
chatBox->addItem(item);
Is there another, perhaps proper way of doing this?