Page 1 of 1

FrameWindow close button not working?

Posted: Thu Mar 02, 2006 00:25
by Van
Please review this:

Code: Select all

   // Create the MISSION LISTING Window
   CEGUI::WindowManager& mWinMgr = CEGUI::WindowManager::getSingleton();
   // Get the current CEGUI sheet/window as we will be adding widgets too it
   mRootWindow = CEGUI::System::getSingleton().getGUISheet();

   mFrameWindow = (CEGUI::FrameWindow*)mWinMgr.createWindow( (CEGUI::utf8*) CEGUILOOK"/FrameWindow", "MissionList" );
   mRootWindow->addChildWindow( mFrameWindow );

   //mFrameWindow->setInheritsAlpha( false );
   mFrameWindow->setText( "Available Missions [Loading]" );
   mFrameWindow->setPosition( CEGUI::Point(0.25, 0.25f) );
   mFrameWindow->setMaximumSize( CEGUI::Size(1.0f, 1.0f) );
   mFrameWindow->setSize( CEGUI::Size(0.5f, 0.5f) );
   mFrameWindow->setCloseButtonEnabled( true );
   mFrameWindow->setVisible( false );

When the window is made visibile to the user it works fine except for that the user can click on the "close" hotspot (i.e. the 'X') and nothing will happen. And, i can't for the life figure it out. I have other FrameWindow's working and they work fine. yes, the "rollup" works fine for the window.

The only I can see is wrong with this window is that I create it manually in code vs reading it from an XML file. Also, The XML files enclose thier FrameWindows in a DefaultWindow. I don't create a default window first, I am just grabbing the sheet and adding it to it.

Does someone see what I am doing wrong?

Posted: Thu Mar 02, 2006 01:15
by lindquist
subscribing to EventCloseClicked?

Posted: Thu Mar 02, 2006 01:41
by Van
lindquist wrote:subscribing to EventCloseClicked?

DOH!!!! :oops:

Posted: Wed Apr 04, 2007 21:57
by tx
A simple follow up question. Is there a place where I can get all events? I have found no documentation on it.

Posted: Thu Apr 05, 2007 08:39
by Levia
I usually use VAssistX, it lists all functions/variables in classes. If you have it, you can do:
and then you can see a list of all available events (variables, static constant strings)

If you dont have VAssistX, i recommend using the API reference: ... indow.html
Scroll down to under the diagram.
Dont be fooled that there are only 2 events listed there - FrameWindow inherits Window so all its events are inherited too. If you need a bigger list, take a look at Window. Though you can also find those if you scroll down a bit to the class diagram. All the events are described there aswell.