Hi,
I'm currently using 0.5.0RC2. How is it possible to close a window with a click on the "X"? Do I have to subscripe a special event, because when I currently click it, nothing happens.
And how can I disable the option to minimize the window to it's titlebar, when I double-click in the titlebar?
Thanks for the help and Greetings
Closing a window
Moderators: CEGUI MVP, CEGUI Team
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: Closing a window
Ludi wrote:Hi,
I'm currently using 0.5.0RC2. How is it possible to close a window with a click on the "X"? Do I have to subscripe a special event, because when I currently click it, nothing happens.
Yes you must subscribe to the EventCloseClicked event, e.g:
Code: Select all
myFrameWindow->subscribeEvent(FrameWindow::EventCloseClicked, Event::Subscriber(&MyClassName::closeWindow, this));
Then do something in the method e.g:
Code: Select all
bool MyClassName::closeWindow(const CEGUI::EventArgs& e)
{
myFrameWindow->hide();
}
Ludi wrote:And how can I disable the option to minimize the window to it's titlebar, when I double-click in the titlebar?
Code: Select all
myFrameWindow->setRollupEnabled(false);
I think thats the method. Hope that helps.
Who is online
Users browsing this forum: No registered users and 22 guests