Page 1 of 1

Could u help me about IEventReceiver?

Posted: Wed Sep 13, 2006 6:29 pm
by bug_aonz
l've looked at movement tutorial(in .NET example folder) and done every thing is require.
I need it to close game window when i press 'Escape' key but only game window screen is closed, command window still remain.
what's wrong with my OnEvent function

Code: Select all

public bool OnEvent(Event Ev)
         {
             if (Ev.Type == EventType.KeyInput && !Ev.KeyPressedDown)
             {
                 switch (Ev.Key)
                 {
                     case KeyCode.KEY_ESCAPE:
                                 device.CloseDevice();
                                 break;
                         
                 }
                 return true;
             }
             return false;
         }
note:
device = new IrrlichtDevice(....)
How to close command window?

:D