浏览代码

Renamed GUiLayoutExplicit -> GUIPanel
GUILayoutUtility::calcBounds now returns coordinates relative to parent GUIPanel
Various other renames

Marko Pintera 10 年之前
父节点
当前提交
d693b8733c
共有 100 个文件被更改,包括 488 次插入457 次删除
  1. 1 1
      BansheeEditor/Include/BsDockManager.h
  2. 2 2
      BansheeEditor/Include/BsGUIColor.h
  3. 1 1
      BansheeEditor/Include/BsGUIColorField.h
  4. 2 2
      BansheeEditor/Include/BsGUIComponentFoldout.h
  5. 2 2
      BansheeEditor/Include/BsGUIDockSlider.h
  6. 2 2
      BansheeEditor/Include/BsGUIDropButton.h
  7. 13 13
      BansheeEditor/Include/BsGUIFieldBase.h
  8. 1 1
      BansheeEditor/Include/BsGUIFloatField.h
  9. 2 2
      BansheeEditor/Include/BsGUIFoldout.h
  10. 1 1
      BansheeEditor/Include/BsGUIIntField.h
  11. 1 1
      BansheeEditor/Include/BsGUIResourceTreeView.h
  12. 1 1
      BansheeEditor/Include/BsGUISceneTreeView.h
  13. 3 3
      BansheeEditor/Include/BsGUITabButton.h
  14. 2 2
      BansheeEditor/Include/BsGUITabbedTitleBar.h
  15. 6 6
      BansheeEditor/Include/BsGUITextField.h
  16. 1 1
      BansheeEditor/Include/BsGUIToggleField.h
  17. 1 1
      BansheeEditor/Include/BsGUITreeView.h
  18. 2 2
      BansheeEditor/Include/BsGUITreeViewEditBox.h
  19. 1 1
      BansheeEditor/Include/BsGUIVector2Field.h
  20. 1 1
      BansheeEditor/Include/BsGUIVector3Field.h
  21. 1 1
      BansheeEditor/Include/BsGUIVector4Field.h
  22. 2 2
      BansheeEditor/Include/BsGUIWindowDropArea.h
  23. 2 2
      BansheeEditor/Include/BsGUIWindowFrame.h
  24. 2 2
      BansheeEditor/Source/BsDockManager.cpp
  25. 4 4
      BansheeEditor/Source/BsGUIColor.cpp
  26. 2 2
      BansheeEditor/Source/BsGUIColorField.cpp
  27. 4 4
      BansheeEditor/Source/BsGUIComponentFoldout.cpp
  28. 4 4
      BansheeEditor/Source/BsGUIDockSlider.cpp
  29. 4 4
      BansheeEditor/Source/BsGUIDropButton.cpp
  30. 2 2
      BansheeEditor/Source/BsGUIFieldBase.cpp
  31. 2 2
      BansheeEditor/Source/BsGUIFloatField.cpp
  32. 4 4
      BansheeEditor/Source/BsGUIFoldout.cpp
  33. 2 2
      BansheeEditor/Source/BsGUIIntField.cpp
  34. 2 2
      BansheeEditor/Source/BsGUIResourceTreeView.cpp
  35. 2 2
      BansheeEditor/Source/BsGUISceneTreeView.cpp
  36. 6 6
      BansheeEditor/Source/BsGUITabButton.cpp
  37. 4 4
      BansheeEditor/Source/BsGUITabbedTitleBar.cpp
  38. 12 12
      BansheeEditor/Source/BsGUITextField.cpp
  39. 2 2
      BansheeEditor/Source/BsGUIToggleField.cpp
  40. 2 2
      BansheeEditor/Source/BsGUITreeView.cpp
  41. 4 4
      BansheeEditor/Source/BsGUITreeViewEditBox.cpp
  42. 2 2
      BansheeEditor/Source/BsGUIVector2Field.cpp
  43. 2 2
      BansheeEditor/Source/BsGUIVector3Field.cpp
  44. 2 2
      BansheeEditor/Source/BsGUIVector4Field.cpp
  45. 4 4
      BansheeEditor/Source/BsGUIWindowDropArea.cpp
  46. 4 4
      BansheeEditor/Source/BsGUIWindowFrame.cpp
  47. 0 43
      BansheeEditor/Source/DbgEditorWidget1.cpp
  48. 2 2
      BansheeEngine/BansheeEngine.vcxproj
  49. 6 6
      BansheeEngine/BansheeEngine.vcxproj.filters
  50. 9 9
      BansheeEngine/Include/BsGUIButton.h
  51. 1 1
      BansheeEngine/Include/BsGUIButtonBase.h
  52. 4 4
      BansheeEngine/Include/BsGUIDropDownContent.h
  53. 4 4
      BansheeEngine/Include/BsGUIDropDownHitBox.h
  54. 4 3
      BansheeEngine/Include/BsGUIElementBase.h
  55. 1 1
      BansheeEngine/Include/BsGUIElementContainer.h
  56. 6 6
      BansheeEngine/Include/BsGUIHelper.h
  57. 7 7
      BansheeEngine/Include/BsGUIInputBox.h
  58. 7 7
      BansheeEngine/Include/BsGUILabel.h
  59. 2 1
      BansheeEngine/Include/BsGUILayout.h
  60. 1 1
      BansheeEngine/Include/BsGUILayoutUtility.h
  61. 8 0
      BansheeEngine/Include/BsGUILayoutX.h
  62. 8 0
      BansheeEngine/Include/BsGUILayoutY.h
  63. 4 4
      BansheeEngine/Include/BsGUIListBox.h
  64. 21 8
      BansheeEngine/Include/BsGUIPanel.h
  65. 4 4
      BansheeEngine/Include/BsGUIProgressBar.h
  66. 4 4
      BansheeEngine/Include/BsGUIRenderTexture.h
  67. 7 7
      BansheeEngine/Include/BsGUIScrollArea.h
  68. 3 3
      BansheeEngine/Include/BsGUIScrollBar.h
  69. 4 4
      BansheeEngine/Include/BsGUIScrollBarHorz.h
  70. 4 4
      BansheeEngine/Include/BsGUIScrollBarVert.h
  71. 9 9
      BansheeEngine/Include/BsGUISlider.h
  72. 4 4
      BansheeEngine/Include/BsGUISliderHandle.h
  73. 16 16
      BansheeEngine/Include/BsGUITexture.h
  74. 11 11
      BansheeEngine/Include/BsGUIToggle.h
  75. 4 4
      BansheeEngine/Include/BsGUIViewport.h
  76. 1 1
      BansheeEngine/Include/BsPrerequisites.h
  77. 2 2
      BansheeEngine/Source/BsGUIArea.cpp
  78. 6 6
      BansheeEngine/Source/BsGUIButton.cpp
  79. 2 2
      BansheeEngine/Source/BsGUIButtonBase.cpp
  80. 4 4
      BansheeEngine/Source/BsGUIDropDownContent.cpp
  81. 4 4
      BansheeEngine/Source/BsGUIDropDownHitBox.cpp
  82. 4 4
      BansheeEngine/Source/BsGUIElementBase.cpp
  83. 2 2
      BansheeEngine/Source/BsGUIElementContainer.cpp
  84. 5 5
      BansheeEngine/Source/BsGUIHelper.cpp
  85. 6 6
      BansheeEngine/Source/BsGUIInputBox.cpp
  86. 6 6
      BansheeEngine/Source/BsGUILabel.cpp
  87. 6 8
      BansheeEngine/Source/BsGUILayout.cpp
  88. 12 4
      BansheeEngine/Source/BsGUILayoutUtility.cpp
  89. 35 21
      BansheeEngine/Source/BsGUILayoutX.cpp
  90. 37 23
      BansheeEngine/Source/BsGUILayoutY.cpp
  91. 4 4
      BansheeEngine/Source/BsGUIListBox.cpp
  92. 20 11
      BansheeEngine/Source/BsGUIPanel.cpp
  93. 4 4
      BansheeEngine/Source/BsGUIProgressBar.cpp
  94. 4 4
      BansheeEngine/Source/BsGUIRenderTexture.cpp
  95. 6 6
      BansheeEngine/Source/BsGUIScrollArea.cpp
  96. 2 2
      BansheeEngine/Source/BsGUIScrollBar.cpp
  97. 4 4
      BansheeEngine/Source/BsGUIScrollBarHorz.cpp
  98. 4 4
      BansheeEngine/Source/BsGUIScrollBarVert.cpp
  99. 10 10
      BansheeEngine/Source/BsGUISlider.cpp
  100. 4 4
      BansheeEngine/Source/BsGUISliderHandle.cpp

+ 1 - 1
BansheeEditor/Include/BsDockManager.h

@@ -101,7 +101,7 @@ namespace BansheeEngine
 		void updateClippedBounds();
 
 	private:
-		DockManager(EditorWindowBase* parentWindow, const GUIDimensions& layoutOptions);
+		DockManager(EditorWindowBase* parentWindow, const GUIDimensions& dimensions);
 
 		static const Color TINT_COLOR;
 		static const Color HIGHLIGHT_COLOR;

+ 2 - 2
BansheeEditor/Include/BsGUIColor.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 		static const String& getGUITypeName();
 
 		static GUIColor* create(const String& styleName = StringUtil::BLANK);
-		static GUIColor* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIColor* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		virtual Vector2I _getOptimalSize() const;
 
@@ -27,7 +27,7 @@ namespace BansheeEngine
 
 		Event<void(const Color&)> onValueChanged;
 	protected:
