mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-24 05:01:11 +00:00
More compact string representation
This commit is contained in:
parent
cbc39f922d
commit
ef580daf75
|
@ -110,17 +110,17 @@ namespace OpenTK.Input
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return String.Format(
|
return String.Format(
|
||||||
"{{ABXYLR: {0}{1}{2}{3}{4}{5}; Back: {6}; BigButton: {7}; LStick: {8}; RStick: {9}}}",
|
"{{{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}}}",
|
||||||
A == ButtonState.Pressed ? "1" : "0",
|
A == ButtonState.Pressed ? "A" : String.Empty,
|
||||||
B == ButtonState.Pressed ? "1" : "0",
|
B == ButtonState.Pressed ? "B" : String.Empty,
|
||||||
X == ButtonState.Pressed ? "1" : "0",
|
X == ButtonState.Pressed ? "X" : String.Empty,
|
||||||
Y == ButtonState.Pressed ? "1" : "0",
|
Y == ButtonState.Pressed ? "Y" : String.Empty,
|
||||||
LeftShoulder == ButtonState.Pressed ? "1" : "0",
|
LeftShoulder == ButtonState.Pressed ? "L" : String.Empty,
|
||||||
RightShoulder == ButtonState.Pressed ? "1" : "0",
|
RightShoulder == ButtonState.Pressed ? "R" : String.Empty,
|
||||||
Back == ButtonState.Pressed ? "1" : "0",
|
Back == ButtonState.Pressed ? " Back" : String.Empty,
|
||||||
BigButton == ButtonState.Pressed ? "1" : "0",
|
BigButton == ButtonState.Pressed ? " Big" : String.Empty,
|
||||||
LeftStick == ButtonState.Pressed ? "1" : "0",
|
LeftStick == ButtonState.Pressed ? " LStick" : String.Empty,
|
||||||
RightStick == ButtonState.Pressed ? "1" : "0");
|
RightStick == ButtonState.Pressed ? " RStick" : String.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
|
|
|
@ -90,11 +90,11 @@ namespace OpenTK.Input
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return String.Format(
|
return String.Format(
|
||||||
"{{ULDR: {0}{1}{2}{3}}}",
|
"{{{0}{1}{2}{3}}}",
|
||||||
IsUp ? "1" : "0",
|
IsUp ? "U" : String.Empty,
|
||||||
IsLeft ? "1" : "0",
|
IsLeft ? "L" : String.Empty,
|
||||||
IsDown ? "1" : "0",
|
IsDown ? "D" : String.Empty,
|
||||||
IsRight ? "1" : "0");
|
IsRight ? "R" : String.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
|
|
Loading…
Reference in a new issue