IGUIWindow - how to catch the "close" event ??

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Alex001
Posts: 25
Joined: Tue Dec 02, 2003 8:20 pm
Location: Germany, Munich

IGUIWindow - how to catch the "close" event ??

Post by Alex001 »

tried to figure out a how to catch that event - but without a solution.
Has this event been forgoten ?

IGUIWindow * start = ui->addWindow(
position,
true, // modal
0, // window title
0, // parent,
UI_WIN); // ID;

bool MyEventReceiver::OnEvent(SEvent event)
{
switch (event.EventType)
{
case EET_GUI_EVENT:
...


I could not get an event here ...
my error ?
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Not your error. The window gets simply remove when you click the close button. You can get the button with getCloseButton() but this doesn't really help (you can disable the button with it.)

Yu'll have to modify the engine. There's a patch available here:

http://parsys.informatik.uni-oldenburg. ... /irrlicht/

It's the "GUICloseHandler.patch" one. Haven't tested it though.
It is like it is. And because it is like it is, things are like they are.
Post Reply