-		GUIColor(const String& styleName, const GUIDimensions& layoutOptions);
+		GUIColor(const String& styleName, const GUIDimensions& dimensions);
 		virtual ~GUIColor();
 
 		/**

+ 1 - 1
BansheeEditor/Include/BsGUIColorField.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 		static const String& getColorInputStyleType();
 
 		GUIColorField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
 		Color getValue() const { return mValue; }
 		void setValue(const Color& value);

+ 2 - 2
BansheeEditor/Include/BsGUIComponentFoldout.h

@@ -13,10 +13,10 @@ namespace BansheeEngine
 		static const String& getGUITypeName();
 		static const String& getFoldoutButtonStyleType();
 
-		static GUIComponentFoldout* create(const HString& label, const GUIOptions& layoutOptions, const String& style = StringUtil::BLANK);
+		static GUIComponentFoldout* create(const HString& label, const GUIOptions& options, const String& style = StringUtil::BLANK);
 		static GUIComponentFoldout* create(const HString& label, const String& style = StringUtil::BLANK);
 
-		GUIComponentFoldout(const PrivatelyConstruct& dummy, const HString& label, const String& style, const GUIDimensions& layoutOptions);
+		GUIComponentFoldout(const PrivatelyConstruct& dummy, const HString& label, const String& style, const GUIDimensions& dimensions);
 
 		bool isExpanded() const { return mIsExpanded; }
 		void setExpanded(bool expanded);

+ 2 - 2
BansheeEditor/Include/BsGUIDockSlider.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 		static const String& getGUITypeName();
 
 		static GUIDockSlider* create(bool horizontal, const String& styleName = StringUtil::BLANK);
-		static GUIDockSlider* create(bool horizontal, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIDockSlider* create(bool horizontal, const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		Event<void(const Vector2I&)> onDragged;
 	protected:
@@ -26,6 +26,6 @@ namespace BansheeEngine
 		bool mIsCursorSet;
 		bool mDragInProgress;
 
-		GUIDockSlider(bool horizontal, const String& styleName, const GUIDimensions& layoutOptions);
+		GUIDockSlider(bool horizontal, const String& styleName, const GUIDimensions& dimensions);
 	};
 }

+ 2 - 2
BansheeEditor/Include/BsGUIDropButton.h

@@ -16,7 +16,7 @@ namespace BansheeEngine
 		static const String& getGUITypeName();
 
 		static GUIDropButton* create(UINT32 dragType, const String& styleName = StringUtil::BLANK);
-		static GUIDropButton* create(UINT32 dragType, const GUIOptions& layoutOptions, 
+		static GUIDropButton* create(UINT32 dragType, const GUIOptions& options, 
 			const String& styleName = StringUtil::BLANK);
 
 		Event<void(void*)> onDataDropped;
@@ -24,7 +24,7 @@ namespace BansheeEngine
 		virtual ~GUIDropButton();
 
 	protected:
-		GUIDropButton(UINT32 dragType, const String& styleName, const GUIDimensions& layoutOptions);
+		GUIDropButton(UINT32 dragType, const String& styleName, const GUIDimensions& dimensions);
 
 		virtual bool _mouseEvent(const GUIMouseEvent& ev);
 		virtual bool _acceptDragAndDrop(const Vector2I position, UINT32 typeId) const;

+ 13 - 13
BansheeEditor/Include/BsGUIFieldBase.h

@@ -12,7 +12,7 @@ namespace BansheeEngine
 
 	public:
 		GUIFieldBase(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& labelStyle, const GUIDimensions& dimensions, bool withLabel);
 
 		void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
 			Rect2I clipRect, UINT8 widgetDepth, UINT16 areaDepth);
@@ -40,7 +40,7 @@ namespace BansheeEngine
 	class TGUIField : public GUIFieldBase
 	{
 	public:
-		static T* create(const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& layoutOptions,
+		static T* create(const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK)
 		{
 			const String* curStyle = &style;
@@ -48,10 +48,10 @@ namespace BansheeEngine
 				curStyle = &T::getGUITypeName();
 
 			return bs_new<T>(PrivatelyConstruct(), labelContent, labelWidth, *curStyle,
-				GUIDimensions::create(layoutOptions), true);
+				GUIDimensions::create(options), true);
 		}
 
-		static T* create(const GUIContent& labelContent, const GUIOptions& layoutOptions,
+		static T* create(const GUIContent& labelContent, const GUIOptions& options,
 			const String& style = StringUtil::BLANK)
 		{
 			const String* curStyle = &style;
@@ -59,10 +59,10 @@ namespace BansheeEngine
 				curStyle = &T::getGUITypeName();
 
 			return bs_new<T>(PrivatelyConstruct(), labelContent, DEFAULT_LABEL_WIDTH, *curStyle,
-				GUIDimensions::create(layoutOptions), true);
+				GUIDimensions::create(options), true);
 		}
 
-		static T* create(const HString& labelText, UINT32 labelWidth, const GUIOptions& layoutOptions,
+		static T* create(const HString& labelText, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK)
 		{
 			const String* curStyle = &style;
@@ -70,10 +70,10 @@ namespace BansheeEngine
 				curStyle = &T::getGUITypeName();
 
 			return bs_new<T>(PrivatelyConstruct(), GUIContent(labelText), labelWidth, *curStyle,
-				GUIDimensions::create(layoutOptions), true);
+				GUIDimensions::create(options), true);
 		}
 
-		static T* create(const HString& labelText, const GUIOptions& layoutOptions,
+		static T* create(const HString& labelText, const GUIOptions& options,
 			const String& style = StringUtil::BLANK)
 		{
 			const String* curStyle = &style;
@@ -81,17 +81,17 @@ namespace BansheeEngine
 				curStyle = &T::getGUITypeName();
 
 			return bs_new<T>(PrivatelyConstruct(), GUIContent(labelText), DEFAULT_LABEL_WIDTH, *curStyle,
-				GUIDimensions::create(layoutOptions), true);
+				GUIDimensions::create(options), true);
 		}
 
-		static T* create(const GUIOptions& layoutOptions, const String& style = StringUtil::BLANK)
+		static T* create(const GUIOptions& options, const String& style = StringUtil::BLANK)
 		{
 			const String* curStyle = &style;
 			if (*curStyle == StringUtil::BLANK)
 				curStyle = &T::getGUITypeName();
 
 			return bs_new<T>(PrivatelyConstruct(), GUIContent(), 0, *curStyle,
-				GUIDimensions::create(layoutOptions), false);
+				GUIDimensions::create(options), false);
 		}
 
 		static T* create(const GUIContent& labelContent, UINT32 labelWidth,
@@ -148,8 +148,8 @@ namespace BansheeEngine
 		}
 
 		TGUIField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-			:GUIFieldBase(dummy, labelContent, labelWidth, style, layoutOptions, withLabel)
+			const String& style, const GUIDimensions& dimensions, bool withLabel)
+			:GUIFieldBase(dummy, labelContent, labelWidth, style, dimensions, withLabel)
 		{ }
 	};
 }

+ 1 - 1
BansheeEditor/Include/BsGUIFloatField.h

@@ -12,7 +12,7 @@ namespace BansheeEngine
 		static const String& getInputStyleType();
 
 		GUIFloatField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
 		float getValue() const { return mValue; }
 		void setValue(float value);

+ 2 - 2
BansheeEditor/Include/BsGUIFoldout.h

@@ -14,10 +14,10 @@ namespace BansheeEngine
 		static const String& getFoldoutButtonStyleType();
 		static const String& getLabelStyleType();
 
-		static GUIFoldout* create(const HString& label, const GUIOptions& layoutOptions, const String& style = StringUtil::BLANK);
+		static GUIFoldout* create(const HString& label, const GUIOptions& options, const String& style = StringUtil::BLANK);
 		static GUIFoldout* create(const HString& label, const String& style = StringUtil::BLANK);
 
-		GUIFoldout(const PrivatelyConstruct& dummy, const HString& label, const String& style, const GUIDimensions& layoutOptions);
+		GUIFoldout(const PrivatelyConstruct& dummy, const HString& label, const String& style, const GUIDimensions& dimensions);
 
 		bool isExpanded() const { return mIsExpanded; }
 		void setExpanded(bool expanded);

+ 1 - 1
BansheeEditor/Include/BsGUIIntField.h

@@ -12,7 +12,7 @@ namespace BansheeEngine
 		static const String& getInputStyleType();
 
 		GUIIntField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
 		INT32 getValue() const { return mValue; }
 		void setValue(INT32 value);

+ 1 - 1
BansheeEditor/Include/BsGUIResourceTreeView.h

@@ -68,7 +68,7 @@ namespace BansheeEngine
 
 		GUIResourceTreeView(const String& backgroundStyle, const String& elementBtnStyle, 
 			const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& layoutOptions);
+			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions);
 
 		virtual void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
 			Rect2I clipRect, UINT8 widgetDepth, UINT16 areaDepth);

+ 1 - 1
BansheeEditor/Include/BsGUISceneTreeView.h

@@ -56,7 +56,7 @@ namespace BansheeEngine
 
 		GUISceneTreeView(const String& backgroundStyle, const String& elementBtnStyle, 
 			const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& layoutOptions);
+			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions);
 
 		void updateTreeElement(SceneTreeElement* element);
 

+ 3 - 3
BansheeEditor/Include/BsGUITabButton.h

@@ -16,12 +16,12 @@ namespace BansheeEngine
 		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const HString& text, 
 			const String& styleName = StringUtil::BLANK);
 		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const HString& text, 
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 	
 		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, 
 			const String& styleName = StringUtil::BLANK);
 		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, 
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		UINT32 getIndex() const { return mIndex; }
 		void _setDraggedState(bool active);
@@ -39,6 +39,6 @@ namespace BansheeEngine
 
 		static const UINT32 DRAG_MIN_DISTANCE;
 
-		GUITabButton(const String& styleName, const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, const GUIDimensions& layoutOptions);
+		GUITabButton(const String& styleName, const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, const GUIDimensions& dimensions);
 	};
 }

+ 2 - 2
BansheeEditor/Include/BsGUITabbedTitleBar.h

@@ -15,7 +15,7 @@ namespace BansheeEngine
 		static GUITabbedTitleBar* create(const String& backgroundStyle = StringUtil::BLANK, const String& tabBtnStyle = StringUtil::BLANK, 
 			const String& minBtnStyle = StringUtil::BLANK, const String& closeBtnStyle = StringUtil::BLANK);
 
-		static GUITabbedTitleBar* create(const GUIDimensions& layoutOptions, 
+		static GUITabbedTitleBar* create(const GUIDimensions& dimensions,
 			const String& backgroundStyle = StringUtil::BLANK, const String& tabBtnStyle = StringUtil::BLANK, 
 			const String& minBtnStyle = StringUtil::BLANK, const String& closeBtnStyle = StringUtil::BLANK);
 
@@ -67,7 +67,7 @@ namespace BansheeEngine
 		String mTabBtnStyle;
 
 		GUITabbedTitleBar(const String& backgroundStyle, const String& tabBtnStyle, 
-			const String& minBtnStyle, const String& closeBtnStyle, const GUIDimensions& layoutOptions);
+			const String& minBtnStyle, const String& closeBtnStyle, const GUIDimensions& dimensions);
 
 		virtual bool _mouseEvent(const GUIMouseEvent& ev);
 

+ 6 - 6
BansheeEditor/Include/BsGUITextField.h

@@ -14,19 +14,19 @@ namespace BansheeEngine
 		static const String& getGUITypeName();
 		static const String& getInputStyleType();
 
-		static GUITextField* create(bool multiline, const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& layoutOptions,
+		static GUITextField* create(bool multiline, const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
-		static GUITextField* create(bool multiline, const GUIContent& labelContent, const GUIOptions& layoutOptions,
+		static GUITextField* create(bool multiline, const GUIContent& labelContent, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
-		static GUITextField* create(bool multiline, const HString& labelText, UINT32 labelWidth, const GUIOptions& layoutOptions,
+		static GUITextField* create(bool multiline, const HString& labelText, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
-		static GUITextField* create(bool multiline, const HString& labelText, const GUIOptions& layoutOptions,
+		static GUITextField* create(bool multiline, const HString& labelText, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
-		static GUITextField* create(bool multiline, const GUIOptions& layoutOptions, const String& style = StringUtil::BLANK);
+		static GUITextField* create(bool multiline, const GUIOptions& options, const String& style = StringUtil::BLANK);
 
 		static GUITextField* create(bool multiline, const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
@@ -43,7 +43,7 @@ namespace BansheeEngine
 		static GUITextField* create(bool multiline, const String& style = StringUtil::BLANK);
 
 		GUITextField(const PrivatelyConstruct& dummy, bool multiline, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
 		void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
 			Rect2I clipRect, UINT8 widgetDepth, UINT16 areaDepth);

+ 1 - 1
BansheeEditor/Include/BsGUIToggleField.h

@@ -12,7 +12,7 @@ namespace BansheeEngine
 		static const String& getToggleStyleType();
 
 		GUIToggleField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
 		bool getValue() const { return mValue; }
 		void setValue(bool value);

+ 1 - 1
BansheeEditor/Include/BsGUITreeView.h

@@ -124,7 +124,7 @@ namespace BansheeEngine
 
 		GUITreeView(const String& backgroundStyle, const String& elementBtnStyle, 
 			const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& layoutOptions);
+			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions);
 
 		const GUITreeView::InteractableElement* findElementUnderCoord(const Vector2I& coord) const;
 		TreeElement* getTopMostSelectedElement() const;

+ 2 - 2
BansheeEditor/Include/BsGUITreeViewEditBox.h

@@ -11,13 +11,13 @@ namespace BansheeEngine
 		static const String& getGUITypeName();
 
 		static GUITreeViewEditBox* create(const String& styleName = StringUtil::BLANK);
-		static GUITreeViewEditBox* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUITreeViewEditBox* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		Event<void()> onInputConfirmed;
 		Event<void()> onInputCanceled;
 
 	private:
-		GUITreeViewEditBox(const String& styleName, const GUIDimensions& layoutOptions);
+		GUITreeViewEditBox(const String& styleName, const GUIDimensions& dimensions);
 
 		virtual bool _commandEvent(const GUICommandEvent& ev);
 	};

+ 1 - 1
BansheeEditor/Include/BsGUIVector2Field.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 		static const String& getFloatFieldStyleType();
 
 		GUIVector2Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
 		Vector2 getValue() const;
 		void setValue(const Vector2& value);

+ 1 - 1
BansheeEditor/Include/BsGUIVector3Field.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 		static const String& getFloatFieldStyleType();
 
 		GUIVector3Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
 		Vector3 getValue() const;
 		void setValue(const Vector3& value);

+ 1 - 1
BansheeEditor/Include/BsGUIVector4Field.h

@@ -13,7 +13,7 @@ namespace BansheeEngine
 		static const String& getFloatFieldStyleType();
 
 		GUIVector4Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& style, const GUIDimensions& layoutOptions, bool withLabel);
+			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
 		Vector4 getValue() const;
 		void setValue(const Vector4& value);

+ 2 - 2
BansheeEditor/Include/BsGUIWindowDropArea.h

@@ -12,14 +12,14 @@ namespace BansheeEngine
 		static const String& getGUITypeName();
 
 		static GUIWindowDropArea* create(const String& styleName = StringUtil::BLANK);
-		static GUIWindowDropArea* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIWindowDropArea* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		void setFocused(bool focused);
 
 		Event<void()> onDraggedItemDropped;
 	protected:
 		~GUIWindowDropArea();
-		GUIWindowDropArea(const String& styleName, const GUIDimensions& layoutOptions);
+		GUIWindowDropArea(const String& styleName, const GUIDimensions& dimensions);
 
 		virtual bool _mouseEvent(const GUIMouseEvent& ev);
 	};

+ 2 - 2
BansheeEditor/Include/BsGUIWindowFrame.h

@@ -12,11 +12,11 @@ namespace BansheeEngine
 		static const String& getGUITypeName();
 
 		static GUIWindowFrame* create(const String& styleName = StringUtil::BLANK);
-		static GUIWindowFrame* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIWindowFrame* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		void setFocused(bool focused);
 	protected:
 		~GUIWindowFrame();
-		GUIWindowFrame(const String& styleName, const GUIDimensions& layoutOptions);
+		GUIWindowFrame(const String& styleName, const GUIDimensions& dimensions);
 	};
 }

+ 2 - 2
BansheeEditor/Source/BsDockManager.cpp

@@ -408,8 +408,8 @@ namespace BansheeEngine
 		}
 	}
 
-	DockManager::DockManager(EditorWindowBase* parentWindow, const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mMouseOverContainer(nullptr), mHighlightedDropLoc(DockLocation::None),
+	DockManager::DockManager(EditorWindowBase* parentWindow, const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions), mMouseOverContainer(nullptr), mHighlightedDropLoc(DockLocation::None),
 		mShowOverlay(false), mRootContainer(this), mParentWindow(parentWindow)
 	{
 		mTopDropPolygon = bs_newN<Vector2>(4);

+ 4 - 4
BansheeEditor/Source/BsGUIColor.cpp

@@ -13,8 +13,8 @@ namespace BansheeEngine
 {
 	const float GUIColor::ALPHA_SPLIT_POSITION = 0.75f;
 
-	GUIColor::GUIColor(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIElement(styleName, layoutOptions), mColorSprite(nullptr), mAlphaSprite(nullptr)
+	GUIColor::GUIColor(const String& styleName, const GUIDimensions& dimensions)
+		:GUIElement(styleName, dimensions), mColorSprite(nullptr), mAlphaSprite(nullptr)
 	{
 		mColorSprite = bs_new<ImageSprite, PoolAlloc>();
 		mAlphaSprite = bs_new<ImageSprite, PoolAlloc>();
@@ -40,9 +40,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIColor, PoolAlloc>()) GUIColor(getStyleName<GUIColor>(styleName), GUIDimensions::create());
 	}
 
-	GUIColor* GUIColor::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUIColor* GUIColor::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIColor, PoolAlloc>()) GUIColor(getStyleName<GUIColor>(styleName), GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIColor, PoolAlloc>()) GUIColor(getStyleName<GUIColor>(styleName), GUIDimensions::create(options));
 	}
 
 	void GUIColor::setColor(const Color& color)

+ 2 - 2
BansheeEditor/Source/BsGUIColorField.cpp

@@ -14,8 +14,8 @@ using namespace std::placeholders;
 namespace BansheeEngine
 {
 	GUIColorField::GUIColorField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-		const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, layoutOptions, withLabel), 
+		const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel),
 		mLabel(nullptr), mColor(nullptr), mLabelWidth(100)
 	{
 		mColor = GUIColor::create(getSubStyleName(getColorInputStyleType()));

+ 4 - 4
BansheeEditor/Source/BsGUIComponentFoldout.cpp

@@ -13,8 +13,8 @@ using namespace std::placeholders;
 namespace BansheeEngine
 {
 	GUIComponentFoldout::GUIComponentFoldout(const PrivatelyConstruct& dummy, const HString& label, const String& style,
-		const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions, style), mToggle(nullptr), mIsExpanded(false)
+		const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions, style), mToggle(nullptr), mIsExpanded(false)
 	{
 		mToggle = GUIToggle::create(label, getSubStyleName(getFoldoutButtonStyleType()));
 
@@ -28,14 +28,14 @@ namespace BansheeEngine
 
 	}
 
-	GUIComponentFoldout* GUIComponentFoldout::create(const HString& label, const GUIOptions& layoutOptions,
+	GUIComponentFoldout* GUIComponentFoldout::create(const HString& label, const GUIOptions& options,
 		const String& style)
 	{
 		const String* curStyle = &style;
 		if (*curStyle == StringUtil::BLANK)
 			curStyle = &getGUITypeName();
 
-		return bs_new<GUIComponentFoldout>(PrivatelyConstruct(), label, *curStyle, GUIDimensions::create(layoutOptions));
+		return bs_new<GUIComponentFoldout>(PrivatelyConstruct(), label, *curStyle, GUIDimensions::create(options));
 	}
 
 	GUIComponentFoldout* GUIComponentFoldout::create(const HString& label, const String& style)

+ 4 - 4
BansheeEditor/Source/BsGUIDockSlider.cpp

@@ -15,8 +15,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUIDockSlider::GUIDockSlider(bool horizontal, const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIButtonBase(styleName, GUIContent(HString(L"")), layoutOptions),
+	GUIDockSlider::GUIDockSlider(bool horizontal, const String& styleName, const GUIDimensions& dimensions)
+		:GUIButtonBase(styleName, GUIContent(HString(L"")), dimensions),
 		mDragInProgress(false), mHorizontal(horizontal), mIsCursorSet(false)
 	{
 
@@ -28,10 +28,10 @@ namespace BansheeEngine
 			getStyleName<GUIDockSlider>(styleName), GUIDimensions::create());
 	}
 
-	GUIDockSlider* GUIDockSlider::create(bool horizontal, const GUIOptions& layoutOptions, const String& styleName)
+	GUIDockSlider* GUIDockSlider::create(bool horizontal, const GUIOptions& options, const String& styleName)
 	{
 		return new (bs_alloc<GUIDockSlider, PoolAlloc>()) GUIDockSlider(horizontal, 
-			getStyleName<GUIDockSlider>(styleName), GUIDimensions::create(layoutOptions));
+			getStyleName<GUIDockSlider>(styleName), GUIDimensions::create(options));
 	}
 
 	bool GUIDockSlider::_hasCustomCursor(const Vector2I position, CursorType& type) const

+ 4 - 4
BansheeEditor/Source/BsGUIDropButton.cpp

@@ -18,8 +18,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUIDropButton::GUIDropButton(UINT32 dragType, const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIButtonBase(styleName, GUIContent(HString(L"None")), layoutOptions), mDragType(dragType)
+	GUIDropButton::GUIDropButton(UINT32 dragType, const String& styleName, const GUIDimensions& dimensions)
+		:GUIButtonBase(styleName, GUIContent(HString(L"None")), dimensions), mDragType(dragType)
 	{
 
 	}
@@ -33,10 +33,10 @@ namespace BansheeEngine
 			getStyleName<GUIDropButton>(styleName), GUIDimensions::create());
 	}
 
-	GUIDropButton* GUIDropButton::create(UINT32 dragType, const GUIOptions& layoutOptions, const String& styleName)
+	GUIDropButton* GUIDropButton::create(UINT32 dragType, const GUIOptions& options, const String& styleName)
 	{
 		return new (bs_alloc<GUIDropButton, PoolAlloc>()) GUIDropButton(dragType, 
-			getStyleName<GUIDropButton>(styleName), GUIDimensions::create(layoutOptions));
+			getStyleName<GUIDropButton>(styleName), GUIDimensions::create(options));
 	}
 
 	bool GUIDropButton::_mouseEvent(const GUIMouseEvent& ev)

+ 2 - 2
BansheeEditor/Source/BsGUIFieldBase.cpp

@@ -10,8 +10,8 @@ namespace BansheeEngine
 	const UINT32 GUIFieldBase::DEFAULT_LABEL_WIDTH = 100;
 
 	GUIFieldBase::GUIFieldBase(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-		const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:GUIElementContainer(layoutOptions, style), mLabel(nullptr)
+		const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:GUIElementContainer(dimensions, style), mLabel(nullptr)
 	{
 		mLayout = GUILayoutX::create();
 		_registerChildElement(mLayout);

+ 2 - 2
BansheeEditor/Source/BsGUIFloatField.cpp

@@ -20,8 +20,8 @@ namespace BansheeEngine
 	const float GUIFloatField::DRAG_SPEED = 0.05f;
 
 	GUIFloatField::GUIFloatField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth, 
-		const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, layoutOptions, withLabel), mInputBox(nullptr), mIsDragging(false),
+		const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mIsDragging(false),
 		mLastDragPos(0), mHasInputFocus(false), mValue(0.0f)
 	{
 		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), getSubStyleName(getInputStyleType()));

+ 4 - 4
BansheeEditor/Source/BsGUIFoldout.cpp

@@ -13,8 +13,8 @@ using namespace std::placeholders;
 namespace BansheeEngine
 {
 	GUIFoldout::GUIFoldout(const PrivatelyConstruct& dummy, const HString& label, const String& style,
-		const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions, style), mToggle(nullptr), mIsExpanded(false)
+		const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions, style), mToggle(nullptr), mIsExpanded(false)
 	{
 		mLabel = GUILabel::create(label, getSubStyleName(getLabelStyleType()));
 		mToggle = GUIToggle::create(HString(L""), getSubStyleName(getFoldoutButtonStyleType()));
@@ -30,14 +30,14 @@ namespace BansheeEngine
 
 	}
 
-	GUIFoldout* GUIFoldout::create(const HString& label, const GUIOptions& layoutOptions,
+	GUIFoldout* GUIFoldout::create(const HString& label, const GUIOptions& options,
 		const String& style)
 	{
 		const String* curStyle = &style;
 		if (*curStyle == StringUtil::BLANK)
 			curStyle = &getGUITypeName();
 
-		return bs_new<GUIFoldout>(PrivatelyConstruct(), label, *curStyle, GUIDimensions::create(layoutOptions));
+		return bs_new<GUIFoldout>(PrivatelyConstruct(), label, *curStyle, GUIDimensions::create(options));
 	}
 
 	GUIFoldout* GUIFoldout::create(const HString& label, const String& style)

+ 2 - 2
BansheeEditor/Source/BsGUIIntField.cpp

@@ -21,8 +21,8 @@ namespace BansheeEngine
 	const INT32 GUIIntField::DRAG_SPEED = 5;
 
 	GUIIntField::GUIIntField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-		const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, layoutOptions, withLabel), mInputBox(nullptr), mIsDragging(false),
+		const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mIsDragging(false),
 		mLastDragPos(0), mIsDragCursorSet(false), mHasInputFocus(false), mMinValue(std::numeric_limits<INT32>::lowest()), 
 		mMaxValue(std::numeric_limits<INT32>::max())
 	{

+ 2 - 2
BansheeEditor/Source/BsGUIResourceTreeView.cpp

@@ -32,9 +32,9 @@ namespace BansheeEngine
 
 	GUIResourceTreeView::GUIResourceTreeView(const String& backgroundStyle, const String& elementBtnStyle, 
 		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& layoutOptions)
+		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions)
 		:GUITreeView(backgroundStyle, elementBtnStyle, foldoutBtnStyle, selectionBackgroundStyle, editBoxStyle, dragHighlightStyle,
-		dragSepHighlightStyle, layoutOptions), mDraggedResources(nullptr), mCurrentWindow(nullptr), mDropTarget(nullptr), mDropTargetDragActive(false)
+		dragSepHighlightStyle, dimensions), mDraggedResources(nullptr), mCurrentWindow(nullptr), mDropTarget(nullptr), mDropTargetDragActive(false)
 	{
 		ResourceTreeViewLocator::_provide(this);
 

+ 2 - 2
BansheeEditor/Source/BsGUISceneTreeView.cpp

@@ -25,9 +25,9 @@ namespace BansheeEngine
 
 	GUISceneTreeView::GUISceneTreeView(const String& backgroundStyle, const String& elementBtnStyle, 
 		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& layoutOptions)
+		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions)
 		:GUITreeView(backgroundStyle, elementBtnStyle, foldoutBtnStyle, selectionBackgroundStyle, editBoxStyle, dragHighlightStyle,
-		dragSepHighlightStyle, layoutOptions)
+		dragSepHighlightStyle, dimensions)
 	{
 		SceneTreeViewLocator::_provide(this);
 	}

+ 6 - 6
BansheeEditor/Source/BsGUITabButton.cpp

@@ -16,8 +16,8 @@ namespace BansheeEngine
 	}
 
 	GUITabButton::GUITabButton(const String& styleName, const GUIToggleGroupPtr& toggleGroup, 
-		UINT32 index, const GUIContent& content, const GUIDimensions& layoutOptions)
-		:GUIToggle(styleName, content, toggleGroup, layoutOptions), mIndex(index), mDraggedState(false)
+		UINT32 index, const GUIContent& content, const GUIDimensions& dimensions)
+		:GUIToggle(styleName, content, toggleGroup, dimensions), mIndex(index), mDraggedState(false)
 	{
 
 	}
@@ -30,10 +30,10 @@ namespace BansheeEngine
 	}
 
 	GUITabButton* GUITabButton::create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, 
-		const HString& text, const GUIOptions& layoutOptions, const String& styleName)
+		const HString& text, const GUIOptions& options, const String& styleName)
 	{
 		return new (bs_alloc<GUITabButton, PoolAlloc>()) GUITabButton(
-			getStyleName<GUITabButton>(styleName), toggleGroup, index, GUIContent(text), GUIDimensions::create(layoutOptions));
+			getStyleName<GUITabButton>(styleName), toggleGroup, index, GUIContent(text), GUIDimensions::create(options));
 	}
 
 	GUITabButton* GUITabButton::create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, 
@@ -44,10 +44,10 @@ namespace BansheeEngine
 	}
 
 	GUITabButton* GUITabButton::create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, 
-		const GUIContent& content, const GUIOptions& layoutOptions, const String& styleName)
+		const GUIContent& content, const GUIOptions& options, const String& styleName)
 	{
 		return new (bs_alloc<GUITabButton, PoolAlloc>()) GUITabButton(
-			getStyleName<GUITabButton>(styleName), toggleGroup, index, content, GUIDimensions::create(layoutOptions));
+			getStyleName<GUITabButton>(styleName), toggleGroup, index, content, GUIDimensions::create(options));
 	}
 
 	void GUITabButton::_setDraggedState(bool active) 

+ 4 - 4
BansheeEditor/Source/BsGUITabbedTitleBar.cpp

@@ -22,8 +22,8 @@ namespace BansheeEngine
 	const UINT32 GUITabbedTitleBar::OPTION_BTN_SPACING = 3;
 
 	GUITabbedTitleBar::GUITabbedTitleBar(const String& backgroundStyle, const String& tabBtnStyle, 
-		const String& minBtnStyle, const String& closeBtnStyle, const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mMinBtn(nullptr), 
+		const String& minBtnStyle, const String& closeBtnStyle, const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions), mMinBtn(nullptr), 
 		mCloseBtn(nullptr), mBackgroundImage(nullptr), mUniqueTabIdx(0), mActiveTabIdx(0),
 		mDragInProgress(false), mDraggedBtn(nullptr), mDragBtnOffset(0), mInitialDragOffset(0), mBackgroundStyle(backgroundStyle),
 		mTabBtnStyle(tabBtnStyle), mMinimizeBtnStyle(minBtnStyle), mCloseBtnStyle(closeBtnStyle), mTempDraggedWidget(nullptr),
@@ -70,11 +70,11 @@ namespace BansheeEngine
 			minBtnStyle, closeBtnStyle, GUIDimensions::create());
 	}
 
-	GUITabbedTitleBar* GUITabbedTitleBar::create(const GUIDimensions& layoutOptions, const String& backgroundStyle, 
+	GUITabbedTitleBar* GUITabbedTitleBar::create(const GUIDimensions& dimensions, const String& backgroundStyle,
 		const String& tabBtnStyle, const String& minBtnStyle, const String& closeBtnStyle)
 	{
 		return new (bs_alloc<GUITabbedTitleBar, PoolAlloc>()) GUITabbedTitleBar(backgroundStyle, tabBtnStyle, 
-			minBtnStyle, closeBtnStyle, layoutOptions);
+			minBtnStyle, closeBtnStyle, dimensions);
 	}
 
 	void GUITabbedTitleBar::addTab(const HString& name)

+ 12 - 12
BansheeEditor/Source/BsGUITextField.cpp

@@ -16,8 +16,8 @@ namespace BansheeEngine
 	const UINT32 GUITextField::DEFAULT_LABEL_WIDTH = 100;
 
 	GUITextField::GUITextField(const PrivatelyConstruct& dummy, bool multiline, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:GUIElementContainer(layoutOptions, style),
+		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:GUIElementContainer(dimensions, style),
 		mInputBox(nullptr), mValue(L""), mHasInputFocus(false), mLayout(nullptr), mLabel(nullptr)
 	{
 		mLayout = GUILayoutX::create();
@@ -42,7 +42,7 @@ namespace BansheeEngine
 
 	}
 
-	GUITextField* GUITextField::create(bool multiline, const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& layoutOptions,
+	GUITextField* GUITextField::create(bool multiline, const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& options,
 		const String& style)
 	{
 		const String* curStyle = &style;
@@ -50,10 +50,10 @@ namespace BansheeEngine
 			curStyle = &GUITextField::getGUITypeName();
 
 		return bs_new<GUITextField>(PrivatelyConstruct(), multiline, labelContent, labelWidth, *curStyle,
-			GUIDimensions::create(layoutOptions), true);
+			GUIDimensions::create(options), true);
 	}
 
-	GUITextField* GUITextField::create(bool multiline, const GUIContent& labelContent, const GUIOptions& layoutOptions,
+	GUITextField* GUITextField::create(bool multiline, const GUIContent& labelContent, const GUIOptions& options,
 		const String& style)
 	{
 		const String* curStyle = &style;
@@ -61,10 +61,10 @@ namespace BansheeEngine
 			curStyle = &GUITextField::getGUITypeName();
 
 		return bs_new<GUITextField>(PrivatelyConstruct(), multiline, labelContent, DEFAULT_LABEL_WIDTH, *curStyle,
-			GUIDimensions::create(layoutOptions), true);
+			GUIDimensions::create(options), true);
 	}
 
-	GUITextField* GUITextField::create(bool multiline, const HString& labelText, UINT32 labelWidth, const GUIOptions& layoutOptions,
+	GUITextField* GUITextField::create(bool multiline, const HString& labelText, UINT32 labelWidth, const GUIOptions& options,
 		const String& style)
 	{
 		const String* curStyle = &style;
@@ -72,10 +72,10 @@ namespace BansheeEngine
 			curStyle = &GUITextField::getGUITypeName();
 
 		return bs_new<GUITextField>(PrivatelyConstruct(), multiline, GUIContent(labelText), labelWidth, *curStyle,
-			GUIDimensions::create(layoutOptions), true);
+			GUIDimensions::create(options), true);
 	}
 
-	GUITextField* GUITextField::create(bool multiline, const HString& labelText, const GUIOptions& layoutOptions,
+	GUITextField* GUITextField::create(bool multiline, const HString& labelText, const GUIOptions& options,
 		const String& style)
 	{
 		const String* curStyle = &style;
@@ -83,17 +83,17 @@ namespace BansheeEngine
 			curStyle = &GUITextField::getGUITypeName();
 
 		return bs_new<GUITextField>(PrivatelyConstruct(), multiline, GUIContent(labelText), DEFAULT_LABEL_WIDTH, *curStyle,
-			GUIDimensions::create(layoutOptions), true);
+			GUIDimensions::create(options), true);
 	}
 
-	GUITextField* GUITextField::create(bool multiline, const GUIOptions& layoutOptions, const String& style)
+	GUITextField* GUITextField::create(bool multiline, const GUIOptions& options, const String& style)
 	{
 		const String* curStyle = &style;
 		if (*curStyle == StringUtil::BLANK)
 			curStyle = &GUITextField::getGUITypeName();
 
 		return bs_new<GUITextField>(PrivatelyConstruct(), multiline, GUIContent(), 0, *curStyle,
-			GUIDimensions::create(layoutOptions), false);
+			GUIDimensions::create(options), false);
 	}
 
 	GUITextField* GUITextField::create(bool multiline, const GUIContent& labelContent, UINT32 labelWidth,

+ 2 - 2
BansheeEditor/Source/BsGUIToggleField.cpp

@@ -14,8 +14,8 @@ using namespace std::placeholders;
 namespace BansheeEngine
 {
 	GUIToggleField::GUIToggleField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, layoutOptions, withLabel), mToggle(nullptr), mValue(false)
+		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mToggle(nullptr), mValue(false)
 	{
 		mToggle = GUIToggle::create(HString(L""), getSubStyleName(getToggleStyleType()));
 		mToggle->onToggled.connect(std::bind(&GUIToggleField::valueChanged, this, _1));

+ 2 - 2
BansheeEditor/Source/BsGUITreeView.cpp

@@ -82,8 +82,8 @@ namespace BansheeEngine
 
 	GUITreeView::GUITreeView(const String& backgroundStyle, const String& elementBtnStyle, 
 		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mBackgroundStyle(backgroundStyle),
+		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions), mBackgroundStyle(backgroundStyle),
 		mElementBtnStyle(elementBtnStyle), mFoldoutBtnStyle(foldoutBtnStyle), mEditBoxStyle(editBoxStyle), mEditElement(nullptr), mIsElementSelected(false),
 		mNameEditBox(nullptr), mSelectionBackgroundStyle(selectionBackgroundStyle), mDragInProgress(nullptr), mDragHighlightStyle(dragHighlightStyle),
 		mDragSepHighlightStyle(dragSepHighlightStyle), mDragHighlight(nullptr), mDragSepHighlight(nullptr), mMouseOverDragElement(nullptr), mMouseOverDragElementTime(0.0f),

+ 4 - 4
BansheeEditor/Source/BsGUITreeViewEditBox.cpp

@@ -16,13 +16,13 @@ namespace BansheeEngine
 		return new (bs_alloc<GUITreeViewEditBox, PoolAlloc>()) GUITreeViewEditBox(getStyleName<GUITreeViewEditBox>(styleName), GUIDimensions::create());
 	}
 
-	GUITreeViewEditBox* GUITreeViewEditBox::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUITreeViewEditBox* GUITreeViewEditBox::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUITreeViewEditBox, PoolAlloc>()) GUITreeViewEditBox(getStyleName<GUITreeViewEditBox>(styleName), GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUITreeViewEditBox, PoolAlloc>()) GUITreeViewEditBox(getStyleName<GUITreeViewEditBox>(styleName), GUIDimensions::create(options));
 	}
 
-	GUITreeViewEditBox::GUITreeViewEditBox(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIInputBox(styleName, layoutOptions, false)
+	GUITreeViewEditBox::GUITreeViewEditBox(const String& styleName, const GUIDimensions& dimensions)
+		:GUIInputBox(styleName, dimensions, false)
 	{
 
 	}

+ 2 - 2
BansheeEditor/Source/BsGUIVector2Field.cpp

@@ -17,8 +17,8 @@ namespace BansheeEngine
 	const UINT32 GUIVector2Field::ELEMENT_LABEL_WIDTH = 10;
 
 	GUIVector2Field::GUIVector2Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, layoutOptions, withLabel), 
+		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel),
 		mFieldX(nullptr), mFieldY(nullptr)
 	{
 		mFieldX = GUIFloatField::create(HString(L"X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));

+ 2 - 2
BansheeEditor/Source/BsGUIVector3Field.cpp

@@ -17,8 +17,8 @@ namespace BansheeEngine
 	const UINT32 GUIVector3Field::ELEMENT_LABEL_WIDTH = 10;
 
 	GUIVector3Field::GUIVector3Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, layoutOptions, withLabel), 
+		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel),
 		mFieldX(nullptr), mFieldY(nullptr), mFieldZ(nullptr)
 	{
 		mFieldX = GUIFloatField::create(HString(L"X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));

+ 2 - 2
BansheeEditor/Source/BsGUIVector4Field.cpp

@@ -17,8 +17,8 @@ namespace BansheeEngine
 	const UINT32 GUIVector4Field::ELEMENT_LABEL_WIDTH = 10;
 
 	GUIVector4Field::GUIVector4Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& style, const GUIDimensions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, style, layoutOptions, withLabel), mFieldX(nullptr), mFieldY(nullptr)
+		UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel)
+		:TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mFieldX(nullptr), mFieldY(nullptr)
 	{
 		mFieldX = GUIFloatField::create(HString(L"X"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));
 		mFieldY = GUIFloatField::create(HString(L"Y"), ELEMENT_LABEL_WIDTH, getSubStyleName(getFloatFieldStyleType()));

+ 4 - 4
BansheeEditor/Source/BsGUIWindowDropArea.cpp

@@ -15,8 +15,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUIWindowDropArea::GUIWindowDropArea(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUITexture(styleName, HSpriteTexture(), GUIImageScaleMode::ScaleToFit, true, layoutOptions)
+	GUIWindowDropArea::GUIWindowDropArea(const String& styleName, const GUIDimensions& dimensions)
+		:GUITexture(styleName, HSpriteTexture(), GUIImageScaleMode::ScaleToFit, true, dimensions)
 	{ }
 
 	GUIWindowDropArea::~GUIWindowDropArea()
@@ -28,10 +28,10 @@ namespace BansheeEngine
 			GUIWindowDropArea(getStyleName<GUIWindowDropArea>(styleName), GUIDimensions::create());
 	}
 
-	GUIWindowDropArea* GUIWindowDropArea::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUIWindowDropArea* GUIWindowDropArea::create(const GUIOptions& options, const String& styleName)
 	{
 		return new (bs_alloc<GUIWindowDropArea, PoolAlloc>()) 
-			GUIWindowDropArea(getStyleName<GUIWindowDropArea>(styleName), GUIDimensions::create(layoutOptions));
+			GUIWindowDropArea(getStyleName<GUIWindowDropArea>(styleName), GUIDimensions::create(options));
 	}
 
 	void GUIWindowDropArea::setFocused(bool focused)

+ 4 - 4
BansheeEditor/Source/BsGUIWindowFrame.cpp

@@ -18,8 +18,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUIWindowFrame::GUIWindowFrame(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUITexture(styleName, HSpriteTexture(), GUIImageScaleMode::StretchToFit, true, layoutOptions)
+	GUIWindowFrame::GUIWindowFrame(const String& styleName, const GUIDimensions& dimensions)
+		:GUITexture(styleName, HSpriteTexture(), GUIImageScaleMode::StretchToFit, true, dimensions)
 	{
 
 	}
@@ -32,9 +32,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIWindowFrame, PoolAlloc>()) GUIWindowFrame(getStyleName<GUIWindowFrame>(styleName), GUIDimensions::create());
 	}
 
-	GUIWindowFrame* GUIWindowFrame::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUIWindowFrame* GUIWindowFrame::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIWindowFrame, PoolAlloc>()) GUIWindowFrame(getStyleName<GUIWindowFrame>(styleName), GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIWindowFrame, PoolAlloc>()) GUIWindowFrame(getStyleName<GUIWindowFrame>(styleName), GUIDimensions::create(options));
 	}
 
 	void GUIWindowFrame::setFocused(bool focused)

+ 0 - 43
BansheeEditor/Source/DbgEditorWidget1.cpp

@@ -19,31 +19,12 @@ namespace BansheeEngine
 		:EditorWidget<DbgEditorWidget1>(HString(L"DbgEditorWidget1"), parentContainer)
 	{
 		GUILayout& layout = mContent->getLayout();
-		//
-		//mDbgLabel = GUILabel::create(*mGUI, "Testing test");
-		//layout.addElement(mDbgLabel);
-
-		//layout.addElement(GUIInputBox::create(*mGUI));
-		//layout.addElement(GUIInputBox::create(*mGUI, GUILayoutOptions::fixed(100, 100), true));
 
 		GUIScrollArea* scrollArea = GUIScrollArea::create();
 		layout.addElement(scrollArea);
 
 		GUILayout* treeViewLayout = scrollArea->getLayout().addNewElement<GUILayoutY>();
 
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test A"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test B"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test C"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test D"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test E"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test F"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test G"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test H"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test I"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test J"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test K"));
-		//scrollLayout.addElement(GUIButton::create(*mGUI, L"Test L"));
-
 		mSceneTreeView = GUISceneTreeView::create(GUIOptions(GUIOption::flexibleWidth(), GUIOption::flexibleHeight()));
 		mResourceTreeView = GUIResourceTreeView::create(GUIOptions(GUIOption::flexibleWidth(), GUIOption::flexibleHeight()));
 
@@ -52,30 +33,6 @@ namespace BansheeEngine
 
 		treeViewLayout->addElement(GUILabel::create(HString(L"<<<<<<<<<<<<<<RESOURCE VIEW>>>>>>>>>>>>>>")));
 		treeViewLayout->addElement(mResourceTreeView);
-
-		//GUIFlexibleSpace& space4 = otherLayout.addFlexibleSpace();
-		//otherLayout.addElement(mDbgLabel);
-
-		//GUIFixedSpace& space = otherLayout.addSpace(10); // Due to bug in MSVC compiler I need to store return value
-		//GUIFlexibleSpace& space3 = otherLayout.addFlexibleSpace();
-		//otherLayout.addElement(GUIWindowFrame::create(*mGUI, GUILayoutOptions::fixed(100, 100)));
-		//GUIFixedSpace& space2 = otherLayout.addSpace(10);
-		//otherLayout.addElement(GUIButton::create(*mGUI, "Test"));
-		//otherLayout.addElement(GUIWindowFrame::create(*mGUI));
-
-		//GUIArea* backgroundArea = GUIArea::create(*mGUI, 0, 0, 0, 0, 2000);
-		//backgroundArea->getLayout().addElement(GUITexture::create(*mGUI, GUILayoutOptions::expandableXY(), GUIImageScaleMode::RepeatToFit, mGUI->getSkin()->getStyle("WindowBackground")));
-
-		//GUIArea* windowFrameArea = GUIArea::create(*mGUI, 0, 0, 0, 0, 1999);
-		//windowFrameArea->getLayout().addElement(GUIWindowFrame::create(*mGUI));
-
-		//GUIArea* titleBarBackgroundArea = GUIArea::create(*mGUI, 0, 1, 0, 11, 1999);
-		//titleBarBackgroundArea->getLayout().addSpace(1);
-		//titleBarBackgroundArea->getLayout().addElement(GUITexture::create(*mGUI, GUIImageScaleMode::RepeatToFit, GUILayoutOptions::expandableXY(), mGUI->getGUISkin()->getStyle("TitleBarBg")));
-		//titleBarBackgroundArea->getLayout().addSpace(1);
-
-		//mRenderWindow->resize(300, 250);
-		//mRenderWindow->setVisible(false);
 	}
 
 	DbgEditorWidget1::~DbgEditorWidget1()

+ 2 - 2
BansheeEngine/BansheeEngine.vcxproj

@@ -237,7 +237,7 @@
     <ClCompile Include="Source\BsDrawHelper.cpp" />
     <ClCompile Include="Source\BsGUIDropDownContent.cpp" />
     <ClCompile Include="Source\BsGUIElementStyle.cpp" />
-    <ClCompile Include="Source\BsGUILayoutExplicit.cpp" />
+    <ClCompile Include="Source\BsGUIPanel.cpp" />
     <ClCompile Include="Source\BsGUILayoutUtility.cpp" />
     <ClCompile Include="Source\BsGUIProgressBar.cpp" />
     <ClCompile Include="Source\BsGUISkinRTTI.cpp" />
@@ -263,7 +263,7 @@
     <ClInclude Include="Include\BsDrawHelper.h" />
     <ClInclude Include="Include\BsGUIDropDownContent.h" />
     <ClInclude Include="Include\BsGUIElementStyleRTTI.h" />
-    <ClInclude Include="Include\BsGUILayoutExplicit.h" />
+    <ClInclude Include="Include\BsGUIPanel.h" />
     <ClInclude Include="Include\BsGUIProgressBar.h" />
     <ClInclude Include="Include\BsGUISkinRTTI.h" />
     <ClInclude Include="Include\BsGUISlider.h" />

+ 6 - 6
BansheeEngine/BansheeEngine.vcxproj.filters

@@ -287,9 +287,6 @@
     <ClInclude Include="Include\BsGUIProgressBar.h">
       <Filter>Header Files\GUI</Filter>
     </ClInclude>
-    <ClInclude Include="Include\BsGUILayoutExplicit.h">
-      <Filter>Header Files\GUI</Filter>
-    </ClInclude>
     <ClInclude Include="Include\BsPlainText.h">
       <Filter>Header Files</Filter>
     </ClInclude>
@@ -332,6 +329,9 @@
     <ClInclude Include="Include\BsGUIDimensions.h">
       <Filter>Header Files\GUI</Filter>
     </ClInclude>
+    <ClInclude Include="Include\BsGUIPanel.h">
+      <Filter>Header Files\GUI</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Source\BsGUIElement.cpp">
@@ -538,9 +538,6 @@
     <ClCompile Include="Source\BsGUIProgressBar.cpp">
       <Filter>Source Files\GUI</Filter>
     </ClCompile>
-    <ClCompile Include="Source\BsGUILayoutExplicit.cpp">
-      <Filter>Source Files\GUI</Filter>
-    </ClCompile>
     <ClCompile Include="Source\BsGUISpace.cpp">
       <Filter>Source Files\GUI</Filter>
     </ClCompile>
@@ -577,5 +574,8 @@
     <ClCompile Include="Source\BsGUIDimensions.cpp">
       <Filter>Source Files\GUI</Filter>
     </ClCompile>
+    <ClCompile Include="Source\BsGUIPanel.cpp">
+      <Filter>Source Files\GUI</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 9 - 9
BansheeEngine/Include/BsGUIButton.h

@@ -24,7 +24,7 @@ namespace BansheeEngine
 		/**
 		 * Creates a new button with the specified label.
 		 *
-		 * @param	text		Label to display on the button.
+		 * @param	text			Label to display on the button.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default button style is used.
@@ -35,13 +35,13 @@ namespace BansheeEngine
 		 * Creates a new button with the specified label.
 		 *
 		 * @param	text			Label to display on the button.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized. 
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default button style is used.
 		 */
