void Keyboard_KeyDown(KeyEventArgs e) { if (ui.KeyboardGrabbed) { ui.OnKeyDown(e.Key); } else { if (e.Key == Keys.Enter) { ui.ChatboxEvent(); } if (!pausemenu && e.Key == Keys.F1) { pausemenu = true; if (!session.Multiplayer) { paused = true; } session.Pause(); ui.Event("Pause"); } #if DEBUG if (e.Key == Keys.R && (e.Modifiers & KeyModifiers.Control) != 0) { world.RenderDebugPoints = !world.RenderDebugPoints; } #endif } }
void Keyboard_KeyDown(KeyEventArgs e) { if (ui.KeyboardGrabbed) { ui.OnKeyDown(e.Key); } else { if (e.Key == Keys.Escape && !paused) { switch (currentState) { case ScriptState.Launch: SendLaunch(); break; case ScriptState.Cutscene: case ScriptState.Enter: SceneOnScriptFinished(waitingForFinish); break; } } if (e.Key == Keys.Enter && !paused) { ui.ChatboxEvent(); } if (e.Key == Keys.F1 && !paused) { paused = true; ui.Event("Pause"); } } }