Could u help me about IEventReceiver?

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
bug_aonz
Posts: 6
Joined: Mon Sep 11, 2006 5:06 pm

Could u help me about IEventReceiver?

Post 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
Locked