From 495ded54d81e285399de04e9c926efdfaf8b22c9 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Thu, 1 May 2014 23:56:25 +0200 Subject: [PATCH] [Examples] Use Key.Enter to capture mouse --- Source/Examples/OpenTK/GameWindow/MouseCursorSimple.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Examples/OpenTK/GameWindow/MouseCursorSimple.cs b/Source/Examples/OpenTK/GameWindow/MouseCursorSimple.cs index 9580f984..83ef22c3 100644 --- a/Source/Examples/OpenTK/GameWindow/MouseCursorSimple.cs +++ b/Source/Examples/OpenTK/GameWindow/MouseCursorSimple.cs @@ -100,6 +100,10 @@ namespace Examples.Tutorial else this.WindowState = WindowState.Fullscreen; } + else if (e.Key == Key.Enter) + { + CursorVisible = !CursorVisible; + } if (e.Key == Key.Space) { @@ -160,7 +164,6 @@ namespace Examples.Tutorial /// There is no need to call the base implementation. protected override void OnUpdateFrame(FrameEventArgs e) { - // Nothing to do! } #endregion