mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 17:05:37 +00:00
* Source/Examples/OpenTK/Test/GameWindowStates.cs: Handle
MouseButtonUp event to make mouse visible.
This commit is contained in:
parent
42e0880cbb
commit
f201c3bed9
|
@ -41,6 +41,7 @@ namespace Examples.Tests
|
|||
WindowStateChanged += delegate { refresh_text = true; };
|
||||
Mouse.Move += MouseMoveHandler;
|
||||
Mouse.ButtonDown += MouseButtonHandler;
|
||||
Mouse.ButtonUp += MouseButtonHandler;
|
||||
}
|
||||
|
||||
void KeyDownHandler(object sender, KeyboardKeyEventArgs e)
|
||||
|
@ -85,15 +86,18 @@ namespace Examples.Tests
|
|||
{
|
||||
refresh_text = true;
|
||||
|
||||
if (e.IsPressed)
|
||||
if (e.Button == MouseButton.Left)
|
||||
{
|
||||
CursorVisible = false;
|
||||
move_window = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CursorVisible = true;
|
||||
move_window = false;
|
||||
if (e.IsPressed)
|
||||
{
|
||||
CursorVisible = false;
|
||||
move_window = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CursorVisible = true;
|
||||
move_window = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue