diff --git a/Source/Editor/CustomEditors/Editors/DoubleEditor.cs b/Source/Editor/CustomEditors/Editors/DoubleEditor.cs index a2d2cfb25..477f68855 100644 --- a/Source/Editor/CustomEditors/Editors/DoubleEditor.cs +++ b/Source/Editor/CustomEditors/Editors/DoubleEditor.cs @@ -26,8 +26,8 @@ namespace FlaxEditor.CustomEditors.Editors // Try get limit attribute for value min/max range setting and slider speed var attributes = Values.GetAttributes(); - var categoryAttribute = attributes.FirstOrDefault(x => x is NumberCategoryAttribute); - var valueCategory = ((NumberCategoryAttribute)categoryAttribute)?.Category ?? Utils.ValueCategory.None; + var categoryAttribute = attributes.FirstOrDefault(x => x is ValueCategoryAttribute); + var valueCategory = ((ValueCategoryAttribute)categoryAttribute)?.Category ?? Utils.ValueCategory.None; if (attributes != null) { var limit = attributes.FirstOrDefault(x => x is LimitAttribute); diff --git a/Source/Editor/CustomEditors/Editors/FloatEditor.cs b/Source/Editor/CustomEditors/Editors/FloatEditor.cs index 1ea1ab15f..af6a95c4d 100644 --- a/Source/Editor/CustomEditors/Editors/FloatEditor.cs +++ b/Source/Editor/CustomEditors/Editors/FloatEditor.cs @@ -32,8 +32,8 @@ namespace FlaxEditor.CustomEditors.Editors // Try get limit attribute for value min/max range setting and slider speed var attributes = Values.GetAttributes(); - var categoryAttribute = attributes.FirstOrDefault(x => x is NumberCategoryAttribute); - var valueCategory = ((NumberCategoryAttribute)categoryAttribute)?.Category ?? Utils.ValueCategory.None; + var categoryAttribute = attributes.FirstOrDefault(x => x is ValueCategoryAttribute); + var valueCategory = ((ValueCategoryAttribute)categoryAttribute)?.Category ?? Utils.ValueCategory.None; if (attributes != null) { var range = attributes.FirstOrDefault(x => x is RangeAttribute); diff --git a/Source/Editor/CustomEditors/Editors/Vector3Editor.cs b/Source/Editor/CustomEditors/Editors/Vector3Editor.cs index 8d156f075..2850fa4f3 100644 --- a/Source/Editor/CustomEditors/Editors/Vector3Editor.cs +++ b/Source/Editor/CustomEditors/Editors/Vector3Editor.cs @@ -75,7 +75,7 @@ namespace FlaxEditor.CustomEditors.Editors if (attributes != null) { limit = (LimitAttribute)attributes.FirstOrDefault(x => x is LimitAttribute); - var categoryAttribute = (NumberCategoryAttribute)attributes.FirstOrDefault(x => x is NumberCategoryAttribute); + var categoryAttribute = (ValueCategoryAttribute)attributes.FirstOrDefault(x => x is ValueCategoryAttribute); if (categoryAttribute != null) category = categoryAttribute.Category; } @@ -273,7 +273,7 @@ namespace FlaxEditor.CustomEditors.Editors if (attributes != null) { limit = (LimitAttribute)attributes.FirstOrDefault(x => x is LimitAttribute); - var categoryAttribute = (NumberCategoryAttribute)attributes.FirstOrDefault(x => x is NumberCategoryAttribute); + var categoryAttribute = (ValueCategoryAttribute)attributes.FirstOrDefault(x => x is ValueCategoryAttribute); if (categoryAttribute != null) category = categoryAttribute.Category; } diff --git a/Source/Engine/Core/Math/Transform.h b/Source/Engine/Core/Math/Transform.h index 3dd47df11..2c51bfa4a 100644 --- a/Source/Engine/Core/Math/Transform.h +++ b/Source/Engine/Core/Math/Transform.h @@ -18,13 +18,13 @@ API_STRUCT() struct FLAXENGINE_API Transform /// /// The translation vector of the transform. /// - API_FIELD(Attributes="EditorOrder(10), EditorDisplay(null, \"Position\"), NumberCategory(Utils.ValueCategory.Distance)") + API_FIELD(Attributes="EditorOrder(10), EditorDisplay(null, \"Position\"), ValueCategory(Utils.ValueCategory.Distance)") Vector3 Translation; /// /// The rotation of the transform. /// - API_FIELD(Attributes="EditorOrder(20), EditorDisplay(null, \"Rotation\"), NumberCategory(Utils.ValueCategory.Angle)") + API_FIELD(Attributes="EditorOrder(20), EditorDisplay(null, \"Rotation\"), ValueCategory(Utils.ValueCategory.Angle)") Quaternion Orientation; /// diff --git a/Source/Engine/Scripting/Attributes/Editor/NumberCategoryAttribute.cs b/Source/Engine/Scripting/Attributes/Editor/ValueCategoryAttribute.cs similarity index 66% rename from Source/Engine/Scripting/Attributes/Editor/NumberCategoryAttribute.cs rename to Source/Engine/Scripting/Attributes/Editor/ValueCategoryAttribute.cs index 6b5726bb1..8ba91e9d0 100644 --- a/Source/Engine/Scripting/Attributes/Editor/NumberCategoryAttribute.cs +++ b/Source/Engine/Scripting/Attributes/Editor/ValueCategoryAttribute.cs @@ -5,29 +5,28 @@ using System; namespace FlaxEngine { /// - /// Used to specify the value category of a numeric value as either as-is (a scalar), a distance (formatted as cm/m/km) - /// or an angle (formatted with a degree sign). + /// Used to specify the value category of a numeric value as either as-is (a scalar), a distance (formatted as cm/m/km) or an angle (formatted with a degree sign). /// /// [Serializable] [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] - public sealed class NumberCategoryAttribute : Attribute + public sealed class ValueCategoryAttribute : Attribute { /// /// The value category used for formatting. /// public Utils.ValueCategory Category; - private NumberCategoryAttribute() + private ValueCategoryAttribute() { Category = Utils.ValueCategory.None; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The value category. - public NumberCategoryAttribute(Utils.ValueCategory category) + public ValueCategoryAttribute(Utils.ValueCategory category) { Category = category; }