[Examples] Test Mouse.SetPosition

This commit is contained in:
thefiddler 2014-05-10 02:12:52 +02:00
parent 7eefb3e3ff
commit b89c920f32

View file

@ -139,9 +139,24 @@ namespace Examples.Tests
case Key.Comma: TargetRenderFrequency--; break;
case Key.Period: TargetRenderFrequency++; break;
case Key.Space:
case Key.Enter:
CursorVisible = !CursorVisible;
break;
case Key.C:
if (Cursor == MouseCursor.Default)
Cursor = Pencil;
else if (Cursor == Pencil)
Cursor = MouseCursor.Empty;
else
Cursor = MouseCursor.Default;
break;
case Key.Space:
Point p = new Point(Width / 2, Height / 2);
p = PointToScreen(p);
OpenTK.Input.Mouse.SetPosition(p.X, p.Y);
break;
}
if (!keyboard_keys.ContainsKey(e.Key))