1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 20:58:34 +01:00

improved GenericInput ToString

This commit is contained in:
Ell 2021-06-21 00:57:56 +02:00
parent 2f16bbdc44
commit 91730b1f27

View file

@ -27,16 +27,19 @@ namespace MLEM.Input {
/// <inheritdoc />
public override string ToString() {
var ret = this.Type.ToString();
switch (this.Type) {
case InputType.Mouse:
return this.Type.ToString() + (MouseButton) this;
ret += ((MouseButton) this).ToString();
break;
case InputType.Keyboard:
return this.Type.ToString() + (Keys) this;
ret += ((Keys) this).ToString();
break;
case InputType.Gamepad:
return this.Type.ToString() + (Buttons) this;
default:
return this.Type.ToString();
ret += ((Buttons) this).ToString();
break;
}
return ret;
}
/// <inheritdoc />