Преглед изворни кода

Minor refactor to remove the '***' as the repeat indicator.
The script already knows when the nested attributes repeat itself.

Yao Wei Tjong 姚伟忠 пре 9 година
родитељ
комит
53d213eb50

+ 1 - 1
Source/Urho3D/Graphics/AnimatedModel.cpp

@@ -52,7 +52,7 @@ extern const char* GEOMETRY_CATEGORY;
 const char* animationStatesStructureElementNames[] =
 {
     "Anim State Count",
-    "***Animation",
+    "   Animation",
     "   Start Bone",
     "   Is Looped",
     "   Weight",

+ 1 - 1
Source/Urho3D/Graphics/BillboardSet.cpp

@@ -60,7 +60,7 @@ const char* faceCameraModeNames[] =
 const char* billboardsStructureElementNames[] =
 {
     "Billboard Count",
-    "***Position",
+    "   Position",
     "   Size",
     "   UV Coordinates",
     "   Color",

+ 1 - 1
Source/Urho3D/Graphics/StaticModelGroup.cpp

@@ -43,7 +43,7 @@ extern const char* GEOMETRY_CATEGORY;
 const char* instanceNodesStructureElementNames[] =
 {
     "Instance Count",
-    "***NodeID",
+    "   NodeID",
     0
 };
 

+ 2 - 2
Source/Urho3D/Navigation/CrowdManager.cpp

@@ -49,7 +49,7 @@ static const float DEFAULT_MAX_AGENT_RADIUS = 0.f;
 const char* filterTypesStructureElementNames[] =
 {
     "Query Filter Type Count",
-    "***Include Flags",
+    "   Include Flags",
     "   Exclude Flags",
     "   >AreaCost",
     0
@@ -58,7 +58,7 @@ const char* filterTypesStructureElementNames[] =
 const char* obstacleAvoidanceTypesStructureElementNames[] =
 {
     "Obstacle Avoid. Type Count",
-    "***Velocity Bias",
+    "   Velocity Bias",
     "   Desired Velocity Weight",
     "   Current Velocity Weight",
     "   Side Bias Weight",

+ 1 - 1
Source/Urho3D/Scene/SplinePath.cpp

@@ -36,7 +36,7 @@ extern const char* LOGIC_CATEGORY;
 const char* controlPointsStructureElementNames[] =
 {
     "Control Point Count",
-    "***NodeID",
+    "   NodeID",
     0
 };
 

+ 5 - 10
bin/Data/Scripts/Editor/AttributeEditor.as

@@ -483,16 +483,6 @@ UIElement@ CreateAttributeEditor(ListView@ list, Array<Serializable@>@ serializa
             AttributeInfo vectorInfo;
             vectorInfo.name = vectorStruct.variableNames[nameIndex++];
             bool nested = vectorInfo.name.Contains('>');
-
-            // Create small divider for repeated instances
-            if (vectorInfo.name.Contains("***"))
-            {
-                vectorInfo.name.Replace("***", "   ");
-                UIElement@ divider = UIElement();
-                divider.SetFixedHeight(8);
-                list.AddItem(divider);
-            }
-
             if (nested)
             {
                 vectorInfo.type = VAR_VARIANTVECTOR;
@@ -519,6 +509,11 @@ UIElement@ CreateAttributeEditor(ListView@ list, Array<Serializable@>@ serializa
                     break;
                 }
                 nameIndex = vectorStruct.restartIndex;
+
+                // Create small divider for repeated instances
+                UIElement@ divider = UIElement();
+                divider.SetFixedHeight(8);
+                list.AddItem(divider);
             }
         }
     }