Browse Source

Add missing Lua bindings to SplinePath. Make hierarchy & inspector windows the same width on editor startup. Remove unnecessary attributes from EditorHierarchyWindow.xml.

Lasse Öörni 10 years ago
parent
commit
5bd672f02a

+ 11 - 6
Source/Urho3D/LuaScript/pkgs/Scene/SplinePath.pkg

@@ -5,18 +5,23 @@ class SplinePath : public Component
     void AddControlPoint(Node* point, unsigned index = M_MAX_UNSIGNED);
     void RemoveControlPoint(Node* point);
     void ClearControlPoints();
-    Vector3 GetPoint(float factor) const;
+    void SetInterpolationMode(InterpolationMode mode);
+    void SetPosition(float factor);
+    void SetControlledNode(Node* controlled);
 
     InterpolationMode GetInterpolationMode() const;
+    float GetSpeed() const;
+    float GetLength() const;
     Vector3 GetPosition() const;
-    
-    void SetInterpolationMode(InterpolationMode mode);
-    void SetPosition(float factor);
-    
+    Node* GetControlledNode() const;
+    Vector3 GetPoint(float factor) const;
+
     void Move(float timeStep);
     void Reset();
     bool IsFinished() const;
-    
+
+    tolua_property__get_set InterpolationMode interpolationMode;
     tolua_property__get_set float speed;
+    tolua_readonly tolua_property__get_set float length;
     tolua_property__get_set Node* controlledNode;
 };

+ 1 - 1
bin/Data/Scripts/Editor/EditorInspectorWindow.as

@@ -125,7 +125,7 @@ void CreateAttributeInspectorWindow()
     parentContainer = attributeInspectorWindow.GetChild("ParentContainer");
     ui.root.AddChild(attributeInspectorWindow);
     int height = Min(ui.root.height - 60, 500);
-    attributeInspectorWindow.SetSize(300, height);
+    attributeInspectorWindow.SetSize(344, height);
     attributeInspectorWindow.SetPosition(ui.root.width - 10 - attributeInspectorWindow.width, 100);
     attributeInspectorWindow.opacity = uiMaxOpacity;
     attributeInspectorWindow.BringToFront();

+ 0 - 2
bin/Data/UI/EditorHierarchyWindow.xml

@@ -1,8 +1,6 @@
 <?xml version="1.0"?>
 <element type="Window">
 	<attribute name="Name" value="HierarchyWindow" />
-	<attribute name="Position" value="474 221" />
-	<attribute name="Size" value="344 462" />
 	<attribute name="Layout Mode" value="Vertical" />
 	<attribute name="Layout Spacing" value="4" />
 	<attribute name="Layout Border" value="6 6 6 6" />