FrameWindow close button not working?

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

User avatar
Van
Just can't stay away
Just can't stay away
Posts: 225
Joined: Fri Jan 21, 2005 20:29
Contact:

FrameWindow close button not working?

Postby Van » Thu Mar 02, 2006 00:25

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?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Thu Mar 02, 2006 01:15

subscribing to EventCloseClicked?

User avatar
Van
Just can't stay away
Just can't stay away
Posts: 225
Joined: Fri Jan 21, 2005 20:29
Contact:

Postby Van » Thu Mar 02, 2006 01:41

lindquist wrote:subscribing to EventCloseClicked?


DOH!!!! :oops:

tx
Just popping in
Just popping in
Posts: 15
Joined: Mon Jan 15, 2007 02:42

Postby tx » Wed Apr 04, 2007 21:57

A simple follow up question. Is there a place where I can get all events? I have found no documentation on it.

User avatar
Levia
Quite a regular
Quite a regular
Posts: 83
Joined: Mon May 22, 2006 18:25
Location: Bergen op zoom, The Netherlands
Contact:

Postby Levia » Thu Apr 05, 2007 08:39

I usually use VAssistX, it lists all functions/variables in classes. If you have it, you can do:
classpointer->Event
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:
http://www.cegui.org.uk/api_reference/c ... 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.
Image
Image


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 10 guests