浏览代码

Feature: Added inspectable fields for float & color distribution

BearishSun 7 年之前
父节点
当前提交
3fafbc7b33
共有 42 个文件被更改,包括 638 次插入33 次删除
  1. 1 1
      Source/EditorCore/GUI/BsGUIColorGradientField.h
  2. 27 0
      Source/EditorCore/GUI/BsGUICurvesField.cpp
  3. 22 1
      Source/EditorCore/GUI/BsGUICurvesField.h
  4. 14 0
      Source/EditorCore/GUI/BsGUIFloatDistributionField.cpp
  5. 11 0
      Source/EditorCore/GUI/BsGUIFloatDistributionField.h
  6. 11 0
      Source/Scripting/MBansheeEditor/GUI/GUIColorDistributionField.cs
  7. 1 3
      Source/Scripting/MBansheeEditor/GUI/GUIColorField.cs
  8. 29 0
      Source/Scripting/MBansheeEditor/GUI/GUIColorGradientField.cs
  9. 28 0
      Source/Scripting/MBansheeEditor/GUI/GUICurvesField.cs
  10. 29 6
      Source/Scripting/MBansheeEditor/GUI/GUIFloatDistributionField.cs
  11. 2 2
      Source/Scripting/MBansheeEditor/Generated/GUIColorGradientField.generated.cs
  12. 35 2
      Source/Scripting/MBansheeEditor/Generated/GUICurvesField.generated.cs
  13. 20 0
      Source/Scripting/MBansheeEditor/Generated/GUIFloatDistributionField.generated.cs
  14. 6 0
      Source/Scripting/MBansheeEditor/MBansheeEditor.csproj
  15. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableBool.cs
  16. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableColor.cs
  17. 71 0
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableColorDistribution.cs
  18. 72 0
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableColorGradient.cs
  19. 72 0
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableCurve.cs
  20. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableDictionary.cs
  21. 12 0
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableField.cs
  22. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableFloat.cs
  23. 82 0
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableFloatDistribution.cs
  24. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableGameObjectRef.cs
  25. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableInt.cs
  26. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableList.cs
  27. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableObject.cs
  28. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableRRef.cs
  29. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableRangedField.cs
  30. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableRangedFloat.cs
  31. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableRangedInt.cs
  32. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableResource.cs
  33. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableString.cs
  34. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableVector2.cs
  35. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableVector3.cs
  36. 1 1
      Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableVector4.cs
  37. 12 0
      Source/Scripting/MBansheeEngine/Serialization/SerializableProperty.cs
  38. 36 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUICurvesField.generated.cpp
  39. 3 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUICurvesField.generated.h
  40. 20 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIFloatDistributionField.generated.cpp
  41. 4 0
      Source/Scripting/SBansheeEditor/Generated/BsScriptGUIFloatDistributionField.generated.h
  42. 1 1
      Source/bsf

+ 1 - 1
Source/EditorCore/GUI/BsGUIColorGradientField.h

@@ -40,7 +40,7 @@ namespace bs
 		/** @copydoc GUIElement::setTint */
 		void setTint(const Color& color) override;
 
-		BS_SCRIPT_EXPORT()
+		BS_SCRIPT_EXPORT(in:true)
 		Event<void()> onClicked; /**< Triggered when the user clicks on the gradient field. */
 
 		/** @name Internal 

+ 27 - 0
Source/EditorCore/GUI/BsGUICurvesField.cpp

@@ -9,6 +9,8 @@ using namespace std::placeholders;
 
 namespace bs
 {
+	static const TAnimationCurve<float> EMPTY_CURVE;
+
 	GUICurvesField::GUICurvesField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
 		: TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel)
@@ -41,6 +43,31 @@ namespace bs
 		mCurves->setCurves(drawInfos);
 	}
 
+	const TAnimationCurve<float>& GUICurvesField::getCurve() const
+	{
+		const Vector<CurveDrawInfo>& curves = mCurves->getCurves();
+		if(!curves.empty())
+			return mCurves->getCurves()[0].curve;
+
+		return EMPTY_CURVE;
+	}
+
+	const TAnimationCurve<float>& GUICurvesField::getMinCurve() const
+	{
+		return getCurve();
+	}
+
+	const TAnimationCurve<float>& GUICurvesField::getMaxCurve() const
+	{
+		const Vector<CurveDrawInfo>& curves = mCurves->getCurves();
+		if(curves.size() > 1)
+			return mCurves->getCurves()[1].curve;
+		else if(!curves.empty())
+			return mCurves->getCurves()[0].curve;
+
+		return EMPTY_CURVE;
+	}
+
 	void GUICurvesField::setTint(const Color& color)
 	{
 		if (mLabel != nullptr)

+ 22 - 1
Source/EditorCore/GUI/BsGUICurvesField.h

@@ -38,10 +38,31 @@ namespace bs
 		BS_SCRIPT_EXPORT()
 		void setCurveRange(const TAnimationCurve<float>& curveA, const TAnimationCurve<float>& curveB);
 
+		/** 
+		 * Returns the curve represented by the field. If the field represents a curve range this returns the minimal
+		 * curve of that range.
+		 */
+		BS_SCRIPT_EXPORT(pr:getter,n:Curve)
+		const TAnimationCurve<float>& getCurve() const;
+
+		/** 
+		 * Returns the minimal curve represented by the field containing a curve range. Returns the only available
+		 * curve if the field doesn't represent a range.
+		 */
+		BS_SCRIPT_EXPORT(pr:getter,n:MinCurve)
+		const TAnimationCurve<float>& getMinCurve() const;
+
+		/** 
+		 * Returns the maximal curve represented by the field containing a curve range. Returns the only available
+		 * curve if the field doesn't represent a range.
+		 */
+		BS_SCRIPT_EXPORT(pr:getter,n:MaxCurve)
+		const TAnimationCurve<float>& getMaxCurve() const;
+
 		/** @copydoc GUIElement::setTint */
 		void setTint(const Color& color) override;
 
