mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-07 16:50:43 +00:00
[Examples] Improved Mouse.GetState output
This commit is contained in:
parent
96aaef9b37
commit
2b16a641f0
|
@ -323,21 +323,7 @@ namespace Examples.Tests
|
||||||
var state = OpenTK.Input.Mouse.GetState(i);
|
var state = OpenTK.Input.Mouse.GetState(i);
|
||||||
if (state.IsConnected)
|
if (state.IsConnected)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
DrawString(gfx, state.ToString(), line++);
|
||||||
Vector3 pos = new Vector3(state.X, state.Y, state.WheelPrecise);
|
|
||||||
sb.Append(i);
|
|
||||||
sb.Append(": ");
|
|
||||||
sb.Append(pos);
|
|
||||||
for (int button_index = 0; button_index < (int)MouseButton.LastButton; button_index++)
|
|
||||||
{
|
|
||||||
MouseButton b = (MouseButton)button_index;
|
|
||||||
if (state[b])
|
|
||||||
{
|
|
||||||
sb.Append(b);
|
|
||||||
sb.Append(" ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
DrawString(gfx, sb.ToString(), line++);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return line;
|
return line;
|
||||||
|
|
Loading…
Reference in a new issue