mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +08:00
Fixed enum field inspector
This commit is contained in:
parent
4de58ad0db
commit
38d45d0486
@ -75,7 +75,6 @@ public class NodeEditorGUILayout {
|
|||||||
else if (type == typeof(double)) return DoubleField(label, (double) value);
|
else if (type == typeof(double)) return DoubleField(label, (double) value);
|
||||||
else if (type == typeof(long)) return LongField(label, (long) value);
|
else if (type == typeof(long)) return LongField(label, (long) value);
|
||||||
else if (type == typeof(bool)) return Toggle(label, (bool) value);
|
else if (type == typeof(bool)) return Toggle(label, (bool) value);
|
||||||
else if (type == typeof(Enum)) return EnumField(label, (Enum) value);
|
|
||||||
else if (type == typeof(string)) return TextField(label, (string) value);
|
else if (type == typeof(string)) return TextField(label, (string) value);
|
||||||
else if (type == typeof(Rect)) return RectField(label, (Rect) value);
|
else if (type == typeof(Rect)) return RectField(label, (Rect) value);
|
||||||
else if (type == typeof(Vector2)) return Vector2Field(label, (Vector2) value);
|
else if (type == typeof(Vector2)) return Vector2Field(label, (Vector2) value);
|
||||||
@ -83,6 +82,7 @@ public class NodeEditorGUILayout {
|
|||||||
else if (type == typeof(Vector4)) return Vector4Field(label, (Vector4) value);
|
else if (type == typeof(Vector4)) return Vector4Field(label, (Vector4) value);
|
||||||
else if (type == typeof(Color)) return ColorField(label, (Color) value);
|
else if (type == typeof(Color)) return ColorField(label, (Color) value);
|
||||||
else if (type == typeof(AnimationCurve)) return CurveField(label, (AnimationCurve) value);
|
else if (type == typeof(AnimationCurve)) return CurveField(label, (AnimationCurve) value);
|
||||||
|
else if (type.IsSubclassOf(typeof(Enum)) || type == typeof(Enum)) return EnumField(label, (Enum) value);
|
||||||
else if (type.IsSubclassOf(typeof(UnityEngine.Object)) || type == typeof(UnityEngine.Object)) return ObjectField(label, (UnityEngine.Object) value, type);
|
else if (type.IsSubclassOf(typeof(UnityEngine.Object)) || type == typeof(UnityEngine.Object)) return ObjectField(label, (UnityEngine.Object) value, type);
|
||||||
else return value;
|
else return value;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user