Extend a CEGUI::FrameWindow

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

underworldguardian
Just popping in
Just popping in
Posts: 3
Joined: Fri Feb 13, 2015 11:11

Extend a CEGUI::FrameWindow

Postby underworldguardian » Wed Sep 02, 2015 12:43

Hello,

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?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Extend a CEGUI::FrameWindow

Postby Ident » Sun Sep 06, 2015 16:12

Please do not ever post in the wrong forum again. You posted in "user projects" not in "general help"

There are descriptions below the forums... index.php



Regarding your question: Show us the usage. You only explained the declaration. Show us the class and how you use it.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests