diff --git a/Assets/Cryville/Common/Unity/Input/InputHandler.cs b/Assets/Cryville/Common/Unity/Input/InputHandler.cs index 5ea9c9e..c142a9e 100644 --- a/Assets/Cryville/Common/Unity/Input/InputHandler.cs +++ b/Assets/Cryville/Common/Unity/Input/InputHandler.cs @@ -39,6 +39,9 @@ namespace Cryville.Common.Unity.Input { public override int GetHashCode() { return Handler.GetHashCode() ^ Type; } + public override string ToString() { + return string.Format("{0}:{1}", ReflectionHelper.GetSimpleName(Handler.GetType()), Handler.GetTypeName(Type)); + } public static bool operator ==(InputSource lhs, InputSource rhs) { return lhs.Equals(rhs); } diff --git a/Assets/Cryville/Common/Unity/Input/UnityKeyHandler.cs b/Assets/Cryville/Common/Unity/Input/UnityKeyHandler.cs index 28f66bb..17fdf20 100644 --- a/Assets/Cryville/Common/Unity/Input/UnityKeyHandler.cs +++ b/Assets/Cryville/Common/Unity/Input/UnityKeyHandler.cs @@ -85,10 +85,10 @@ namespace Cryville.Common.Unity.Input { public class UnityMouseButtonReceiver : UnityKeyReceiver { public override string GetKeyName(int type) { switch (type) { - case 0: return "Left"; - case 1: return "Right"; - case 2: return "Middle"; - default: return string.Format("Button {0}", type); + case 0: return "Mouse Left"; + case 1: return "Mouse Right"; + case 2: return "Mouse Middle"; + default: return string.Format("Mouse Button {0}", type); } } void OnGUI() { diff --git a/Assets/Cryville/Common/Unity/Input/UnityMouseHandler.cs b/Assets/Cryville/Common/Unity/Input/UnityMouseHandler.cs index 0b8804c..e8ce656 100644 --- a/Assets/Cryville/Common/Unity/Input/UnityMouseHandler.cs +++ b/Assets/Cryville/Common/Unity/Input/UnityMouseHandler.cs @@ -39,7 +39,7 @@ namespace Cryville.Common.Unity.Input { public override string GetTypeName(int type) { switch (type) { - case 0: return "Unity Mouse"; + case 0: return "Mouse Position"; default: throw new ArgumentOutOfRangeException(nameof(type)); } } diff --git a/Assets/Cryville/Common/Unity/Input/UnityTouchHandler.cs b/Assets/Cryville/Common/Unity/Input/UnityTouchHandler.cs index 5e068e4..bee9f8f 100644 --- a/Assets/Cryville/Common/Unity/Input/UnityTouchHandler.cs +++ b/Assets/Cryville/Common/Unity/Input/UnityTouchHandler.cs @@ -39,7 +39,7 @@ namespace Cryville.Common.Unity.Input { public override string GetTypeName(int type) { switch (type) { - case 0: return "Unity Touch"; + case 0: return "Touch"; default: throw new ArgumentOutOfRangeException(nameof(type)); } }