mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 15:25:31 +00:00
[Input] Improved MouseState.ToString()
This commit is contained in:
parent
94fdf1881c
commit
39eb3b1892
|
@ -72,7 +72,7 @@ namespace OpenTK.Input
|
||||||
/// <returns>A <see cref="System.String"/> that represents the current <see cref="OpenTK.Input.MouseScrollWheel"/>.</returns>
|
/// <returns>A <see cref="System.String"/> that represents the current <see cref="OpenTK.Input.MouseScrollWheel"/>.</returns>
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return string.Format("[MouseScrollWheel: X={0}, Y={1}]", X, Y);
|
return string.Format("[X={0:0.00}, Y={1:0.00}]", X, Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -257,6 +257,17 @@ namespace OpenTK.Input
|
||||||
return buttons.GetHashCode() ^ X.GetHashCode() ^ Y.GetHashCode() ^ scroll.GetHashCode();
|
return buttons.GetHashCode() ^ X.GetHashCode() ^ Y.GetHashCode() ^ scroll.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a <see cref="System.String"/> that represents the current <see cref="OpenTK.Input.MouseState"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="System.String"/> that represents the current <see cref="OpenTK.Input.MouseState"/>.</returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
string b = Convert.ToString(buttons, 2).PadLeft(10, '0');
|
||||||
|
return String.Format("[MouseState: X={0}, Y={1}, Scroll={2}, Buttons={3}, IsConnected={4}]",
|
||||||
|
X, Y, Scroll, b, IsConnected);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal Members
|
#region Internal Members
|
||||||
|
|
Loading…
Reference in a new issue