[Examples] Use Key.Enter to capture mouse

This commit is contained in:
thefiddler 2014-05-01 23:56:25 +02:00
parent 60f58c2ffd
commit 495ded54d8

View file

@ -100,6 +100,10 @@ namespace Examples.Tutorial
else else
this.WindowState = WindowState.Fullscreen; this.WindowState = WindowState.Fullscreen;
} }
else if (e.Key == Key.Enter)
{
CursorVisible = !CursorVisible;
}
if (e.Key == Key.Space) if (e.Key == Key.Space)
{ {
@ -160,7 +164,6 @@ namespace Examples.Tutorial
/// <remarks>There is no need to call the base implementation.</remarks> /// <remarks>There is no need to call the base implementation.</remarks>
protected override void OnUpdateFrame(FrameEventArgs e) protected override void OnUpdateFrame(FrameEventArgs e)
{ {
// Nothing to do!
} }
#endregion #endregion