Fix input source description.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -85,10 +85,10 @@ namespace Cryville.Common.Unity.Input {
|
||||
public class UnityMouseButtonReceiver : UnityKeyReceiver<UnityMouseButtonReceiver> {
|
||||
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() {
|
||||
|
@@ -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));
|
||||
}
|
||||
}
|
||||
|
@@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user