-		BS_SCRIPT_EXPORT() 
+		BS_SCRIPT_EXPORT(in:true) 
 		Event<void()> onClicked; /**< Triggered when the user clicks on the GUI element. */
 
 		/** @name Internal 

+ 14 - 0
Source/EditorCore/GUI/BsGUIFloatDistributionField.cpp

@@ -91,6 +91,17 @@ namespace bs
 		rebuild();
 	}
 
+	bool GUIFloatDistributionField::hasInputFocus() const
+	{
+		if(mMinInput && mMinInput->hasInputFocus())
+			return true;
+
+		if(mMaxInput && mMaxInput->hasInputFocus())
+			return true;
+
+		return false;
+	}
+
 	void GUIFloatDistributionField::setTint(const Color& color)
 	{
 		mDropDownButton->setTint(color);
@@ -180,6 +191,7 @@ namespace bs
 
 				onConstantModified();
 			});
+			mMinInput->onConfirm.connect([this]() { onConstantConfirmed(); });
 
 			mLayout->addElement(mMinInput);
 			break;
@@ -196,6 +208,7 @@ namespace bs
 
 				onConstantModified();
 			});
+			mMinInput->onConfirm.connect([this]() { onConstantConfirmed(); });
 
 			mMaxInput->setValue(mMaxConstant);
 			mMaxInput->onValueChanged.connect([this](float value)
@@ -205,6 +218,7 @@ namespace bs
 
 				onConstantModified();
 			});
+			mMaxInput->onConfirm.connect([this]() { onConstantConfirmed(); });
 
 			mLayout->addElement(mMinInput);
 			mLayout->addElement(mMaxInput);

+ 11 - 0
Source/EditorCore/GUI/BsGUIFloatDistributionField.h

@@ -48,6 +48,10 @@ namespace bs
 		/** @copydoc GUIElement::setTint */
 		void setTint(const Color& color) override;
 
+		/**	Checks if any of the float input fields currently have input focus. Only relevant for non-curve distributions. */
+		BS_SCRIPT_EXPORT(pr:getter,n:HasInputFocus)
+		bool hasInputFocus() const;
+
 		/** 
 		 * Triggered when the user clicks on the curve display. Only relevant if the distribution is a curve distribution. 
 		 */
@@ -61,6 +65,13 @@ namespace bs
 		BS_SCRIPT_EXPORT(in:true)
 		Event<void()> onConstantModified;
 
+		/** 
+		 * Triggered when the user confirms inputs in either of the non-curve (constant) values of the distribution. Only 
+		 * relevant if the distribution is not a curve distribution.
+		 */
+		BS_SCRIPT_EXPORT(in:true)
+		Event<void()> onConstantConfirmed;
+
 		/** @name Internal 
 		 *  @{
 		 */

+ 11 - 0
Source/Scripting/MBansheeEditor/GUI/GUIColorDistributionField.cs

@@ -5,6 +5,11 @@ namespace BansheeEditor
 {
     partial class GUIColorDistributionField
     {
+        /// <summary>
+        /// Triggered when the distribution in the field changes.
+        /// </summary>
+        public event Action OnChanged;
+
         partial void OnMinClicked()
         {
             ColorDistribution distribution = Value;
@@ -21,6 +26,8 @@ namespace BansheeEditor
                         Value = new ColorDistribution(value);
                     else
                         Value = new ColorDistribution(value, distribution.GetMaxConstant());
+
+                    OnChanged?.Invoke();
                 });
             }
             else if (distribution.DistributionType == PropertyDistributionType.Curve || 
@@ -35,6 +42,8 @@ namespace BansheeEditor
                         Value = new ColorDistribution(colorGradient);
                     else
                         Value = new ColorDistribution(colorGradient, distribution.GetMaxGradient());
+
+                    OnChanged?.Invoke();
                 });
             }
         }
@@ -51,6 +60,7 @@ namespace BansheeEditor
                         return;
 
                     Value = new ColorDistribution(distribution.GetMinConstant(), value);
+                    OnChanged?.Invoke();
                 });
             }
             else if (distribution.DistributionType == PropertyDistributionType.RandomCurveRange)
@@ -61,6 +71,7 @@ namespace BansheeEditor
                         return;
 
                     Value = new ColorDistribution(distribution.GetMinGradient(), colorGradient);
+                    OnChanged?.Invoke();
                 });
             }
         }

+ 1 - 3
Source/Scripting/MBansheeEditor/GUI/GUIColorField.cs

@@ -89,9 +89,7 @@ namespace BansheeEditor
             if (Value != color)
             {
                 Value = color;
-
-                if(OnChanged != null)
-                    OnChanged(color);
+                OnChanged?.Invoke(color);
             }
         }
 

+ 29 - 0
Source/Scripting/MBansheeEditor/GUI/GUIColorGradientField.cs

@@ -0,0 +1,29 @@
+using System;
+using BansheeEngine;
+
+namespace BansheeEditor
+{
+    partial class GUIColorGradientField
+    {
+        /// <summary>
+        /// Triggered when the gradient in the field changes.
+        /// </summary>
+        public event Action<ColorGradient> OnChanged;
+
+        /// <summary>
+        /// Callback triggered when the user clicks on the GUI element.
+        /// </summary>
+        partial void OnClicked()
+        {
+            GradientPicker.Show(Value, (success, colorGradient) =>
+            {
+                if (!success)
+                    return;
+
+                Value = colorGradient;
+                OnChanged?.Invoke(colorGradient);
+            });
+
+        }
+    }
+}

