Permalink
Browse files

[Examples] Use Key.Enter to capture mouse

  • Loading branch information...
1 parent 60f58c2 commit 495ded54d81e285399de04e9c926efdfaf8b22c9 @thefiddler thefiddler committed May 1, 2014
Showing with 4 additions and 1 deletion.
  1. +4 −1 Source/Examples/OpenTK/GameWindow/MouseCursorSimple.cs
@@ -100,6 +100,10 @@ void Keyboard_KeyDown(object sender, KeyboardKeyEventArgs e)
else
this.WindowState = WindowState.Fullscreen;
}
+ else if (e.Key == Key.Enter)
+ {
+ CursorVisible = !CursorVisible;
+ }
if (e.Key == Key.Space)
{
@@ -160,7 +164,6 @@ protected override void OnResize(EventArgs e)
/// <remarks>There is no need to call the base implementation.</remarks>
protected override void OnUpdateFrame(FrameEventArgs e)
{
- // Nothing to do!
}
#endregion

0 comments on commit 495ded5

Please sign in to comment.