mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 01:45:37 +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>
|
||||
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>
|
||||
|
|
|
@ -257,6 +257,17 @@ namespace OpenTK.Input
|
|||
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
|
||||
|
||||
#region Internal Members
|
||||
|
|
Loading…
Reference in a new issue