+ 28 - 0
Source/Scripting/MBansheeEditor/GUI/GUICurvesField.cs

@@ -0,0 +1,28 @@
+using System;
+using BansheeEngine;
+
+namespace BansheeEditor
+{
+    partial class GUICurvesField
+    {
+        /// <summary>
+        /// Triggered when the curve in the field changes.
+        /// </summary>
+        public event Action<AnimationCurve> OnChanged;
+
+        /// <summary>
+        /// Callback triggered when the user clicks on the GUI element.
+        /// </summary>
+        partial void OnClicked()
+        {
+            CurveEditorWindow.Show(Curve, (success, curve) =>
+            {
+                if (!success)
+                    return;
+
+                SetCurve(curve);
+                OnChanged?.Invoke(curve);
+            });
+        }
+    }
+}

+ 29 - 6
Source/Scripting/MBansheeEditor/GUI/GUIFloatDistributionField.cs

@@ -6,8 +6,15 @@ namespace BansheeEditor
     partial class GUIFloatDistributionField
     {
         /// <summary>
-        /// Callback triggered when the user clicks on the curve display in the GUI element.
+        /// Triggered when the distribution in the field changes.
         /// </summary>
+        public event Action OnChanged;
+
+        /// <summary>
+        /// Triggered whenever user confirms input in one of the floating point fields.
+        /// </summary>
+        public event Action OnConfirmed;
+
         partial void OnClicked()
         {
             FloatDistribution distribution = Value;
@@ -16,19 +23,35 @@ namespace BansheeEditor
             {
                 CurveEditorWindow.Show(distribution.GetMinCurve(), (success, curve) =>
                 {
-                    if(success)
-                        Value = new FloatDistribution(curve);
+                    if (!success)
+                        return;
+
+                    Value = new FloatDistribution(curve);
+                    OnChanged?.Invoke();
                 });
             }
             else if (distribution.DistributionType == PropertyDistributionType.RandomCurveRange)
             {
                 CurveEditorWindow.Show(distribution.GetMinCurve(), distribution.GetMaxCurve(), 
                     (success, minCurve, maxCurve) =>
-                {
-                    if(success)
+                    {
+                        if (!success)
+                            return;
+
                         Value = new FloatDistribution(minCurve, maxCurve);
-                });
+                        OnChanged?.Invoke();
+                    });
             }
         }
+
+        partial void OnConstantModified()
+        {
+            OnChanged?.Invoke();
+        }
+
+        partial void OnConstantConfirmed()
+        {
+            OnConfirmed?.Invoke();
+        }
     }
 }

+ 2 - 2
Source/Scripting/MBansheeEditor/Generated/GUIColorGradientField.generated.cs

@@ -82,7 +82,7 @@ namespace BansheeEditor
 		}
 
 		/// <summary>Triggered when the user clicks on the gradient field.</summary>
-		public event Action OnClicked;
+		partial void OnClicked();
 
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern ColorGradient Internal_getValue(IntPtr thisPtr);
@@ -100,7 +100,7 @@ namespace BansheeEditor
 		private static extern void Internal_create3(GUIColorGradientField managedInstance, string style);
 		private void Internal_onClicked()
 		{
-			OnClicked?.Invoke();
+			OnClicked();
 		}
 	}
 

+ 35 - 2
Source/Scripting/MBansheeEditor/Generated/GUICurvesField.generated.cs

@@ -74,8 +74,35 @@ namespace BansheeEditor
 			Internal_create3(this, style);
 		}
 
+		/// <summary>
+		/// Returns the curve represented by the field. If the field represents a curve range this returns the minimal curve of 
+		/// that range.
+		/// </summary>
+		public AnimationCurve Curve
+		{
+			get { return Internal_getCurve(mCachedPtr); }
+		}
+
+		/// <summary>
+		/// Returns the minimal curve represented by the field containing a curve range. Returns the only available curve if the 
+		/// field doesn't represent a range.
+		/// </summary>
+		public AnimationCurve MinCurve
+		{
+			get { return Internal_getMinCurve(mCachedPtr); }
+		}
+
+		/// <summary>
+		/// Returns the maximal curve represented by the field containing a curve range. Returns the only available curve if the 
+		/// field doesn't represent a range.
+		/// </summary>
+		public AnimationCurve MaxCurve
+		{
+			get { return Internal_getMaxCurve(mCachedPtr); }
+		}
+
 		/// <summary>Triggered when the user clicks on the GUI element.</summary>
-		public event Action OnClicked;
+		partial void OnClicked();
 
 		/// <summary>Sets an animation curve to display on the field.</summary>
 		public void SetCurve(AnimationCurve curve)
@@ -94,6 +121,12 @@ namespace BansheeEditor
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_setCurveRange(IntPtr thisPtr, AnimationCurve curveA, AnimationCurve curveB);
 		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern AnimationCurve Internal_getCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern AnimationCurve Internal_getMinCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern AnimationCurve Internal_getMaxCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create(GUICurvesField managedInstance, ref GUIContent labelContent, uint labelWidth, string style);
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create0(GUICurvesField managedInstance, ref GUIContent labelContent, string style);
@@ -105,7 +138,7 @@ namespace BansheeEditor
 		private static extern void Internal_create3(GUICurvesField managedInstance, string style);
 		private void Internal_onClicked()
 		{
-			OnClicked?.Invoke();
+			OnClicked();
 		}
 	}
 

