1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 14:38: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 /> /// <inheritdoc />
public override string ToString() { public override string ToString() {
var ret = this.Type.ToString();
switch (this.Type) { switch (this.Type) {
case InputType.Mouse: case InputType.Mouse:
return this.Type.ToString() + (MouseButton) this; ret += ((MouseButton) this).ToString();
break;
case InputType.Keyboard: case InputType.Keyboard:
return this.Type.ToString() + (Keys) this; ret += ((Keys) this).ToString();
break;
case InputType.Gamepad: case InputType.Gamepad:
return this.Type.ToString() + (Buttons) this; ret += ((Buttons) this).ToString();
default: break;
return this.Type.ToString();
} }
return ret;
} }
/// <inheritdoc /> /// <inheritdoc />