-		static GUIButton* create(const HString& text, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIButton* create(const HString& text, const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * Creates a new button with the specified label.
@@ -56,20 +56,20 @@ namespace BansheeEngine
 		/**
 		 * Creates a new button with the specified label.
 		 *
-		 * @param	content		Content to display on a button. May include a label, image and a tooltip.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	content			Content to display on a button. May include a label, image and a tooltip.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default button style is used.
 		 */
-		static GUIButton* create(const GUIContent& content, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIButton* create(const GUIContent& content, const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @copydoc	GUIElement::getElementType
 		 */
 		virtual ElementType _getElementType() const { return ElementType::Button; }
 	private:
-		GUIButton(const String& styleName, const GUIContent& content, const GUIDimensions& layoutOptions);
+		GUIButton(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions);
 	};
 }

+ 1 - 1
BansheeEngine/Include/BsGUIButtonBase.h

@@ -84,7 +84,7 @@ namespace BansheeEngine
 		 */
 		Event<void()> onDoubleClick;
 	protected:
-		GUIButtonBase(const String& styleName, const GUIContent& content, const GUIDimensions& layoutOptions);
+		GUIButtonBase(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions);
 		virtual ~GUIButtonBase();
 
 		/**

+ 4 - 4
BansheeEngine/Include/BsGUIDropDownContent.h

@@ -45,14 +45,14 @@ namespace BansheeEngine
 		 *
 		 * @param	parent			Parent sub-menu that owns the drop down contents.
 		 * @param	dropDownData	Data that will be used for initializing the child entries.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default button style is used.
 		 */
 		static GUIDropDownContent* create(GUIDropDownBox::DropDownSubMenu* parent, const GUIDropDownData& dropDownData, 
-			const GUIOptions& layoutOptions, const String& style = StringUtil::BLANK);
+			const GUIOptions& options, const String& style = StringUtil::BLANK);
 
 		/**
 		 * @brief	Changes the range of the displayed elements. 
@@ -77,7 +77,7 @@ namespace BansheeEngine
 		static const String SEPARATOR_STYLE_TYPE;
 	protected:
 		GUIDropDownContent(GUIDropDownBox::DropDownSubMenu* parent, const GUIDropDownData& dropDownData, 
-			const String& style, const GUIDimensions& layoutOptions);
+			const String& style, const GUIDimensions& dimensions);
 		~GUIDropDownContent() override;
 
 		/**

+ 4 - 4
BansheeEngine/Include/BsGUIDropDownHitBox.h

@@ -32,10 +32,10 @@ namespace BansheeEngine
 		 *
 		 * @param	captureMouse	If true mouse clicks will be captured by this control and wont be passed
 		 *							to other GUI elements.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 */
-		static GUIDropDownHitBox* create(bool captureMouse, const GUIOptions& layoutOptions);
+		static GUIDropDownHitBox* create(bool captureMouse, const GUIOptions& options);
 
 		/**
 		 * Sets a single rectangle bounds in which the hitbox will capture mouse events.
@@ -58,7 +58,7 @@ namespace BansheeEngine
 		Event<void()> onFocusGained;
 
 	private:
-		GUIDropDownHitBox(bool captureMouse, const GUIDimensions& layoutOptions);
+		GUIDropDownHitBox(bool captureMouse, const GUIDimensions& dimensions);
 
 		virtual bool _commandEvent(const GUICommandEvent& ev);
 		virtual bool _mouseEvent(const GUIMouseEvent& ev);

+ 4 - 3
BansheeEngine/Include/BsGUIElementBase.h

@@ -23,7 +23,8 @@ namespace BansheeEngine
 			Layout,
 			Element,
 			FixedSpace,
-			FlexibleSpace
+			FlexibleSpace,
+			Panel
 		};
 
 	public:
@@ -79,14 +80,14 @@ namespace BansheeEngine
 		void disableRecursively();
 
 		/**
-		 * @brief	Returns non-clipped bounds of the GUI element. Relative to the parent widget.
+		 * @brief	Returns non-clipped bounds of the GUI element. Relative to the parent GUI panel.
 		 *
 		 * @note	This call can be potentially expensive as the bounds need to be calculated based on current GUI state.
 		 */
 		virtual Rect2I getBounds() const;
 
 		/**
-		 * @brief	Returns non-clipped visible bounds of the GUI element (bounds exclude the margins). Relative to parent widget.
+		 * @brief	Returns non-clipped visible bounds of the GUI element (bounds exclude the margins). Relative to the parent GUI panel.
 		 *
 		 * @note	This call can be potentially expensive as the bounds need to be calculated based on current GUI state.
 		 */

+ 1 - 1
BansheeEngine/Include/BsGUIElementContainer.h

@@ -18,7 +18,7 @@ namespace BansheeEngine
 		void _setPosition(const Vector2I& offset) override;
 
 	protected:
-		GUIElementContainer(const GUIDimensions& layoutOptions, const String& style = StringUtil::BLANK);
+		GUIElementContainer(const GUIDimensions& dimensions, const String& style = StringUtil::BLANK);
 		virtual ~GUIElementContainer();
 
 		/**

+ 6 - 6
BansheeEngine/Include/BsGUIHelper.h

@@ -17,26 +17,26 @@ namespace BansheeEngine
 		 *
 		 * @param	contentSize		Wanted content size. This will be limited by minimal constraints of the style and layout options.
 		 * @param	style			Style to use for determining size constraints.
-		 * @param	layoutOptions	Layout options to use for determining size constraints.
+		 * @param	dimensions		Dimension constraints of a GUI element.
 		 */
-		static Vector2I calcOptimalContentsSize(const Vector2I& contentSize, const GUIElementStyle& style, const GUIDimensions& layoutOptions);
+		static Vector2I calcOptimalContentsSize(const Vector2I& contentSize, const GUIElementStyle& style, const GUIDimensions& dimensions);
 
 		/**
 		 * @brief	Calculates optimal content size for the provided content using the provided style and layout options for constraints.
 		 *
 		 * @param	content			Content to calculate size for.
 		 * @param	style			Style to use for determining size constraints.
-		 * @param	layoutOptions	Layout options to use for determining size constraints.
+		 * @param	dimensions		Dimension constraints of a GUI element.
 		 */
-		static Vector2I calcOptimalContentsSize(const GUIContent& content, const GUIElementStyle& style, const GUIDimensions& layoutOptions);
+		static Vector2I calcOptimalContentsSize(const GUIContent& content, const GUIElementStyle& style, const GUIDimensions& dimensions);
 
 		/**
 		 * @brief	Calculates optimal content size for the provided text using the provided style and layout options for constraints.
 		 *
 		 * @param	text			Text to calculate size for.
 		 * @param	style			Style to use for determining size constraints.
-		 * @param	layoutOptions	Layout options to use for determining size constraints.
+		 * @param	dimensions		Dimension constraints of a GUI element.
 		 */
-		static Vector2I calcOptimalContentsSize(const WString& text, const GUIElementStyle& style, const GUIDimensions& layoutOptions);
+		static Vector2I calcOptimalContentsSize(const WString& text, const GUIElementStyle& style, const GUIDimensions& dimensions);
 	};
 }

