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;
}
device = new IrrlichtDevice(....)
How to close command window?