+ 20 - 0
Source/Scripting/MBansheeEditor/Generated/GUIFloatDistributionField.generated.cs

@@ -81,6 +81,14 @@ namespace BansheeEditor
 			set { Internal_setValue(mCachedPtr, value); }
 		}
 
+		/// <summary>
+		/// Checks if any of the float input fields currently have input focus. Only relevant for non-curve distributions.
+		/// </summary>
+		public bool HasInputFocus
+		{
+			get { return Internal_hasInputFocus(mCachedPtr); }
+		}
+
 		/// <summary>
 		/// Triggered when the user clicks on the curve display. Only relevant if the distribution is a curve distribution.
 		/// </summary>
@@ -92,11 +100,19 @@ namespace BansheeEditor
 		/// </summary>
 		partial void OnConstantModified();
 
+		/// <summary>
+		/// Triggered when the user confirms inputs in either of the non-curve (constant) values of the distribution. Only  
+		/// relevant if the distribution is not a curve distribution.
+		/// </summary>
+		partial void OnConstantConfirmed();
+
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern FloatDistribution Internal_getValue(IntPtr thisPtr);
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_setValue(IntPtr thisPtr, FloatDistribution value);
 		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern bool Internal_hasInputFocus(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create(GUIFloatDistributionField managedInstance, ref GUIContent labelContent, uint labelWidth, string style);
 		[MethodImpl(MethodImplOptions.InternalCall)]
 		private static extern void Internal_create0(GUIFloatDistributionField managedInstance, ref GUIContent labelContent, string style);
@@ -114,6 +130,10 @@ namespace BansheeEditor
 		{
 			OnConstantModified();
 		}
+		private void Internal_onConstantConfirmed()
+		{
+			OnConstantConfirmed();
+		}
 	}
 
 	/** @} */

+ 6 - 0
Source/Scripting/MBansheeEditor/MBansheeEditor.csproj

@@ -38,6 +38,8 @@
   <ItemGroup>
     <Compile Include="GUI\GUIColorDistributionField.cs" />
     <Compile Include="GUI\GUIColorGradient.cs" />
+    <Compile Include="GUI\GUIColorGradientField.cs" />
+    <Compile Include="GUI\GUICurvesField.cs" />
     <Compile Include="GUI\GUIFloatDistributionField.cs" />
     <Compile Include="Inspectors\AnimationClipInspector.cs" />
     <Compile Include="Inspectors\AnimationInspector.cs" />
@@ -93,6 +95,10 @@
     <Compile Include="Inspectors\SphericalJointInspector.cs" />
     <Compile Include="Windows\CurveEditorWindow.cs" />
     <Compile Include="Windows\GradientPicker.cs" />
+    <Compile Include="Windows\Inspector\InspectableColorDistribution.cs" />
+    <Compile Include="Windows\Inspector\InspectableColorGradient.cs" />
+    <Compile Include="Windows\Inspector\InspectableCurve.cs" />
+    <Compile Include="Windows\Inspector\InspectableFloatDistribution.cs" />
     <Compile Include="Windows\Inspector\InspectableRRef.cs" />
     <Compile Include="Windows\Inspector\Style\InspectableFieldRangeStyle.cs" />
     <Compile Include="Windows\Inspector\Style\InspectableFieldStepStyle.cs" />

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableBool.cs

