* Source/Examples/OpenTK/Test/GameWindowStates.cs: Handle
MouseButtonUp event to make mouse visible.
This commit is contained in:
parent
1fc5e96a25
commit
e1cf566c81
1 changed files with 12 additions and 8 deletions
|
@ -41,6 +41,7 @@ namespace Examples.Tests
|
||||||
WindowStateChanged += delegate { refresh_text = true; };
|
WindowStateChanged += delegate { refresh_text = true; };
|
||||||
Mouse.Move += MouseMoveHandler;
|
Mouse.Move += MouseMoveHandler;
|
||||||
Mouse.ButtonDown += MouseButtonHandler;
|
Mouse.ButtonDown += MouseButtonHandler;
|
||||||
|
Mouse.ButtonUp += MouseButtonHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyDownHandler(object sender, KeyboardKeyEventArgs e)
|
void KeyDownHandler(object sender, KeyboardKeyEventArgs e)
|
||||||
|
@ -85,15 +86,18 @@ namespace Examples.Tests
|
||||||
{
|
{
|
||||||
refresh_text = true;
|
refresh_text = true;
|
||||||
|
|
||||||
if (e.IsPressed)
|
if (e.Button == MouseButton.Left)
|
||||||
{
|
{
|
||||||
CursorVisible = false;
|
if (e.IsPressed)
|
||||||
move_window = true;
|
{
|
||||||
}
|
CursorVisible = false;
|
||||||
else
|
move_window = true;
|
||||||
{
|
}
|
||||||
CursorVisible = true;
|
else
|
||||||
move_window = false;
|
{
|
||||||
|
CursorVisible = true;
|
||||||
|
move_window = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue