From 91730b1f27271030c32f5c47b9dfafa5c55e093e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 21 Jun 2021 00:57:56 +0200 Subject: [PATCH] improved GenericInput ToString --- MLEM/Input/GenericInput.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/MLEM/Input/GenericInput.cs b/MLEM/Input/GenericInput.cs index 6427c6a..220ef31 100644 --- a/MLEM/Input/GenericInput.cs +++ b/MLEM/Input/GenericInput.cs @@ -27,16 +27,19 @@ namespace MLEM.Input { /// 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; } ///