@@ -26,7 +26,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableBool(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.Bool, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableColor.cs

@@ -26,7 +26,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableColor(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.Color, depth, layout, property)

+ 71 - 0
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableColorDistribution.cs

@@ -0,0 +1,71 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2018 Marko Pintera ([email protected]). All rights reserved. **********************//
+using BansheeEngine;
+
+namespace BansheeEditor
+{
+    /** @addtogroup Inspector
+     *  @{
+     */
+
+    /// <summary>
+    /// Displays GUI for a serializable property containing a color distribution. GUI elements will switch between
+    /// color and color gradient input depending on the distribution type. 
+    /// </summary>
+    public class InspectableColorDistribution : InspectableField
+    {
+        private GUIColorDistributionField guiDistributionField;
+        private InspectableState state;
+
+        /// <summary>
+        /// Creates a new inspectable color distribution GUI for the specified property.
+        /// </summary>
+        /// <param name="parent">Parent Inspector this field belongs to.</param>
+        /// <param name="title">Name of the property, or some other value to set as the title.</param>
+        /// <param name="path">Full path to this property (includes name of this property and all parent properties).</param>
+        /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
+        ///                     contain other fields, in which case you should increase this value by one.</param>
+        /// <param name="layout">Parent layout that all the field elements will be added to.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
+        public InspectableColorDistribution(Inspector parent, string title, string path, int depth,
+            InspectableFieldLayout layout, SerializableProperty property)
+            : base(parent, title, path, SerializableProperty.FieldType.ColorDistribution, depth, layout, property)
+        { }
+
+        /// <inheritoc/>
+        protected internal override void Initialize(int layoutIndex)
+        {
+            if (property != null)
+            {
+                guiDistributionField = new GUIColorDistributionField(new GUIContent(title));
+                guiDistributionField.OnChanged += OnFieldValueChanged;
+
+                layout.AddElement(layoutIndex, guiDistributionField);
+            }
+        }
+
+        /// <inheritdoc/>
+        public override InspectableState Refresh(int layoutIndex)
+        {
+            if (guiDistributionField != null)
+                guiDistributionField.Value = property.GetValue<ColorDistribution>();
+
+            InspectableState oldState = state;
+            if (state.HasFlag(InspectableState.Modified))
+                state = InspectableState.NotModified;
+
+            return oldState;
+        }
+
+        /// <summary>
+        /// Triggered when the user edits the distribution.
+        /// </summary>
+        private void OnFieldValueChanged()
+        {
+            property.SetValue(guiDistributionField.Value);
+            state |= InspectableState.ModifyInProgress;
+        }
+    }
+
+    /** @} */
+}

+ 72 - 0
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableColorGradient.cs

@@ -0,0 +1,72 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2018 Marko Pintera ([email protected]). All rights reserved. **********************//
+using BansheeEngine;
+
+namespace BansheeEditor
+{
+    /** @addtogroup Inspector
+     *  @{
+     */
+
+    /// <summary>
+    /// Displays GUI for a serializable property containing a color gradient. Color is displayed as a GUI field that allows
+    /// the user to manipulate the gradient using a color gradient picker.
+    /// </summary>
+    public class InspectableColorGradient : InspectableField
+    {
+        private GUIColorGradientField guiField;
+        private InspectableState state;
+
+        /// <summary>
+        /// Creates a new inspectable color gradient GUI for the specified property.
+        /// </summary>
+        /// <param name="parent">Parent Inspector this field belongs to.</param>
+        /// <param name="title">Name of the property, or some other value to set as the title.</param>
+        /// <param name="path">Full path to this property (includes name of this property and all parent properties).</param>
+        /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
+        ///                     contain other fields, in which case you should increase this value by one.</param>
+        /// <param name="layout">Parent layout that all the field elements will be added to.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
+        public InspectableColorGradient(Inspector parent, string title, string path, int depth, 
+            InspectableFieldLayout layout, SerializableProperty property)
+            : base(parent, title, path, SerializableProperty.FieldType.ColorGradient, depth, layout, property)
+        { }
+
+        /// <inheritoc/>
+        protected internal override void Initialize(int layoutIndex)
+        {
+            if (property != null)
+            {
+                guiField = new GUIColorGradientField(new GUIContent(title));
+                guiField.OnChanged += OnFieldValueChanged;
+
+                layout.AddElement(layoutIndex, guiField);
+            }
+        }
+
+        /// <inheritdoc/>
+        public override InspectableState Refresh(int layoutIndex)
+        {
+            if (guiField != null)
+                guiField.Value = property.GetValue<ColorGradient>();
+
+            InspectableState oldState = state;
+            if (state.HasFlag(InspectableState.Modified))
+                state = InspectableState.NotModified;
+
+            return oldState;
+        }
+
+        /// <summary>
+        /// Triggered when the user updates the color gradient.
+        /// </summary>
+        /// <param name="newValue">New value of the gradient field.</param>
+        private void OnFieldValueChanged(ColorGradient newValue)
+        {
+            property.SetValue(newValue);
+            state = InspectableState.Modified;
+        }
+    }
+
+    /** @} */
+}

+ 72 - 0
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableCurve.cs

@@ -0,0 +1,72 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2018 Marko Pintera ([email protected]). All rights reserved. **********************//
+using BansheeEngine;
+
+namespace BansheeEditor
+{
+    /** @addtogroup Inspector
+     *  @{
+     */
+
+    /// <summary>
+    /// Displays GUI for a serializable property containing a curve. Curve is displayed as a GUI field that allows
+    /// the user to manipulate the curve using a curve editor window.
+    /// </summary>
+    public class InspectableCurve : InspectableField
+    {
+        private GUICurvesField guiField;
+        private InspectableState state;
+
+        /// <summary>
+        /// Creates a new inspectable curve GUI for the specified property.
+        /// </summary>
+        /// <param name="parent">Parent Inspector this field belongs to.</param>
+        /// <param name="title">Name of the property, or some other value to set as the title.</param>
+        /// <param name="path">Full path to this property (includes name of this property and all parent properties).</param>
+        /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
+        ///                     contain other fields, in which case you should increase this value by one.</param>
+        /// <param name="layout">Parent layout that all the field elements will be added to.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
+        public InspectableCurve(Inspector parent, string title, string path, int depth,
+            InspectableFieldLayout layout, SerializableProperty property)
+            : base(parent, title, path, SerializableProperty.FieldType.Curve, depth, layout, property)
+        { }
+
+        /// <inheritoc/>
+        protected internal override void Initialize(int layoutIndex)
+        {
+            if (property != null)
+            {
+                guiField = new GUICurvesField(new GUIContent(title));
+                guiField.OnChanged += OnFieldValueChanged;
+
+                layout.AddElement(layoutIndex, guiField);
+            }
+        }
+
+        /// <inheritdoc/>
+        public override InspectableState Refresh(int layoutIndex)
+        {
+            if (guiField != null)
+                guiField.SetCurve(property.GetValue<AnimationCurve>());
+
+            InspectableState oldState = state;
+            if (state.HasFlag(InspectableState.Modified))
+                state = InspectableState.NotModified;
+
+            return oldState;
+        }
+
+        /// <summary>
+        /// Triggered when the user updates the curve.
+        /// </summary>
+        /// <param name="newValue">New curve.</param>
+        private void OnFieldValueChanged(AnimationCurve newValue)
+        {
+            property.SetValue(newValue);
+            state = InspectableState.Modified;
+        }
+    }
+
+    /** @} */
+}

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableDictionary.cs

@@ -28,7 +28,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the dictionary whose contents to display.</param>
         public InspectableDictionary(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.Dictionary, depth, layout, property)

+ 12 - 0
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableField.cs

@@ -172,6 +172,18 @@ namespace BansheeEditor
                     case SerializableProperty.FieldType.Color:
                         field = new InspectableColor(parent, title, path, depth, layout, property);
                         break;
+                    case SerializableProperty.FieldType.ColorGradient:
+                        field = new InspectableColorGradient(parent, title, path, depth, layout, property);
+                        break;
+                    case SerializableProperty.FieldType.Curve:
+                        field = new InspectableCurve(parent, title, path, depth, layout, property);
+                        break;
+                    case SerializableProperty.FieldType.FloatDistribution:
+                        field = new InspectableFloatDistribution(parent, title, path, depth, layout, property);
+                        break;
+                    case SerializableProperty.FieldType.ColorDistribution:
+                        field = new InspectableColorDistribution(parent, title, path, depth, layout, property);
+                        break;
                     case SerializableProperty.FieldType.String:
                         field = new InspectableString(parent, title, path, depth, layout, property);
                         break;

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableFloat.cs

@@ -26,7 +26,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         /// <param name="style">Contains information about the field style</param>
         public InspectableFloat(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property, InspectableFieldStyleInfo style)

+ 82 - 0
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableFloatDistribution.cs

@@ -0,0 +1,82 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2018 Marko Pintera ([email protected]). All rights reserved. **********************//
+using BansheeEngine;
+
+namespace BansheeEditor
+{
+    /** @addtogroup Inspector
+     *  @{
+     */
+
+    /// <summary>
+    /// Displays GUI for a serializable property containing a floating point distribution. GUI elements will switch between
+    /// floating point and curve input depending on the distribution type. 
+    /// </summary>
+    public class InspectableFloatDistribution : InspectableField
+    {
+        private GUIFloatDistributionField guiDistributionField;
+        private InspectableState state;
+
+        /// <summary>
+        /// Creates a new inspectable float distribution GUI for the specified property.
+        /// </summary>
+        /// <param name="parent">Parent Inspector this field belongs to.</param>
+        /// <param name="title">Name of the property, or some other value to set as the title.</param>
+        /// <param name="path">Full path to this property (includes name of this property and all parent properties).</param>
+        /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
+        ///                     contain other fields, in which case you should increase this value by one.</param>
+        /// <param name="layout">Parent layout that all the field elements will be added to.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
+        public InspectableFloatDistribution(Inspector parent, string title, string path, int depth, 
+            InspectableFieldLayout layout, SerializableProperty property)
+            : base(parent, title, path, SerializableProperty.FieldType.FloatDistribution, depth, layout, property)
+        { }
+
+        /// <inheritoc/>
+        protected internal override void Initialize(int layoutIndex)
+        {
+            if (property != null)
+            {
+                guiDistributionField = new GUIFloatDistributionField(new GUIContent(title));
+                guiDistributionField.OnChanged += OnFieldValueChanged;
+                guiDistributionField.OnConfirmed += OnFieldValueConfirm;
+                guiDistributionField.OnFocusLost += OnFieldValueConfirm;
+
+                layout.AddElement(layoutIndex, guiDistributionField);
+            }
+        }
+
+        /// <inheritdoc/>
+        public override InspectableState Refresh(int layoutIndex)
+        {
+            if (guiDistributionField != null && !guiDistributionField.HasInputFocus)
+                guiDistributionField.Value = property.GetValue<FloatDistribution>();
+
+            InspectableState oldState = state;
+            if (state.HasFlag(InspectableState.Modified))
+                state = InspectableState.NotModified;
+
+            return oldState;
+        }
+
+        /// <summary>
+        /// Triggered when the user edits the distribution.
+        /// </summary>
+        private void OnFieldValueChanged()
+        {
+            property.SetValue(guiDistributionField.Value);
+            state |= InspectableState.ModifyInProgress;
+        }
+
+        /// <summary>
+        /// Triggered when the user confirms input in the float fields used for displaying the non-curve distribution.
+        /// </summary>
+        private void OnFieldValueConfirm()
+        {
+            if (state.HasFlag(InspectableState.ModifyInProgress))
+                state |= InspectableState.Modified;
+        }
+    }
+
+    /** @} */
+}

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableGameObjectRef.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableGameObjectRef(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout,
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.GameObjectRef, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableInt.cs

@@ -27,7 +27,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         /// <param name="style">Contains information about the field style</param>
         public InspectableInt(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property, InspectableFieldStyleInfo style)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableList.cs

@@ -28,7 +28,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the list whose contents to display.</param>
         public InspectableList(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout,
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.List, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableObject.cs

@@ -38,7 +38,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the object whose contents to display.</param>
         public InspectableObject(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.Object, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableRRef.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableRRef(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout,
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.RRef, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableRangedField.cs

@@ -24,7 +24,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         /// <param name="style">Contains information about the field style</param>
         public InspectableRangedField(Inspector parent, string title, string path, SerializableProperty.FieldType type,
             int depth, InspectableFieldLayout layout, SerializableProperty property, InspectableFieldStyleInfo style) : base(parent, title, path, type, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableRangedFloat.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         /// <param name="style">Contains information about the field style.</param>
         public InspectableRangedFloat(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout,
             SerializableProperty property, InspectableFieldStyleInfo style)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableRangedInt.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         /// <param name="style">Information about the range of the field.</param>
         public InspectableRangedInt(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout,
             SerializableProperty property, InspectableFieldStyleInfo style)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableResource.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableResource(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout,
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.Resource, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableString.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableString(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout,
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.String, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableVector2.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableVector2(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.Vector2, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableVector3.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableVector3(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.Vector3, depth, layout, property)

+ 1 - 1
Source/Scripting/MBansheeEditor/Windows/Inspector/InspectableVector4.cs

@@ -25,7 +25,7 @@ namespace BansheeEditor
         /// <param name="depth">Determines how deep within the inspector nesting hierarchy is this field. Some fields may
         ///                     contain other fields, in which case you should increase this value by one.</param>
         /// <param name="layout">Parent layout that all the field elements will be added to.</param>
-        /// <param name="property">Serializable property referencing the array whose contents to display.</param>
+        /// <param name="property">Serializable property referencing the field whose contents to display.</param>
         public InspectableVector4(Inspector parent, string title, string path, int depth, InspectableFieldLayout layout, 
             SerializableProperty property)
             : base(parent, title, path, SerializableProperty.FieldType.Vector4, depth, layout, property)

+ 12 - 0
Source/Scripting/MBansheeEngine/Serialization/SerializableProperty.cs

@@ -37,6 +37,10 @@ namespace BansheeEngine
             List,
             Dictionary,
             RRef,
+            ColorGradient,
+            Curve,
+            FloatDistribution,
+            ColorDistribution
         }
 
         public delegate object Getter();
@@ -357,6 +361,14 @@ namespace BansheeEngine
                     return FieldType.Vector4;
                 else if (internalType == typeof (Color))
                     return FieldType.Color;
+                else if (internalType == typeof(ColorGradient))
+                    return FieldType.ColorGradient;
+                else if (internalType == typeof(AnimationCurve))
+                    return FieldType.Curve;
+                else if (internalType == typeof(FloatDistribution))
+                    return FieldType.FloatDistribution;
+                else if (internalType == typeof(ColorDistribution))
+                    return FieldType.ColorDistribution;
                 else if (internalType.IsSubclassOf(typeof (GameObject)))
                     return FieldType.GameObjectRef;
                 else if (internalType.IsSubclassOf(typeof (Resource)))

+ 36 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUICurvesField.generated.cpp

@@ -22,6 +22,9 @@ namespace bs
 	{
 		metaData.scriptClass->addInternalCall("Internal_setCurve", (void*)&ScriptGUICurvesField::Internal_setCurve);
 		metaData.scriptClass->addInternalCall("Internal_setCurveRange", (void*)&ScriptGUICurvesField::Internal_setCurveRange);
+		metaData.scriptClass->addInternalCall("Internal_getCurve", (void*)&ScriptGUICurvesField::Internal_getCurve);
+		metaData.scriptClass->addInternalCall("Internal_getMinCurve", (void*)&ScriptGUICurvesField::Internal_getMinCurve);
+		metaData.scriptClass->addInternalCall("Internal_getMaxCurve", (void*)&ScriptGUICurvesField::Internal_getMaxCurve);
 		metaData.scriptClass->addInternalCall("Internal_create", (void*)&ScriptGUICurvesField::Internal_create);
 		metaData.scriptClass->addInternalCall("Internal_create0", (void*)&ScriptGUICurvesField::Internal_create0);
 		metaData.scriptClass->addInternalCall("Internal_create1", (void*)&ScriptGUICurvesField::Internal_create1);
@@ -57,6 +60,39 @@ namespace bs
 		static_cast<GUICurvesField*>(thisPtr->getGUIElement())->setCurveRange(*tmpcurveA, *tmpcurveB);
 	}
 
+	MonoObject* ScriptGUICurvesField::Internal_getCurve(ScriptGUICurvesField* thisPtr)
+	{
+		SPtr<TAnimationCurve<float>> tmp__output = bs_shared_ptr_new<TAnimationCurve<float>>();
+		*tmp__output = static_cast<GUICurvesField*>(thisPtr->getGUIElement())->getCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurvefloat::create(tmp__output);
+
+		return __output;
+	}
+
+	MonoObject* ScriptGUICurvesField::Internal_getMinCurve(ScriptGUICurvesField* thisPtr)
+	{
+		SPtr<TAnimationCurve<float>> tmp__output = bs_shared_ptr_new<TAnimationCurve<float>>();
+		*tmp__output = static_cast<GUICurvesField*>(thisPtr->getGUIElement())->getMinCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurvefloat::create(tmp__output);
+
+		return __output;
+	}
+
+	MonoObject* ScriptGUICurvesField::Internal_getMaxCurve(ScriptGUICurvesField* thisPtr)
+	{
+		SPtr<TAnimationCurve<float>> tmp__output = bs_shared_ptr_new<TAnimationCurve<float>>();
+		*tmp__output = static_cast<GUICurvesField*>(thisPtr->getGUIElement())->getMaxCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurvefloat::create(tmp__output);
+
+		return __output;
+	}
+
 	void ScriptGUICurvesField::Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style)
 	{
 		GUIContent tmplabelContent;

+ 3 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUICurvesField.generated.h

@@ -25,6 +25,9 @@ namespace bs
 
 		static void Internal_setCurve(ScriptGUICurvesField* thisPtr, MonoObject* curve);
 		static void Internal_setCurveRange(ScriptGUICurvesField* thisPtr, MonoObject* curveA, MonoObject* curveB);
+		static MonoObject* Internal_getCurve(ScriptGUICurvesField* thisPtr);
+		static MonoObject* Internal_getMinCurve(ScriptGUICurvesField* thisPtr);
+		static MonoObject* Internal_getMaxCurve(ScriptGUICurvesField* thisPtr);
 		static void Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style);
 		static void Internal_create0(MonoObject* managedInstance, __GUIContentInterop* labelContent, MonoString* style);
 		static void Internal_create1(MonoObject* managedInstance, MonoObject* labelText, uint32_t labelWidth, MonoString* style);

+ 20 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIFloatDistributionField.generated.cpp

@@ -12,18 +12,21 @@ namespace bs
 {
 	ScriptGUIFloatDistributionField::onClickedThunkDef ScriptGUIFloatDistributionField::onClickedThunk; 
 	ScriptGUIFloatDistributionField::onConstantModifiedThunkDef ScriptGUIFloatDistributionField::onConstantModifiedThunk; 
+	ScriptGUIFloatDistributionField::onConstantConfirmedThunkDef ScriptGUIFloatDistributionField::onConstantConfirmedThunk; 
 
 	ScriptGUIFloatDistributionField::ScriptGUIFloatDistributionField(MonoObject* managedInstance, GUIFloatDistributionField* value)
 		:TScriptGUIElement(managedInstance, value)
 	{
 		value->onClicked.connect(std::bind(&ScriptGUIFloatDistributionField::onClicked, this));
 		value->onConstantModified.connect(std::bind(&ScriptGUIFloatDistributionField::onConstantModified, this));
+		value->onConstantConfirmed.connect(std::bind(&ScriptGUIFloatDistributionField::onConstantConfirmed, this));
 	}
 
 	void ScriptGUIFloatDistributionField::initRuntimeData()
 	{
 		metaData.scriptClass->addInternalCall("Internal_getValue", (void*)&ScriptGUIFloatDistributionField::Internal_getValue);
 		metaData.scriptClass->addInternalCall("Internal_setValue", (void*)&ScriptGUIFloatDistributionField::Internal_setValue);
+		metaData.scriptClass->addInternalCall("Internal_hasInputFocus", (void*)&ScriptGUIFloatDistributionField::Internal_hasInputFocus);
 		metaData.scriptClass->addInternalCall("Internal_create", (void*)&ScriptGUIFloatDistributionField::Internal_create);
 		metaData.scriptClass->addInternalCall("Internal_create0", (void*)&ScriptGUIFloatDistributionField::Internal_create0);
 		metaData.scriptClass->addInternalCall("Internal_create1", (void*)&ScriptGUIFloatDistributionField::Internal_create1);
@@ -32,6 +35,7 @@ namespace bs
 
 		onClickedThunk = (onClickedThunkDef)metaData.scriptClass->getMethodExact("Internal_onClicked", "")->getThunk();
 		onConstantModifiedThunk = (onConstantModifiedThunkDef)metaData.scriptClass->getMethodExact("Internal_onConstantModified", "")->getThunk();
+		onConstantConfirmedThunk = (onConstantConfirmedThunkDef)metaData.scriptClass->getMethodExact("Internal_onConstantConfirmed", "")->getThunk();
 	}
 
 	void ScriptGUIFloatDistributionField::onClicked()
@@ -43,6 +47,11 @@ namespace bs
 	{
 		MonoUtil::invokeThunk(onConstantModifiedThunk, getManagedInstance());
 	}
+
+	void ScriptGUIFloatDistributionField::onConstantConfirmed()
+	{
+		MonoUtil::invokeThunk(onConstantConfirmedThunk, getManagedInstance());
+	}
 	MonoObject* ScriptGUIFloatDistributionField::Internal_getValue(ScriptGUIFloatDistributionField* thisPtr)
 	{
 		SPtr<TDistribution<float>> tmp__output = bs_shared_ptr_new<TDistribution<float>>();
@@ -63,6 +72,17 @@ namespace bs
 		static_cast<GUIFloatDistributionField*>(thisPtr->getGUIElement())->setValue(*tmpvalue);
 	}
 
+	bool ScriptGUIFloatDistributionField::Internal_hasInputFocus(ScriptGUIFloatDistributionField* thisPtr)
+	{
+		bool tmp__output;
+		tmp__output = static_cast<GUIFloatDistributionField*>(thisPtr->getGUIElement())->hasInputFocus();
+
+		bool __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
 	void ScriptGUIFloatDistributionField::Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style)
 	{
 		GUIContent tmplabelContent;

+ 4 - 0
Source/Scripting/SBansheeEditor/Generated/BsScriptGUIFloatDistributionField.generated.h

@@ -20,14 +20,18 @@ namespace bs
 	private:
 		void onClicked();
 		void onConstantModified();
+		void onConstantConfirmed();
 
 		typedef void(BS_THUNKCALL *onClickedThunkDef) (MonoObject*, MonoException**);
 		static onClickedThunkDef onClickedThunk;
 		typedef void(BS_THUNKCALL *onConstantModifiedThunkDef) (MonoObject*, MonoException**);
 		static onConstantModifiedThunkDef onConstantModifiedThunk;
+		typedef void(BS_THUNKCALL *onConstantConfirmedThunkDef) (MonoObject*, MonoException**);
+		static onConstantConfirmedThunkDef onConstantConfirmedThunk;
 
 		static MonoObject* Internal_getValue(ScriptGUIFloatDistributionField* thisPtr);
 		static void Internal_setValue(ScriptGUIFloatDistributionField* thisPtr, MonoObject* value);
+		static bool Internal_hasInputFocus(ScriptGUIFloatDistributionField* thisPtr);
 		static void Internal_create(MonoObject* managedInstance, __GUIContentInterop* labelContent, uint32_t labelWidth, MonoString* style);
 		static void Internal_create0(MonoObject* managedInstance, __GUIContentInterop* labelContent, MonoString* style);
 		static void Internal_create1(MonoObject* managedInstance, MonoObject* labelText, uint32_t labelWidth, MonoString* style);

+ 1 - 1
Source/bsf

@@ -1 +1 @@
-Subproject commit b8a844284129d13c5dc2f0d97987e6674662e135
+Subproject commit a62a37f220be3737b85626f09e94b5874df04f77