Code: Select all
CEGUI::String buttonName = "XNet/Buttons/";
buttonName += name.c_str();
CEGUI::PushButton* button = static_cast<CEGUI::PushButton*>(
CEGUI::WindowFactoryManager::getSingleton().getFactory("TaharezLook/Button")
->createWindow(buttonName));
button->setText(Dictionary::instance().resolveString(name).c_str());
button->setXPosition(BUTTON_X);
button->setYPosition(BUTTON_Y);
button->setWidth(BUTTON_WIDTH);
button->setHeight(BUTTON_HEIGHT);
button->setFont("Gotthard-8");
However, if I change the widget name to a falagard widget, the code doesn't work (it compiles, but it creates no widgets). This comes out in the log:
21/09/2005 15:33:08 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:08 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:08 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:08 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:08 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:09 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:09 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:09 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:09 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:09 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:09 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
21/09/2005 15:33:09 (Error) Exception: WidgetLookManager::getWidgetLook - Widget look and feel '' does not exist.
Why is it looking for a nameless widget? What's wrong?