I am creating my own windows with the CEGUI widgets. As you do that in other GUI systems, you take a base widget you like and extend it by inheritance of the original. So I tried to implement my own BasePanel by inheriting from CEGUI::FrameWindow
Code: Select all
class BasePanel: public CEGUI::FrameWindow
Then in the Constructor of BaseWindow, I do:
Code: Select all
BasePanel::BasePanel(const std::string name) :
CEGUI::FrameWindow(CEGUIConfiguration::CEGUI_SCHEME + "/FrameWindow", name) {
CEGUIConfiguration::CEGUI_SCHEME here is nothing else than a name such as "TaharezLook" or another theme I am using. However if I now try to use setText(name), I get a exception:
CEGUI::UnknownObjectException in function 'CEGUI::NamedElement* CEGUI::NamedElement::getChildElement(const CEGUI::String&) const' (/home/leviathan/git/ceed/cegui/cegui/src/NamedElement.cpp:150) : The Element object referenced by '__auto_titlebar__' is not attached to Element at 'FPS'. ('FPS' is the name in the example above.) It is not only with setText(), setPosition() does not work as well and gives me a segmentation fault. It seems that the window is not allocated correctly.
How can this be done correctly?