+ 7 - 7
BansheeEngine/Include/BsGUIInputBox.h

@@ -44,25 +44,25 @@ namespace BansheeEngine
 		 * Creates a new input box.
 		 *
 		 * @param	multiline		If true the input box can be of arbitrary height and will accept multiple lines of text.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default button style is used.
 		 */
-		static GUIInputBox* create(bool multiline, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIInputBox* create(bool multiline, const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 
 		/**
 		 * Creates a new single-line input box.
 		 *
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default button style is used.
 		 */
-		static GUIInputBox* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIInputBox* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Returns the text currently entered in the input box.
@@ -111,7 +111,7 @@ namespace BansheeEngine
 		 */
 		Event<void()> onFocusLost;
 	protected:
-		GUIInputBox(const String& styleName, const GUIDimensions& layoutOptions, bool multiline);
+		GUIInputBox(const String& styleName, const GUIDimensions& dimensions, bool multiline);
 		virtual ~GUIInputBox();
 
 		/**

+ 7 - 7
BansheeEngine/Include/BsGUILabel.h

@@ -32,13 +32,13 @@ namespace BansheeEngine
 		 * Creates a new label with the specified text.
 		 *
 		 * @param	text			Text to display.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default button style is used.
 		 */
-		static GUILabel* create(const HString& text, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUILabel* create(const HString& text, const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * Creates a new label with the specified content (text + optional image).
@@ -54,13 +54,13 @@ namespace BansheeEngine
 		 * Creates a new label with the specified content (text + optional image).
 		 *
 		 * @param	text			Content to display.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default button style is used.
 		 */
-		static GUILabel* create(const GUIContent& content, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUILabel* create(const GUIContent& content, const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * Changes the active content of the label.
@@ -115,7 +115,7 @@ namespace BansheeEngine
 		 */
 		virtual void updateClippedBounds();
 	private:
-		GUILabel(const String& styleName, const GUIContent& content, const GUIDimensions& layoutOptions);
+		GUILabel(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions);
 
 		TextSprite* mTextSprite;
 		GUIContent mContent;

+ 2 - 1
BansheeEngine/Include/BsGUILayout.h

@@ -14,6 +14,7 @@ namespace BansheeEngine
 	{
 	public:
 		GUILayout(GUIArea* parentArea);
+		GUILayout(const GUIDimensions& dimensions);
 		GUILayout();
 		virtual ~GUILayout();
 
@@ -82,7 +83,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	GUIElementBase::_getType
 		 */
-		Type _getType() const { return GUIElementBase::Type::Layout; }
+		virtual Type _getType() const override { return GUIElementBase::Type::Layout; }
 
 		/**
 		 * @brief	Gets an actual width (in pixels) of all the child elements in the layout.

+ 1 - 1
BansheeEngine/Include/BsGUILayoutUtility.h

@@ -20,7 +20,7 @@ namespace BansheeEngine
 
 		/**
 		 * Calculates position and size of a GUI element in its current layout.
-		 * Returned position is relative to layout origin.
+		 * Returned position is relative to parent GUI panel.
 		 */
 		// TODO - This method might fail if element is part of a more complex hierarchy
 		// other than just GUILayouts and base elements (e.g. a tree view) because for a lot

+ 8 - 0
BansheeEngine/Include/BsGUILayoutX.h

@@ -13,6 +13,7 @@ namespace BansheeEngine
 	{
 	public:
 		GUILayoutX(GUIArea* parentArea);
+		GUILayoutX(const GUIDimensions& dimensions);
 		GUILayoutX() {};
 		~GUILayoutX() {};
 
@@ -42,6 +43,13 @@ namespace BansheeEngine
 		 */
 		static GUILayoutX* create();
 
+		/**
+		 * @brief	Creates a new horizontal layout.
+		 *
+		 * @param	options		Options that allow you to control how is the element positioned and sized.
+		 */
+		static GUILayoutX* create(const GUIOptions& options);
+
 	protected:
 		/**
 		 * @brief	Positions/size all child layout elements based on the provided settings and their (previously calculated) optimal sizes.

+ 8 - 0
BansheeEngine/Include/BsGUILayoutY.h

@@ -13,6 +13,7 @@ namespace BansheeEngine
 	{
 	public:
 		GUILayoutY(GUIArea* parentArea);
+		GUILayoutY(const GUIDimensions& dimensions);
 		GUILayoutY() {};
 		~GUILayoutY() {};
 
@@ -42,6 +43,13 @@ namespace BansheeEngine
 		 */
 		static GUILayoutY* create();
 
+		/**
+		 * @brief	Creates a new vertical layout.
+		 *
+		 * @param	options		Options that allow you to control how is the element positioned and sized.
+		 */
+		static GUILayoutY* create(const GUIOptions& options);
+
 	protected:
 		/**
 		 * @brief	Positions/size all child layout elements based on the provided settings and their (previously calculated) optimal sizes.

+ 4 - 4
BansheeEngine/Include/BsGUIListBox.h

@@ -34,13 +34,13 @@ namespace BansheeEngine
 		 * @brief	Creates a new listbox with the provided elements.
 		 *
 		 * @param	elements		Elements to display in the list box.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUIListBox* create(const Vector<HString>& elements, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIListBox* create(const Vector<HString>& elements, const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Changes the list box elements.
@@ -66,7 +66,7 @@ namespace BansheeEngine
 		~GUIListBox();
 
 	private:
-		GUIListBox(const String& styleName, const Vector<HString>& elements, const GUIDimensions& layoutOptions);
+		GUIListBox(const String& styleName, const Vector<HString>& elements, const GUIDimensions& dimensions);
 
 		/**
 		 * @copydoc	GUIButtonBase::mouseEvent

+ 21 - 8
BansheeEngine/Include/BsGUILayoutExplicit.h → BansheeEngine/Include/BsGUIPanel.h

@@ -6,15 +6,21 @@
 namespace BansheeEngine
 {
 	/**
-	* @brief	Represents an explicit layout that respects bounds originally set by the element
-	*			(i.e. it won't position or resize GUI elements like other layouts)
-	*/
-	class BS_EXPORT GUILayoutExplicit : public GUILayout
+	 * @brief	Represents a GUI panel that you can use for free placement 
+	 *			of GUI elements within its bounds.
+	 */
+	class BS_EXPORT GUIPanel : public GUILayout
 	{
 	public:
-		GUILayoutExplicit(GUIArea* parentArea);
-		GUILayoutExplicit() {};
-		~GUILayoutExplicit() {};
+		GUIPanel(GUIArea* parentArea);
+		GUIPanel(const GUIDimensions& dimensions);
+		GUIPanel() {};
+		~GUIPanel() {};
+
+		/**
+		 * @copydoc	GUIElementBase::_getType
+		 */
+		virtual Type _getType() const override { return GUIElementBase::Type::Panel; }
 
 		/**
 		 * @brief	Calculate optimal sizes of all child layout elements.
@@ -40,7 +46,14 @@ namespace BansheeEngine
 		/**
 		 * @brief	Creates a new GUI panel.
 		 */
-		static GUILayoutExplicit* create();
+		static GUIPanel* create();
+
+		/**
+		 * @brief	Creates a new GUI panel.
+		 *
+		 * @param	options		Options that allow you to control how is the element positioned and sized.
+		 */
+		static GUIPanel* create(const GUIOptions& options);
 
 	protected:
 		/**

+ 4 - 4
BansheeEngine/Include/BsGUIProgressBar.h

@@ -40,13 +40,13 @@ namespace BansheeEngine
 		/**
 		 * @brief	Creates a new progress bar.
 		 *
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUIProgressBar* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIProgressBar* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Fills up the progress bar up to the specified percentage.
@@ -72,7 +72,7 @@ namespace BansheeEngine
 
 		Event<void(float percent)> onChanged;
 	protected:
-		GUIProgressBar(const String& styleName, const GUIDimensions& layoutOptions);
+		GUIProgressBar(const String& styleName, const GUIDimensions& dimensions);
 
 		/**
 		 * @copydoc	GUIElementContainer::_getOptimalSize

+ 4 - 4
BansheeEngine/Include/BsGUIRenderTexture.h

@@ -33,13 +33,13 @@ namespace BansheeEngine
 		 * @brief	Creates a new element with the provided render texture.
 		 *
 		 * @param	texture			Render texture to display.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUIRenderTexture* create(const RenderTexturePtr& texture, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIRenderTexture* create(const RenderTexturePtr& texture, const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Changes the active render texture whose contents to display in the GUI element.
@@ -47,7 +47,7 @@ namespace BansheeEngine
 		void setRenderTexture(const RenderTexturePtr& texture);
 
 	protected:
-		GUIRenderTexture(const String& styleName, const RenderTexturePtr& texture, const GUIDimensions& layoutOptions);
+		GUIRenderTexture(const String& styleName, const RenderTexturePtr& texture, const GUIDimensions& dimensions);
 		virtual ~GUIRenderTexture();
 
 		/**

+ 7 - 7
BansheeEngine/Include/BsGUIScrollArea.h

@@ -42,13 +42,13 @@ namespace BansheeEngine
 		 *
 		 * @param	vertBarType		Vertical scrollbar options.
 		 * @param	horzBarType		Horizontal scrollbar options.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	scrollBarStyle	(Optional) Style used by the scroll bars.
 		 * @param	scrollAreaStyle	(Optional) Style used by the scroll content area.
 		 */
 		static GUIScrollArea* create(ScrollBarType vertBarType, ScrollBarType horzBarType, 
-			const GUIOptions& layoutOptions, const String& scrollBarStyle = StringUtil::BLANK, 
+			const GUIOptions& options, const String& scrollBarStyle = StringUtil::BLANK, 
 			const String& scrollAreaStyle = StringUtil::BLANK);
 
 		/**
@@ -63,12 +63,12 @@ namespace BansheeEngine
 		/**
 		 * @brief	Creates a new empty scroll area. Scroll bars will be show if needed and hidden otherwise.
 		 *
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	scrollBarStyle	(Optional) Style used by the scroll bars.
 		 * @param	scrollAreaStyle	(Optional) Style used by the scroll content area.
 		 */
-		static GUIScrollArea* create(const GUIOptions& layoutOptions, const String& scrollBarStyle = StringUtil::BLANK, 
+		static GUIScrollArea* create(const GUIOptions& options, const String& scrollBarStyle = StringUtil::BLANK, 
 			const String& scrollAreaStyle = StringUtil::BLANK);
 
 		/**
@@ -129,7 +129,7 @@ namespace BansheeEngine
 		virtual void updateClippedBounds();
 	private:
 		GUIScrollArea(ScrollBarType vertBarType, ScrollBarType horzBarType, 
-			const String& scrollBarStyle, const String& scrollAreaStyle, const GUIDimensions& layoutOptions);
+			const String& scrollBarStyle, const String& scrollAreaStyle, const GUIDimensions& dimensions);
 
 		/**
 		 * @copydoc	GUIElementContainer::mouseEvent

+ 3 - 3
BansheeEngine/Include/BsGUIScrollBar.h

@@ -68,10 +68,10 @@ namespace BansheeEngine
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 */
-		GUIScrollBar(bool horizontal, const String& styleName, const GUIDimensions& layoutOptions);
+		GUIScrollBar(bool horizontal, const String& styleName, const GUIDimensions& dimensions);
 		virtual ~GUIScrollBar();
 
 		/**

+ 4 - 4
BansheeEngine/Include/BsGUIScrollBarHorz.h

@@ -29,15 +29,15 @@ namespace BansheeEngine
 		/**
 		 * @brief	Creates a new horizontal scroll bar.
 		 *
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUIScrollBarHorz* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIScrollBarHorz* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 	protected:
-		GUIScrollBarHorz(const String& styleName, const GUIDimensions& layoutOptions);
+		GUIScrollBarHorz(const String& styleName, const GUIDimensions& dimensions);
 		~GUIScrollBarHorz();
 	};
 }

+ 4 - 4
BansheeEngine/Include/BsGUIScrollBarVert.h

@@ -29,15 +29,15 @@ namespace BansheeEngine
 		/**
 		 * @brief	Creates a new vertical scroll bar.
 		 *
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUIScrollBarVert* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUIScrollBarVert* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 	protected:
-		GUIScrollBarVert(const String& styleName, const GUIDimensions& layoutOptions);
+		GUIScrollBarVert(const String& styleName, const GUIDimensions& dimensions);
 		~GUIScrollBarVert();
 	};
 }

+ 9 - 9
BansheeEngine/Include/BsGUISlider.h

@@ -46,7 +46,7 @@ namespace BansheeEngine
 
 		Event<void(float percent)> onChanged;
 	protected:
-		GUISlider(bool horizontal, const String& styleName, const GUIDimensions& layoutOptions);
+		GUISlider(bool horizontal, const String& styleName, const GUIDimensions& dimensions);
 		virtual ~GUISlider();
 
 		/**
@@ -95,16 +95,16 @@ namespace BansheeEngine
 		/**
 		 * @brief	Creates a new horizontal slider.
 		 *
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUISliderHorz* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUISliderHorz* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 	private:
-		GUISliderHorz(const String& styleName, const GUIDimensions& layoutOptions);
+		GUISliderHorz(const String& styleName, const GUIDimensions& dimensions);
 	};
 
 	/**
@@ -130,15 +130,15 @@ namespace BansheeEngine
 		/**
 		 * @brief	Creates a new vertical slider.
 		 *
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUISliderVert* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUISliderVert* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 	private:
-		GUISliderVert(const String& styleName, const GUIDimensions& layoutOptions);
+		GUISliderVert(const String& styleName, const GUIDimensions& dimensions);
 	};
 }

+ 4 - 4
BansheeEngine/Include/BsGUISliderHandle.h

@@ -47,13 +47,13 @@ namespace BansheeEngine
 		 * @param	jumpOnClick		If true clicking on a specific position on the slider will cause
 		 *							the slider handle to jump to that position. Otherwise the slider
 		 *							will just slightly move towards that direction.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUISliderHandle* create(bool horizontal, bool jumpOnClick, const GUIOptions& layoutOptions,
+		static GUISliderHandle* create(bool horizontal, bool jumpOnClick, const GUIOptions& options,
 			const String& styleName = StringUtil::BLANK);
 
 		/**
@@ -128,7 +128,7 @@ namespace BansheeEngine
 		 */
 		virtual void updateClippedBounds();
 	private:
-		GUISliderHandle(bool horizontal, bool jumpOnClick, const String& styleName, const GUIDimensions& layoutOptions);
+		GUISliderHandle(bool horizontal, bool jumpOnClick, const String& styleName, const GUIDimensions& dimensions);
 
 		/**
 		 * @brief	Returns the position of the slider handle, in pixels.

+ 16 - 16
BansheeEngine/Include/BsGUITexture.h

@@ -34,14 +34,14 @@ namespace BansheeEngine
 		 * @param	texture			Texture element to display.
 		 * @param	scale			Scale mode to use when sizing the texture.
 		 * @param	transparent		Determines should the texture be rendered with transparency active.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
 		static GUITexture* create(const HSpriteTexture& texture, GUIImageScaleMode scale, bool transparent,
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Creates a new GUI texture element.
@@ -61,14 +61,14 @@ namespace BansheeEngine
 		 *
 		 * @param	texture			Texture element to display.
 		 * @param	scale			Scale mode to use when sizing the texture.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
 		static GUITexture* create(const HSpriteTexture& texture, GUIImageScaleMode scale, 
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Creates a new GUI texture element.
@@ -86,14 +86,14 @@ namespace BansheeEngine
 		 * @brief	Creates a new GUI texture element. Uses the default StretchToFit scale mode.
 		 *
 		 * @param	texture			Texture element to display.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
 		static GUITexture* create(const HSpriteTexture& texture, 
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Creates a new GUI texture element. Uses the default StretchToFit scale mode.
@@ -109,13 +109,13 @@ namespace BansheeEngine
 		 * @brief	Creates a new GUI texture element. Uses the "normal" texture from the active GUI element style.
 		 *
 		 * @param	scale			Scale mode to use when sizing the texture.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUITexture* create(GUIImageScaleMode scale, const GUIOptions& layoutOptions, 
+		static GUITexture* create(GUIImageScaleMode scale, const GUIOptions& options, 
 			const String& styleName = StringUtil::BLANK);
 
 		/**
@@ -132,13 +132,13 @@ namespace BansheeEngine
 		 * @brief	Creates a new GUI texture element. Uses the "normal" texture from the active GUI element style.
 		 *			Uses the default StretchToFit scale mode.
 		 *
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUITexture* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+		static GUITexture* create(const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Creates a new GUI texture element. Uses the "normal" texture from the active GUI element style.
@@ -171,7 +171,7 @@ namespace BansheeEngine
 		virtual Vector2I _getOptimalSize() const;
 	protected:
 		GUITexture(const String& styleName, const HSpriteTexture& texture, GUIImageScaleMode scale, 
-			bool transparent, const GUIDimensions& layoutOptions);
+			bool transparent, const GUIDimensions& dimensions);
 		virtual ~GUITexture();
 
 		/**

+ 11 - 11
BansheeEngine/Include/BsGUIToggle.h

@@ -35,13 +35,13 @@ namespace BansheeEngine
 		 * @brief	Creates a new toggle button with the specified label.
 		 *
 		 * @param	text			Label to display in the button, if any.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
-		static GUIToggle* create(const HString& text, const GUIOptions& layoutOptions, 
+		static GUIToggle* create(const HString& text, const GUIOptions& options, 
 			const String& styleName = StringUtil::BLANK);
 	
 		/**
@@ -61,14 +61,14 @@ namespace BansheeEngine
 		 *
 		 * @param	text			Label to display in the button, if any.
 		 * @param	toggleGroup		Toggle group this button belongs to.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 */
 		static GUIToggle* create(const HString& text, std::shared_ptr<GUIToggleGroup> toggleGroup, 
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @copydoc	GUIToggle::create(const HString& text, const String& styleName)
@@ -76,9 +76,9 @@ namespace BansheeEngine
 		static GUIToggle* create(const GUIContent& content, const String& styleName = StringUtil::BLANK);
 
 		/**
-		 * @copydoc	GUIToggle::create(const HString& text, const GUIOptions& layoutOptions, const String& styleName)
+		 * @copydoc	GUIToggle::create(const HString& text, const GUIOptions& options, const String& styleName)
 		 */
-		static GUIToggle* create(const GUIContent& content, const GUIOptions& layoutOptions, 
+		static GUIToggle* create(const GUIContent& content, const GUIOptions& options, 
 			const String& styleName = StringUtil::BLANK);
 
 		/**
@@ -88,10 +88,10 @@ namespace BansheeEngine
 			const String& styleName = StringUtil::BLANK);
 
 		/**
-		 * @copydoc	GUIToggle::create(const HString& text, std::shared_ptr<GUIToggleGroup> toggleGroup, const GUIOptions& layoutOptions, const String& styleName)
+		 * @copydoc	GUIToggle::create(const HString& text, std::shared_ptr<GUIToggleGroup> toggleGroup, const GUIOptions& options, const String& styleName)
 		 */
 		static GUIToggle* create(const GUIContent& content, std::shared_ptr<GUIToggleGroup> toggleGroup, 
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
+			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
 		/**
 		 * @brief	Creates a toggle group that you may provide to GUIToggle upon construction. Toggles sharing the
@@ -134,7 +134,7 @@ namespace BansheeEngine
 
 	protected:
 		GUIToggle(const String& styleName, const GUIContent& content, 
-			std::shared_ptr<GUIToggleGroup> toggleGroup, const GUIDimensions& layoutOptions);
+			std::shared_ptr<GUIToggleGroup> toggleGroup, const GUIDimensions& dimensions);
 
 		/**
 		 * @copydoc	GUIButtonBase::mouseEvent

+ 4 - 4
BansheeEngine/Include/BsGUIViewport.h

@@ -39,15 +39,15 @@ namespace BansheeEngine
 		 *							as it resizes.
 		 * @param	aspectRatio		Initial aspect of the camera. Determines how is FOV adjusted as the element resizes.
 		 * @param	fieldOfView		Initial FOV of the camera. Determines how is FOV adjusted as the element resizes.
-		 * @param	layoutOptions	Options that allows you to control how is the element positioned in
-		 *							GUI layout. This will override any similar options set by style.
+		 * @param	options			Options that allow you to control how is the element positioned and sized.
+		 *							This will override any similar options set by style.
 		 * @param	styleName		Optional style to use for the element. Style will be retrieved
 		 *							from GUISkin of the GUIWidget the element is used on. If not specified
 		 *							default style is used.
 		 *
 		 * @note Render target used by the GUIWidget and Camera must be the same. 
 		 */
-		static GUIViewport* create(const GUIOptions& layoutOptions, const HCamera& camera, 
+		static GUIViewport* create(const GUIOptions& options, const HCamera& camera, 
 			float aspectRatio, Degree fieldOfView, const String& styleName = StringUtil::BLANK);
 
 		/**
@@ -90,7 +90,7 @@ namespace BansheeEngine
 		virtual void updateRenderElementsInternal();
 
 	private:
-		GUIViewport(const String& styleName, const HCamera& camera, float aspectRatio, Degree fieldOfView, const GUIDimensions& layoutOptions);
+		GUIViewport(const String& styleName, const HCamera& camera, float aspectRatio, Degree fieldOfView, const GUIDimensions& dimensions);
 
 		/**
 		 * @copydoc	GUIElement::_changeParentWidget

+ 1 - 1
BansheeEngine/Include/BsPrerequisites.h

@@ -59,7 +59,7 @@ namespace BansheeEngine
 	class GUILayout;
 	class GUILayoutX;
 	class GUILayoutY;
-	class GUILayoutExplicit;
+	class GUIPanel;
 	class GUIFixedSpace;
 	class GUIFlexibleSpace;
 	class GUIInputCaret;

+ 2 - 2
BansheeEngine/Source/BsGUIArea.cpp

@@ -2,7 +2,7 @@
 #include "BsGUIWidget.h"
 #include "BsGUILayoutX.h"
 #include "BsGUILayoutY.h"
-#include "BsGUILayoutExplicit.h"
+#include "BsGUIPanel.h"
 #include "BsGUIWidget.h"
 #include "BsRenderWindow.h"
 #include "BsViewport.h"
@@ -22,7 +22,7 @@ namespace BansheeEngine
 			mLayout = bs_new<GUILayoutY>(this);
 			break;
 		case GUILayoutType::LayoutExplicit:
-			mLayout = bs_new<GUILayoutExplicit>(this);
+			mLayout = bs_new<GUIPanel>(this);
 			break;
 		}
 		

+ 6 - 6
BansheeEngine/Source/BsGUIButton.cpp

@@ -17,8 +17,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUIButton::GUIButton(const String& styleName, const GUIContent& content, const GUIDimensions& layoutOptions)
-		:GUIButtonBase(styleName, content, layoutOptions)
+	GUIButton::GUIButton(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions)
+		:GUIButtonBase(styleName, content, dimensions)
 	{ }
 
 	GUIButton* GUIButton::create(const HString& text, const String& styleName)
@@ -26,9 +26,9 @@ namespace BansheeEngine
 		return create(GUIContent(text), styleName);
 	}
 
-	GUIButton* GUIButton::create(const HString& text, const GUIOptions& layoutOptions, const String& styleName)
+	GUIButton* GUIButton::create(const HString& text, const GUIOptions& options, const String& styleName)
 	{
-		return create(GUIContent(text), layoutOptions, styleName);
+		return create(GUIContent(text), options, styleName);
 	}
 
 	GUIButton* GUIButton::create(const GUIContent& content, const String& styleName)
@@ -36,8 +36,8 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIButton, PoolAlloc>()) GUIButton(getStyleName<GUIButton>(styleName), content, GUIDimensions::create());
 	}
 
-	GUIButton* GUIButton::create(const GUIContent& content, const GUIOptions& layoutOptions, const String& styleName)
+	GUIButton* GUIButton::create(const GUIContent& content, const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIButton, PoolAlloc>()) GUIButton(getStyleName<GUIButton>(styleName), content, GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIButton, PoolAlloc>()) GUIButton(getStyleName<GUIButton>(styleName), content, GUIDimensions::create(options));
 	}
 }

+ 2 - 2
BansheeEngine/Source/BsGUIButtonBase.cpp

@@ -11,8 +11,8 @@
 
 namespace BansheeEngine
 {
-	GUIButtonBase::GUIButtonBase(const String& styleName, const GUIContent& content, const GUIDimensions& layoutOptions)
-		:GUIElement(styleName, layoutOptions), mContent(content), mContentImageSprite(nullptr), mActiveState(GUIButtonState::Normal)
+	GUIButtonBase::GUIButtonBase(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions)
+		:GUIElement(styleName, dimensions), mContent(content), mContentImageSprite(nullptr), mActiveState(GUIButtonState::Normal)
 	{
 		mImageSprite = bs_new<ImageSprite, PoolAlloc>();
 		mTextSprite = bs_new<TextSprite, PoolAlloc>();

+ 4 - 4
BansheeEngine/Source/BsGUIDropDownContent.cpp

@@ -20,8 +20,8 @@ namespace BansheeEngine
 	const String GUIDropDownContent::SEPARATOR_STYLE_TYPE = "DropDownSeparator";
 
 	GUIDropDownContent::GUIDropDownContent(GUIDropDownBox::DropDownSubMenu* parent, const GUIDropDownData& dropDownData, 
-		const String& style, const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions, style), mDropDownData(dropDownData), 
+		const String& style, const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions, style), mDropDownData(dropDownData),
 		mSelectedIdx(UINT_MAX), mRangeStart(0), mRangeEnd(0), mParent(parent)
 	{
 		
@@ -43,14 +43,14 @@ namespace BansheeEngine
 	}
 
 	GUIDropDownContent* GUIDropDownContent::create(GUIDropDownBox::DropDownSubMenu* parent, 
-		const GUIDropDownData& dropDownData, const GUIOptions& layoutOptions,
+		const GUIDropDownData& dropDownData, const GUIOptions& options,
 		const String& style)
 	{
 		const String* curStyle = &style;
 		if (*curStyle == StringUtil::BLANK)
 			curStyle = &GUIDropDownContent::getGUITypeName();
 
-		return new (bs_alloc<GUIDropDownContent>()) GUIDropDownContent(parent, dropDownData, *curStyle, GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIDropDownContent>()) GUIDropDownContent(parent, dropDownData, *curStyle, GUIDimensions::create(options));
 	}
 
 	void GUIDropDownContent::styleUpdated()

+ 4 - 4
BansheeEngine/Source/BsGUIDropDownHitBox.cpp

@@ -17,13 +17,13 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIDropDownHitBox, PoolAlloc>()) GUIDropDownHitBox(captureMouse, GUIDimensions::create());
 	}
 
-	GUIDropDownHitBox* GUIDropDownHitBox::create(bool captureMouse, const GUIOptions& layoutOptions)
+	GUIDropDownHitBox* GUIDropDownHitBox::create(bool captureMouse, const GUIOptions& options)
 	{
-		return new (bs_alloc<GUIDropDownHitBox, PoolAlloc>()) GUIDropDownHitBox(captureMouse, GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIDropDownHitBox, PoolAlloc>()) GUIDropDownHitBox(captureMouse, GUIDimensions::create(options));
 	}
 
-	GUIDropDownHitBox::GUIDropDownHitBox(bool captureMouse, const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mCaptureMouse(captureMouse)
+	GUIDropDownHitBox::GUIDropDownHitBox(bool captureMouse, const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions), mCaptureMouse(captureMouse)
 	{
 
 	}

+ 4 - 4
BansheeEngine/Source/BsGUIElementBase.cpp

@@ -2,7 +2,7 @@
 #include "BsGUILayout.h"
 #include "BsGUILayoutX.h"
 #include "BsGUILayoutY.h"
-#include "BsGUILayoutExplicit.h"
+#include "BsGUIPanel.h"
 #include "BsGUISpace.h"
 #include "BsGUIElement.h"
 #include "BsException.h"
@@ -35,7 +35,7 @@ namespace BansheeEngine
 				GUIElement* element = static_cast<GUIElement*>(child);
 				GUIElement::destroy(element);
 			}
-			else if (child->_getType() == Type::Layout)
+			else if (child->_getType() == Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 				GUILayout::destroy(layout);
@@ -207,8 +207,8 @@ namespace BansheeEngine
 		if (mIsDisabled)
 			return LayoutSizeRange();
 
-		const GUIDimensions& layoutOptions = _getDimensions();
-		return layoutOptions.calculateSizeRange(_getOptimalSize());
+		const GUIDimensions& dimensions = _getDimensions();
+		return dimensions.calculateSizeRange(_getOptimalSize());
 	}
 
 	void GUIElementBase::_getElementAreas(INT32 x, INT32 y, UINT32 width, UINT32 height, Rect2I* elementAreas, UINT32 numElements,

+ 2 - 2
BansheeEngine/Source/BsGUIElementContainer.cpp

@@ -3,8 +3,8 @@
 
 namespace BansheeEngine
 {
-	GUIElementContainer::GUIElementContainer(const GUIDimensions& layoutOptions, const String& style)
-		:GUIElement(style, layoutOptions)
+	GUIElementContainer::GUIElementContainer(const GUIDimensions& dimensions, const String& style)
+		:GUIElement(style, dimensions)
 	{ }
 
 	GUIElementContainer::~GUIElementContainer()

+ 5 - 5
BansheeEngine/Source/BsGUIHelper.cpp

@@ -6,7 +6,7 @@
 
 namespace BansheeEngine
 {
-	Vector2I GUIHelper::calcOptimalContentsSize(const Vector2I& contentSize, const GUIElementStyle& style, const GUIDimensions& layoutOptions)
+	Vector2I GUIHelper::calcOptimalContentsSize(const Vector2I& contentSize, const GUIElementStyle& style, const GUIDimensions& dimensions)
 	{
 		UINT32 contentWidth = style.margins.left + style.margins.right + style.contentOffset.left + style.contentOffset.right;
 		UINT32 contentHeight = style.margins.top + style.margins.bottom + style.contentOffset.top + style.contentOffset.bottom;
@@ -14,9 +14,9 @@ namespace BansheeEngine
 		return Vector2I(std::max((UINT32)contentSize.x, contentWidth), std::max((UINT32)contentSize.y, contentHeight));
 	}
 
-	Vector2I GUIHelper::calcOptimalContentsSize(const GUIContent& content, const GUIElementStyle& style, const GUIDimensions& layoutOptions)
+	Vector2I GUIHelper::calcOptimalContentsSize(const GUIContent& content, const GUIElementStyle& style, const GUIDimensions& dimensions)
 	{
-		Vector2I textContentBounds = calcOptimalContentsSize(content.getText(), style, layoutOptions);
+		Vector2I textContentBounds = calcOptimalContentsSize(content.getText(), style, dimensions);
 
 		UINT32 contentWidth = style.margins.left + style.margins.right + style.contentOffset.left + style.contentOffset.right;
 		UINT32 contentHeight = style.margins.top + style.margins.bottom + style.contentOffset.top + style.contentOffset.bottom;
@@ -29,12 +29,12 @@ namespace BansheeEngine
 		return Vector2I(std::max((UINT32)textContentBounds.x, contentWidth), std::max((UINT32)textContentBounds.y, contentHeight));
 	}
 
-	Vector2I GUIHelper::calcOptimalContentsSize(const WString& text, const GUIElementStyle& style, const GUIDimensions& layoutOptions)
+	Vector2I GUIHelper::calcOptimalContentsSize(const WString& text, const GUIElementStyle& style, const GUIDimensions& dimensions)
 	{
 		UINT32 wordWrapWidth = 0;
 
 		if(style.wordWrap)
-			wordWrapWidth = layoutOptions.maxWidth;
+			wordWrapWidth = dimensions.maxWidth;
 
 		UINT32 contentWidth = style.margins.left + style.margins.right + style.contentOffset.left + style.contentOffset.right;
 		UINT32 contentHeight = style.margins.top + style.margins.bottom + style.contentOffset.top + style.contentOffset.bottom;

+ 6 - 6
BansheeEngine/Source/BsGUIInputBox.cpp

@@ -32,8 +32,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUIInputBox::GUIInputBox(const String& styleName, const GUIDimensions& layoutOptions, bool multiline)
-		:GUIElement(styleName, layoutOptions), mDragInProgress(false),
+	GUIInputBox::GUIInputBox(const String& styleName, const GUIDimensions& dimensions, bool multiline)
+		:GUIElement(styleName, dimensions), mDragInProgress(false),
 		mCaretShown(false), mSelectionShown(false), mIsMultiline(multiline), mHasFocus(false), mIsMouseOver(false),
 		mState(State::Normal)
 	{
@@ -52,14 +52,14 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIInputBox, PoolAlloc>()) GUIInputBox(getStyleName<GUIInputBox>(styleName), GUIDimensions::create(), multiline);
 	}
 
-	GUIInputBox* GUIInputBox::create(bool multiline, const GUIOptions& layoutOptions, const String& styleName)
+	GUIInputBox* GUIInputBox::create(bool multiline, const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIInputBox, PoolAlloc>()) GUIInputBox(getStyleName<GUIInputBox>(styleName), GUIDimensions::create(layoutOptions), multiline);
+		return new (bs_alloc<GUIInputBox, PoolAlloc>()) GUIInputBox(getStyleName<GUIInputBox>(styleName), GUIDimensions::create(options), multiline);
 	}
 
-	GUIInputBox* GUIInputBox::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUIInputBox* GUIInputBox::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIInputBox, PoolAlloc>()) GUIInputBox(getStyleName<GUIInputBox>(styleName), GUIDimensions::create(layoutOptions), false);
+		return new (bs_alloc<GUIInputBox, PoolAlloc>()) GUIInputBox(getStyleName<GUIInputBox>(styleName), GUIDimensions::create(options), false);
 	}
 
 	void GUIInputBox::setText(const WString& text)

+ 6 - 6
BansheeEngine/Source/BsGUILabel.cpp

@@ -9,8 +9,8 @@
 
 namespace BansheeEngine
 {
-	GUILabel::GUILabel(const String& styleName, const GUIContent& content, const GUIDimensions& layoutOptions)
-		:GUIElement(styleName, layoutOptions), mContent(content)
+	GUILabel::GUILabel(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions)
+		:GUIElement(styleName, dimensions), mContent(content)
 	{
 		mTextSprite = bs_new<TextSprite, PoolAlloc>();
 
@@ -93,9 +93,9 @@ namespace BansheeEngine
 		return create(GUIContent(text), styleName);
 	}
 
-	GUILabel* GUILabel::create(const HString& text, const GUIOptions& layoutOptions, const String& styleName)
+	GUILabel* GUILabel::create(const HString& text, const GUIOptions& options, const String& styleName)
 	{
-		return create(GUIContent(text), layoutOptions, styleName);
+		return create(GUIContent(text), options, styleName);
 	}
 
 	GUILabel* GUILabel::create(const GUIContent& content, const String& styleName)
@@ -103,9 +103,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUILabel, PoolAlloc>()) GUILabel(getStyleName<GUILabel>(styleName), content, GUIDimensions::create());
 	}
 
-	GUILabel* GUILabel::create(const GUIContent& content, const GUIOptions& layoutOptions, const String& styleName)
+	GUILabel* GUILabel::create(const GUIContent& content, const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUILabel, PoolAlloc>()) GUILabel(getStyleName<GUILabel>(styleName), content, GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUILabel, PoolAlloc>()) GUILabel(getStyleName<GUILabel>(styleName), content, GUIDimensions::create(options));
 	}
 
 	const String& GUILabel::getGUITypeName()

+ 6 - 8
BansheeEngine/Source/BsGUILayout.cpp

@@ -9,20 +9,18 @@ namespace BansheeEngine
 {
 	GUILayout::GUILayout(GUIArea* parentArea)
 		:mParentGUIArea(parentArea)
-	{
+	{ }
 
-	}
+	GUILayout::GUILayout(const GUIDimensions& dimensions)
+		:GUIElementBase(dimensions), mParentGUIArea(nullptr)
+	{ }
 
 	GUILayout::GUILayout()
 		:mParentGUIArea(nullptr)
-	{
-
-	}
+	{ }
 
 	GUILayout::~GUILayout() 
-	{
-
-	}
+	{ }
 
 	void GUILayout::addElement(GUIElementBase* element)
 	{

+ 12 - 4
BansheeEngine/Source/BsGUILayoutUtility.cpp

@@ -18,15 +18,23 @@ namespace BansheeEngine
 
 		GUIElementBase* parent = elem->_getParent();
 		if (parent != nullptr)
+		{
 			parentArea = calcBounds(parent);
+
+			if (parent->_getType() == GUIElementBase::Type::Panel)
+			{
+				parentArea.x = 0;
+				parentArea.y = 0;
+			}
+		}
 		else
 		{
-			assert(elem->_getType() == GUIElementBase::Type::Layout);
+			assert(elem->_getType() == GUIElementBase::Type::Layout || elem->_getType() == GUIElementBase::Type::Panel);
 			const GUILayout* layout = static_cast<const GUILayout*>(elem);
 
 			GUIArea* parentGUIArea = layout->_getParentGUIArea();
-			parentArea.x = parentGUIArea->x();
-			parentArea.y = parentGUIArea->y();
+			parentArea.x = 0;
+			parentArea.y = 0;
 			parentArea.width = parentGUIArea->width();
 			parentArea.height = parentGUIArea->height();
 
@@ -86,7 +94,7 @@ namespace BansheeEngine
 			GUIElementBase* child = layout->_getChild(i);
 			Rect2I childArea = elementAreas[i];
 
-			if (child->_getType() == GUIElementBase::Type::Layout)
+			if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				Vector2I childActualSize = calcActualSize(childArea.width, childArea.height, static_cast<GUILayout*>(child));
 				actualAreas[i].width = (UINT32)childActualSize.x;

+ 35 - 21
BansheeEngine/Source/BsGUILayoutX.cpp

@@ -10,6 +10,10 @@ namespace BansheeEngine
 		:GUILayout(parentArea)
 	{ }
 
+	GUILayoutX::GUILayoutX(const GUIDimensions& dimensions)
+		: GUILayout(dimensions)
+	{ }
+
 	LayoutSizeRange GUILayoutX::_calculateLayoutSizeRange() const
 	{
 		if (mIsDisabled)
@@ -59,7 +63,7 @@ namespace BansheeEngine
 			{
 				childSizeRange = child->_calculateLayoutSizeRange();
 			}
-			else if(child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 				childSizeRange = layout->_getCachedSizeRange();
@@ -109,7 +113,12 @@ namespace BansheeEngine
 			{
 				processedElements[childIdx] = true;
 			}
-			else if (child->_getType() == GUIElementBase::Type::Element || child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::FlexibleSpace)
+			{
+				numFlexibleSpaces++;
+				numNonClampedElements++;
+			}
+			else
 			{
 				const GUIDimensions& dimensions = child->_getDimensions();
 
@@ -121,11 +130,6 @@ namespace BansheeEngine
 					totalNonClampedSize += elementAreas[childIdx].width;
 				}
 			}
-			else if (child->_getType() == GUIElementBase::Type::FlexibleSpace)
-			{
-				numFlexibleSpaces++;
-				numNonClampedElements++;
-			}
 
 			childIdx++;
 		}
@@ -214,7 +218,16 @@ namespace BansheeEngine
 					UINT32 elementWidth = (UINT32)std::max(0, (INT32)elementAreas[childIdx].width - (INT32)extraWidth);
 
 					// Clamp if needed
-					if (child->_getType() == GUIElementBase::Type::Element || child->_getType() == GUIElementBase::Type::Layout)
+					switch (child->_getType())
+					{
+					case GUIElementBase::Type::FlexibleSpace:
+						elementAreas[childIdx].width = 0;
+						processedElements[childIdx] = true;
+						numNonClampedElements--;
+						break;
+					case GUIElementBase::Type::Element:
+					case GUIElementBase::Type::Layout:
+					case GUIElementBase::Type::Panel:
 					{
 						const LayoutSizeRange& childSizeRange = sizeRanges[childIdx];
 
@@ -235,11 +248,7 @@ namespace BansheeEngine
 						elementAreas[childIdx].width = elementWidth;
 						remainingSize = (UINT32)std::max(0, (INT32)remainingSize - (INT32)extraWidth);
 					}
-					else if (child->_getType() == GUIElementBase::Type::FlexibleSpace)
-					{
-						elementAreas[childIdx].width = 0;
-						processedElements[childIdx] = true;
-						numNonClampedElements--;
+						break;
 					}
 
 					childIdx++;
@@ -313,15 +322,15 @@ namespace BansheeEngine
 			xOffset += child->_getPadding().left;
 
 			UINT32 elemHeight = (UINT32)sizeRanges[childIdx].optimal.y;
-			const GUIDimensions& layoutOptions = child->_getDimensions();
-			if (!layoutOptions.fixedHeight())
+			const GUIDimensions& dimensions = child->_getDimensions();
+			if (!dimensions.fixedHeight())
 			{
 				elemHeight = height;
-				if (layoutOptions.minHeight > 0 && elemHeight < layoutOptions.minHeight)
-					elemHeight = layoutOptions.minHeight;
+				if (dimensions.minHeight > 0 && elemHeight < dimensions.minHeight)
+					elemHeight = dimensions.minHeight;
 
-				if (layoutOptions.maxHeight > 0 && elemHeight > layoutOptions.maxHeight)
-					elemHeight = layoutOptions.maxHeight;
+				if (dimensions.maxHeight > 0 && elemHeight > dimensions.maxHeight)
+					elemHeight = dimensions.maxHeight;
 			}
 
 			elementAreas[childIdx].height = elemHeight;
@@ -337,7 +346,7 @@ namespace BansheeEngine
 				elementAreas[childIdx].x = x + xOffset;
 				elementAreas[childIdx].y = y + yOffset;
 			}
-			else if (child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 
@@ -394,7 +403,7 @@ namespace BansheeEngine
 
 				actualSizes[childIdx].height = childArea.height + child->_getPadding().top + child->_getPadding().bottom;
 			}
-			else if (child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 
@@ -441,4 +450,9 @@ namespace BansheeEngine
 	{
 		return bs_new<GUILayoutX>();
 	}
+
+	GUILayoutX* GUILayoutX::create(const GUIOptions& options)
+	{
+		return bs_new<GUILayoutX>(GUIDimensions::create(options));
+	}
 }

+ 37 - 23
BansheeEngine/Source/BsGUILayoutY.cpp

@@ -10,6 +10,10 @@ namespace BansheeEngine
 		:GUILayout(parentArea)
 	{ }
 
+	GUILayoutY::GUILayoutY(const GUIDimensions& dimensions)
+		: GUILayout(dimensions)
+	{ }
+
 	LayoutSizeRange GUILayoutY::_calculateLayoutSizeRange() const
 	{
 		if (mIsDisabled)
@@ -59,7 +63,7 @@ namespace BansheeEngine
 			{
 				childSizeRange = child->_calculateLayoutSizeRange();
 			}
-			else if(child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 				childSizeRange = layout->_getCachedSizeRange();
@@ -109,11 +113,16 @@ namespace BansheeEngine
 			{
 				processedElements[childIdx] = true;
 			}
-			else if (child->_getType() == GUIElementBase::Type::Element || child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::FlexibleSpace)
 			{
-				const GUIDimensions& layoutOptions = child->_getDimensions();
+				numFlexibleSpaces++;
+				numNonClampedElements++;
+			}
+			else
+			{
+				const GUIDimensions& dimensions = child->_getDimensions();
 
-				if (layoutOptions.fixedHeight())
+				if (dimensions.fixedHeight())
 					processedElements[childIdx] = true;
 				else
 				{
@@ -121,11 +130,6 @@ namespace BansheeEngine
 					totalNonClampedSize += elementAreas[childIdx].height;
 				}
 			}
-			else if (child->_getType() == GUIElementBase::Type::FlexibleSpace)
-			{
-				numFlexibleSpaces++;
-				numNonClampedElements++;
-			}
 
 			childIdx++;
 		}
@@ -214,7 +218,16 @@ namespace BansheeEngine
 					UINT32 elementHeight = (UINT32)std::max(0, (INT32)elementAreas[childIdx].height - (INT32)extraHeight);
 
 					// Clamp if needed
-					if (child->_getType() == GUIElementBase::Type::Element || child->_getType() == GUIElementBase::Type::Layout)
+					switch (child->_getType())
+					{
+					case GUIElementBase::Type::FlexibleSpace:
+						elementAreas[childIdx].height = 0;
+						processedElements[childIdx] = true;
+						numNonClampedElements--;
+						break;
+					case GUIElementBase::Type::Element:
+					case GUIElementBase::Type::Layout:
+					case GUIElementBase::Type::Panel:
 					{
 						const LayoutSizeRange& childSizeRange = sizeRanges[childIdx];
 
@@ -235,11 +248,7 @@ namespace BansheeEngine
 						elementAreas[childIdx].height = elementHeight;
 						remainingSize = (UINT32)std::max(0, (INT32)remainingSize - (INT32)extraHeight);
 					}
-					else if (child->_getType() == GUIElementBase::Type::FlexibleSpace)
-					{
-						elementAreas[childIdx].height = 0;
-						processedElements[childIdx] = true;
-						numNonClampedElements--;
+						break;
 					}
 
 					childIdx++;
@@ -319,15 +328,15 @@ namespace BansheeEngine
 			yOffset += child->_getPadding().top;
 
 			UINT32 elemWidth = (UINT32)sizeRanges[childIdx].optimal.x;
-			const GUIDimensions& layoutOptions = child->_getDimensions();
-			if (!layoutOptions.fixedWidth())
+			const GUIDimensions& dimensions = child->_getDimensions();
+			if (!dimensions.fixedWidth())
 			{
 				elemWidth = width;
-				if (layoutOptions.minWidth > 0 && elemWidth < layoutOptions.minWidth)
-					elemWidth = layoutOptions.minWidth;
+				if (dimensions.minWidth > 0 && elemWidth < dimensions.minWidth)
+					elemWidth = dimensions.minWidth;
 
-				if (layoutOptions.maxWidth > 0 && elemWidth > layoutOptions.maxWidth)
-					elemWidth = layoutOptions.maxWidth;
+				if (dimensions.maxWidth > 0 && elemWidth > dimensions.maxWidth)
+					elemWidth = dimensions.maxWidth;
 			}
 
 			elementAreas[childIdx].width = elemWidth;
@@ -343,7 +352,7 @@ namespace BansheeEngine
 				elementAreas[childIdx].x = x + xOffset;
 				elementAreas[childIdx].y = y + yOffset;
 			}
-			else if (child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				elementAreas[childIdx].x = x;
 				elementAreas[childIdx].y = y + yOffset;
@@ -393,7 +402,7 @@ namespace BansheeEngine
 
 				actualSizes[childIdx].width = childArea.width + element->_getPadding().left + element->_getPadding().right;
 			}
-			else if(child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 
@@ -440,4 +449,9 @@ namespace BansheeEngine
 	{
 		return bs_new<GUILayoutY>();
 	}
+
+	GUILayoutY* GUILayoutY::create(const GUIOptions& options)
+	{
+		return bs_new<GUILayoutY>(GUIDimensions::create(options));
+	}
 }

+ 4 - 4
BansheeEngine/Source/BsGUIListBox.cpp

@@ -19,8 +19,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUIListBox::GUIListBox(const String& styleName, const Vector<HString>& elements, const GUIDimensions& layoutOptions)
-		:GUIButtonBase(styleName, GUIContent(HString(L"")), layoutOptions), mElements(elements), mSelectedIdx(0), mIsListBoxOpen(false)
+	GUIListBox::GUIListBox(const String& styleName, const Vector<HString>& elements, const GUIDimensions& dimensions)
+		:GUIButtonBase(styleName, GUIContent(HString(L"")), dimensions), mElements(elements), mSelectedIdx(0), mIsListBoxOpen(false)
 	{
 		if(elements.size() > 0)
 			setContent(GUIContent(mElements[mSelectedIdx]));
@@ -36,9 +36,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIListBox, PoolAlloc>()) GUIListBox(getStyleName<GUIListBox>(styleName), elements, GUIDimensions::create());
 	}
 
-	GUIListBox* GUIListBox::create(const Vector<HString>& elements, const GUIOptions& layoutOptions, const String& styleName)
+	GUIListBox* GUIListBox::create(const Vector<HString>& elements, const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIListBox, PoolAlloc>()) GUIListBox(getStyleName<GUIListBox>(styleName), elements, GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIListBox, PoolAlloc>()) GUIListBox(getStyleName<GUIListBox>(styleName), elements, GUIDimensions::create(options));
 	}
 
 	void GUIListBox::setElements(const Vector<HString>& elements)

+ 20 - 11
BansheeEngine/Source/BsGUILayoutExplicit.cpp → BansheeEngine/Source/BsGUIPanel.cpp

@@ -1,4 +1,4 @@
-#include "BsGUILayoutExplicit.h"
+#include "BsGUIPanel.h"
 #include "BsGUIElement.h"
 #include "BsGUISpace.h"
 #include "BsMath.h"
@@ -6,11 +6,15 @@
 
 namespace BansheeEngine
 {
-	GUILayoutExplicit::GUILayoutExplicit(GUIArea* parentArea)
+	GUIPanel::GUIPanel(GUIArea* parentArea)
 		:GUILayout(parentArea)
 	{ }
 
-	LayoutSizeRange GUILayoutExplicit::_calculateLayoutSizeRange() const
+	GUIPanel::GUIPanel(const GUIDimensions& dimensions)
+		: GUILayout(dimensions)
+	{ }
+
+	LayoutSizeRange GUIPanel::_calculateLayoutSizeRange() const
 	{
 		if (mIsDisabled)
 			return LayoutSizeRange();
@@ -38,7 +42,7 @@ namespace BansheeEngine
 		return _getDimensions().calculateSizeRange(optimalSize);
 	}
 
-	void GUILayoutExplicit::_updateOptimalLayoutSizes()
+	void GUIPanel::_updateOptimalLayoutSizes()
 	{
 		// Update all children first, otherwise we can't determine our own optimal size
 		GUIElementBase::_updateOptimalLayoutSizes();
@@ -65,7 +69,7 @@ namespace BansheeEngine
 			{
 				childSizeRange = child->_calculateLayoutSizeRange();
 			}
-			else if (child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 				childSizeRange = layout->_getCachedSizeRange();
@@ -87,7 +91,7 @@ namespace BansheeEngine
 		mSizeRange = _getDimensions().calculateSizeRange(optimalSize);
 	}
 
-	void GUILayoutExplicit::_getElementAreas(INT32 x, INT32 y, UINT32 width, UINT32 height, Rect2I* elementAreas, UINT32 numElements,
+	void GUIPanel::_getElementAreas(INT32 x, INT32 y, UINT32 width, UINT32 height, Rect2I* elementAreas, UINT32 numElements,
 		const Vector<LayoutSizeRange>& sizeRanges, const LayoutSizeRange& mySizeRange) const
 	{
 		assert(mChildren.size() == numElements);
@@ -105,7 +109,7 @@ namespace BansheeEngine
 		}
 	}
 
-	void GUILayoutExplicit::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height, Rect2I clipRect, UINT8 widgetDepth, UINT16 areaDepth)
+	void GUIPanel::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height, Rect2I clipRect, UINT8 widgetDepth, UINT16 areaDepth)
 	{
 		UINT32 numElements = (UINT32)mChildren.size();
 		Rect2I* elementAreas = nullptr;
@@ -143,7 +147,7 @@ namespace BansheeEngine
 				actualSizes[childIdx].width = childArea.width + child->_getPadding().top + child->_getPadding().bottom;
 				actualSizes[childIdx].height = childArea.height + child->_getPadding().top + child->_getPadding().bottom;
 			}
-			else if (child->_getType() == GUIElementBase::Type::Layout)
+			else if (child->_getType() == GUIElementBase::Type::Layout || child->_getType() == GUIElementBase::Type::Panel)
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 
@@ -173,7 +177,7 @@ namespace BansheeEngine
 		_markAsClean();
 	}
 
-	Vector2I GUILayoutExplicit::_calcActualSize(INT32 x, INT32 y, Rect2I* elementAreas, UINT32 numElements) const
+	Vector2I GUIPanel::_calcActualSize(INT32 x, INT32 y, Rect2I* elementAreas, UINT32 numElements) const
 	{
 		Vector2I actualArea;
 		for (UINT32 i = 0; i < numElements; i++)
@@ -190,8 +194,13 @@ namespace BansheeEngine
 		return actualArea;
 	}
 
-	GUILayoutExplicit* GUILayoutExplicit::create()
+	GUIPanel* GUIPanel::create()
+	{
+		return bs_new<GUIPanel>();
+	}
+
+	GUIPanel* GUIPanel::create(const GUIOptions& options)
 	{
-		return bs_new<GUILayoutExplicit>();
+		return bs_new<GUIPanel>(GUIDimensions::create(options));
 	}
 }

+ 4 - 4
BansheeEngine/Source/BsGUIProgressBar.cpp

@@ -9,8 +9,8 @@ using namespace std::placeholders;
 
 namespace BansheeEngine
 {
-	GUIProgressBar::GUIProgressBar(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions, styleName), mPercent(0)
+	GUIProgressBar::GUIProgressBar(const String& styleName, const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions, styleName), mPercent(0)
 	{
 		mBar = GUITexture::create(getSubStyleName(getBarStyleType()));
 		mBackground = GUITexture::create(getSubStyleName(getBackgroundStyleType()));
@@ -96,9 +96,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIProgressBar, PoolAlloc>()) GUIProgressBar(getStyleName<GUIProgressBar>(styleName), GUIDimensions::create());
 	}
 
-	GUIProgressBar* GUIProgressBar::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUIProgressBar* GUIProgressBar::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIProgressBar, PoolAlloc>()) GUIProgressBar(getStyleName<GUIProgressBar>(styleName), GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIProgressBar, PoolAlloc>()) GUIProgressBar(getStyleName<GUIProgressBar>(styleName), GUIDimensions::create(options));
 	}
 
 	const String& GUIProgressBar::getGUITypeName()

+ 4 - 4
BansheeEngine/Source/BsGUIRenderTexture.cpp

@@ -13,8 +13,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUIRenderTexture::GUIRenderTexture(const String& styleName, const RenderTexturePtr& texture, const GUIDimensions& layoutOptions)
-		:GUITexture(styleName, HSpriteTexture(), GUIImageScaleMode::StretchToFit, false, layoutOptions)
+	GUIRenderTexture::GUIRenderTexture(const String& styleName, const RenderTexturePtr& texture, const GUIDimensions& dimensions)
+		:GUITexture(styleName, HSpriteTexture(), GUIImageScaleMode::StretchToFit, false, dimensions)
 	{
 		setRenderTexture(texture);
 	}
@@ -30,9 +30,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIRenderTexture, PoolAlloc>()) GUIRenderTexture(getStyleName<GUIRenderTexture>(styleName), texture, GUIDimensions::create());
 	}
 
-	GUIRenderTexture* GUIRenderTexture::create(const RenderTexturePtr& texture, const GUIOptions& layoutOptions, const String& styleName)
+	GUIRenderTexture* GUIRenderTexture::create(const RenderTexturePtr& texture, const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIRenderTexture, PoolAlloc>()) GUIRenderTexture(getStyleName<GUIRenderTexture>(styleName), texture, GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIRenderTexture, PoolAlloc>()) GUIRenderTexture(getStyleName<GUIRenderTexture>(styleName), texture, GUIDimensions::create(options));
 	}
 
 	void GUIRenderTexture::setRenderTexture(const RenderTexturePtr& texture)

+ 6 - 6
BansheeEngine/Source/BsGUIScrollArea.cpp

@@ -20,8 +20,8 @@ namespace BansheeEngine
 	const UINT32 GUIScrollArea::WheelScrollAmount = 50;
 
 	GUIScrollArea::GUIScrollArea(ScrollBarType vertBarType, ScrollBarType horzBarType, 
-		const String& scrollBarStyle, const String& scrollAreaStyle, const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mVertScroll(nullptr), mHorzScroll(nullptr), mVertOffset(0), mHorzOffset(0),
+		const String& scrollBarStyle, const String& scrollAreaStyle, const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions), mVertScroll(nullptr), mHorzScroll(nullptr), mVertOffset(0), mHorzOffset(0),
 		mVertBarType(vertBarType), mHorzBarType(horzBarType), mScrollBarStyle(scrollBarStyle)
 	{
 		mContentLayout = GUILayoutY::create();
@@ -424,11 +424,11 @@ namespace BansheeEngine
 			getStyleName<GUIScrollArea>(scrollAreaStyle), GUIDimensions::create());
 	}
 
-	GUIScrollArea* GUIScrollArea::create(const GUIOptions& layoutOptions, const String& scrollBarStyle, 
+	GUIScrollArea* GUIScrollArea::create(const GUIOptions& options, const String& scrollBarStyle, 
 		const String& scrollAreaStyle)
 	{
 		return new (bs_alloc<GUIScrollArea, PoolAlloc>()) GUIScrollArea(ScrollBarType::ShowIfDoesntFit, 
-			ScrollBarType::ShowIfDoesntFit, scrollBarStyle, getStyleName<GUIScrollArea>(scrollAreaStyle), GUIDimensions::create(layoutOptions));
+			ScrollBarType::ShowIfDoesntFit, scrollBarStyle, getStyleName<GUIScrollArea>(scrollAreaStyle), GUIDimensions::create(options));
 	}
 
 	GUIScrollArea* GUIScrollArea::create(const String& scrollBarStyle, const String& scrollAreaStyle)
@@ -438,11 +438,11 @@ namespace BansheeEngine
 	}
 
 	GUIScrollArea* GUIScrollArea::create(ScrollBarType vertBarType, 
-		ScrollBarType horzBarType, const GUIOptions& layoutOptions, const String& scrollBarStyle, 
+		ScrollBarType horzBarType, const GUIOptions& options, const String& scrollBarStyle, 
 		const String& scrollAreaStyle)
 	{
 		return new (bs_alloc<GUIScrollArea, PoolAlloc>()) GUIScrollArea(vertBarType, horzBarType, scrollBarStyle, 
-			getStyleName<GUIScrollArea>(scrollAreaStyle), GUIDimensions::create(layoutOptions));
+			getStyleName<GUIScrollArea>(scrollAreaStyle), GUIDimensions::create(options));
 	}
 
 	const String& GUIScrollArea::getGUITypeName()

+ 2 - 2
BansheeEngine/Source/BsGUIScrollBar.cpp

@@ -18,8 +18,8 @@ namespace BansheeEngine
 {
 	const UINT32 GUIScrollBar::ButtonScrollAmount = 10;
 
-	GUIScrollBar::GUIScrollBar(bool horizontal, const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIElement(styleName, layoutOptions), mHorizontal(horizontal)
+	GUIScrollBar::GUIScrollBar(bool horizontal, const String& styleName, const GUIDimensions& dimensions)
+		:GUIElement(styleName, dimensions), mHorizontal(horizontal)
 	{
 		mImageSprite = bs_new<ImageSprite, PoolAlloc>();
 

+ 4 - 4
BansheeEngine/Source/BsGUIScrollBarHorz.cpp

@@ -12,8 +12,8 @@
 
 namespace BansheeEngine
 {
-	GUIScrollBarHorz::GUIScrollBarHorz(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIScrollBar(true, styleName, layoutOptions)
+	GUIScrollBarHorz::GUIScrollBarHorz(const String& styleName, const GUIDimensions& dimensions)
+		:GUIScrollBar(true, styleName, dimensions)
 	{
 
 	}
@@ -28,9 +28,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIScrollBarHorz, PoolAlloc>()) GUIScrollBarHorz(getStyleName<GUIScrollBarHorz>(styleName), GUIDimensions::create());
 	}
 
-	GUIScrollBarHorz* GUIScrollBarHorz::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUIScrollBarHorz* GUIScrollBarHorz::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIScrollBarHorz, PoolAlloc>()) GUIScrollBarHorz(getStyleName<GUIScrollBarHorz>(styleName), GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIScrollBarHorz, PoolAlloc>()) GUIScrollBarHorz(getStyleName<GUIScrollBarHorz>(styleName), GUIDimensions::create(options));
 	}
 
 	const String& GUIScrollBarHorz::getGUITypeName()

+ 4 - 4
BansheeEngine/Source/BsGUIScrollBarVert.cpp

@@ -12,8 +12,8 @@
 
 namespace BansheeEngine
 {
-	GUIScrollBarVert::GUIScrollBarVert(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIScrollBar(false, styleName, layoutOptions)
+	GUIScrollBarVert::GUIScrollBarVert(const String& styleName, const GUIDimensions& dimensions)
+		:GUIScrollBar(false, styleName, dimensions)
 	{
 
 	}
@@ -28,9 +28,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUIScrollBarVert, PoolAlloc>()) GUIScrollBarVert(getStyleName<GUIScrollBarVert>(styleName), GUIDimensions::create());
 	}
 
-	GUIScrollBarVert* GUIScrollBarVert::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUIScrollBarVert* GUIScrollBarVert::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUIScrollBarVert, PoolAlloc>()) GUIScrollBarVert(getStyleName<GUIScrollBarVert>(styleName), GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUIScrollBarVert, PoolAlloc>()) GUIScrollBarVert(getStyleName<GUIScrollBarVert>(styleName), GUIDimensions::create(options));
 	}
 
 	const String& GUIScrollBarVert::getGUITypeName()

+ 10 - 10
BansheeEngine/Source/BsGUISlider.cpp

@@ -10,8 +10,8 @@ using namespace std::placeholders;
 
 namespace BansheeEngine
 {
-	GUISlider::GUISlider(bool horizontal, const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIElementContainer(layoutOptions, styleName)
+	GUISlider::GUISlider(bool horizontal, const String& styleName, const GUIDimensions& dimensions)
+		:GUIElementContainer(dimensions, styleName)
 	{
 		mSliderHandle = GUISliderHandle::create(horizontal, true, getSubStyleName(getHandleStyleType()));
 		mBackground = GUITexture::create(getSubStyleName(getBackgroundStyleType()));
@@ -100,8 +100,8 @@ namespace BansheeEngine
 		onChanged(newPosition);
 	}
 
-	GUISliderHorz::GUISliderHorz(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUISlider(true, styleName, layoutOptions)
+	GUISliderHorz::GUISliderHorz(const String& styleName, const GUIDimensions& dimensions)
+		:GUISlider(true, styleName, dimensions)
 	{
 
 	}
@@ -111,9 +111,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUISliderHorz, PoolAlloc>()) GUISliderHorz(getStyleName<GUISliderHorz>(styleName), GUIDimensions::create());
 	}
 
-	GUISliderHorz* GUISliderHorz::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUISliderHorz* GUISliderHorz::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUISliderHorz, PoolAlloc>()) GUISliderHorz(getStyleName<GUISliderHorz>(styleName), GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUISliderHorz, PoolAlloc>()) GUISliderHorz(getStyleName<GUISliderHorz>(styleName), GUIDimensions::create(options));
 	}
 
 	const String& GUISliderHorz::getGUITypeName()
@@ -122,8 +122,8 @@ namespace BansheeEngine
 		return typeName;
 	}
 
-	GUISliderVert::GUISliderVert(const String& styleName, const GUIDimensions& layoutOptions)
-		:GUISlider(false, styleName, layoutOptions)
+	GUISliderVert::GUISliderVert(const String& styleName, const GUIDimensions& dimensions)
+		:GUISlider(false, styleName, dimensions)
 	{
 
 	}
@@ -133,9 +133,9 @@ namespace BansheeEngine
 		return new (bs_alloc<GUISliderVert, PoolAlloc>()) GUISliderVert(getStyleName<GUISliderVert>(styleName), GUIDimensions::create());
 	}
 
-	GUISliderVert* GUISliderVert::create(const GUIOptions& layoutOptions, const String& styleName)
+	GUISliderVert* GUISliderVert::create(const GUIOptions& options, const String& styleName)
 	{
-		return new (bs_alloc<GUISliderVert, PoolAlloc>()) GUISliderVert(getStyleName<GUISliderVert>(styleName), GUIDimensions::create(layoutOptions));
+		return new (bs_alloc<GUISliderVert, PoolAlloc>()) GUISliderVert(getStyleName<GUISliderVert>(styleName), GUIDimensions::create(options));
 	}
 
 	const String& GUISliderVert::getGUITypeName()

+ 4 - 4
BansheeEngine/Source/BsGUISliderHandle.cpp

@@ -17,8 +17,8 @@ namespace BansheeEngine
 		return name;
 	}
 
-	GUISliderHandle::GUISliderHandle(bool horizontal, bool jumpOnClick, const String& styleName, const GUIDimensions& layoutOptions)
-		:GUIElement(styleName, layoutOptions), mHorizontal(horizontal), mHandleSize(0), mMouseOverHandle(false), mPctHandlePos(0.0f), mDragStartPos(0),
+	GUISliderHandle::GUISliderHandle(bool horizontal, bool jumpOnClick, const String& styleName, const GUIDimensions& dimensions)
+		:GUIElement(styleName, dimensions), mHorizontal(horizontal), mHandleSize(0), mMouseOverHandle(false), mPctHandlePos(0.0f), mDragStartPos(0),
 		mHandleDragged(false), mState(State::Normal), mJumpOnClick(jumpOnClick)
 	{
 		mImageSprite = bs_new<ImageSprite, PoolAlloc>();
@@ -35,10 +35,10 @@ namespace BansheeEngine
 			getStyleName<GUISliderHandle>(styleName), GUIDimensions::create());
 	}
 
-	GUISliderHandle* GUISliderHandle::create(bool horizontal, bool jumpOnClick, const GUIOptions& layoutOptions, const String& styleName)
+	GUISliderHandle* GUISliderHandle::create(bool horizontal, bool jumpOnClick, const GUIOptions& options, const String& styleName)
 	{
 		return new (bs_alloc<GUISliderHandle, PoolAlloc>()) GUISliderHandle(horizontal, jumpOnClick, 
-			getStyleName<GUISliderHandle>(styleName), GUIDimensions::create(layoutOptions));
+			getStyleName<GUISliderHandle>(styleName), GUIDimensions::create(options));
 	}
 
 	void GUISliderHandle::setHandleSize(UINT32 size)

部分文件因为文件数量过多而无法显示