Marko Pintera пре 10 година
родитељ
комит
ef747c6872

+ 0 - 3
BansheeEditor/BansheeEditor.vcxproj

@@ -264,9 +264,6 @@
       <ImportLibrary>..\lib\x64\$(Configuration)\$(TargetName).lib</ImportLibrary>
     </Link>
   </ItemDefinitionGroup>
-  <ItemGroup>
-    <Text Include="ReadMe.txt" />
-  </ItemGroup>
   <ItemGroup>
     <ClInclude Include="Include\BsBuildDataRTTI.h" />
     <ClInclude Include="Include\BsBuildManager.h" />

+ 6 - 9
BansheeEditor/BansheeEditor.vcxproj.filters

@@ -29,9 +29,6 @@
       <UniqueIdentifier>{482fa361-f45b-45d4-9d09-05ffb91c39b8}</UniqueIdentifier>
     </Filter>
   </ItemGroup>
-  <ItemGroup>
-    <Text Include="ReadMe.txt" />
-  </ItemGroup>
   <ItemGroup>
     <ClInclude Include="Include\BsEditorCommand.h">
       <Filter>Header Files\Commands</Filter>
@@ -231,15 +228,9 @@
     <ClInclude Include="Include\BsProjectLibraryEntries.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="Include\BsProjectLibraryEntriesRTTI.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="Include\BsProjectResourceMeta.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="Include\BsProjectResourceMetaRTTI.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="Include\BsResourceImporter.h">
       <Filter>Header Files</Filter>
     </ClInclude>
@@ -264,6 +255,12 @@
     <ClInclude Include="Include\BsUndoRedo.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="Include\BsProjectLibraryEntriesRTTI.h">
+      <Filter>Header Files\RTTI</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\BsProjectResourceMetaRTTI.h">
+      <Filter>Header Files\RTTI</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Source\BsEditorCommand.cpp">

+ 6 - 5
BansheeEditor/Include/BsGUIResourceTreeView.h

@@ -167,11 +167,6 @@ namespace BansheeEngine
 		 */	
 		virtual void dragAndDropEnded(TreeElement* overTreeElement) override;
 
-		/**
-		 * @copydoc	GUITreeView::dragAndDropFinalize
-		 */	
-		virtual void dragAndDropFinalize() override;
-
 		/**
 		 * @copydoc	GUITreeView::_acceptDragAndDrop
 		 */	
@@ -187,6 +182,12 @@ namespace BansheeEngine
 		 */	
 		void _changeParentWidget(GUIWidget* widget) override;
 
+		/**
+		 * @brief	Triggered when a drag and drop operation that was started by the tree view
+		 *			ends, regardless if it was processed or not.
+		 */
+		void dragAndDropFinalize();
+
 		/**
 		 * @brief	Updates the contents of the provided tree entry with a project library entry.
 		 */

+ 101 - 2
BansheeEditor/Include/BsGUISceneTreeView.h

@@ -7,6 +7,10 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Contains SceneObject%s currently involved
+	 *			in a drag and drop operation.
+	 */
 	struct BS_ED_EXPORT DraggedSceneObjects
 	{
 		DraggedSceneObjects(UINT32 numObjects);
@@ -16,8 +20,15 @@ namespace BansheeEngine
 		HSceneObject* objects;
 	};
 
+	/**
+	 * @brief	GUI element that displays all SceneObject%s in the current scene
+	 *			in the active project in a tree view.
+	 */
 	class BS_ED_EXPORT GUISceneTreeView : public GUITreeView
 	{
+		/**
+		 * @brief	Tree element with SceneObject%-specific data.
+		 */
 		struct SceneTreeElement : public GUITreeView::TreeElement
 		{
 			SceneTreeElement()
@@ -29,24 +40,60 @@ namespace BansheeEngine
 		};
 
 	public:
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
 
+		/**
+		 * @brief	Creates a new resource tree view element.
+		 *
+		 * @param	backgroundStyle				Name of the style for the tree view background.
+		 * @param	elementBtnStyle				Name of the style for a normal tree view element.
+		 * @param	foldoutBtnStyle				Name of the style for a foldout element (e.g. for a folder).
+		 * @param	selectionBackgroundStyle	Name of the style for the background of selected elements.
+		 * @param	editBoxStyle				Name of the style for element that is being renamed.
+		 * @param	dragHighlightStyle			Name of the style for the element being dragged over.
+		 * @param	dragSepHighlightStyle		Name of the style for the separator displayed while dragging
+		 *										an element between two other elements.
+		 */	
 		static GUISceneTreeView* create(
 			const String& backgroundStyle = StringUtil::BLANK, const String& elementBtnStyle = StringUtil::BLANK, 
 			const String& foldoutBtnStyle = StringUtil::BLANK, const String& selectionBackgroundStyle = StringUtil::BLANK,
 			const String& editBoxStyle = StringUtil::BLANK, const String& dragHighlightStyle = StringUtil::BLANK, 
 			const String& dragSepHighlightStyle = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource tree view element.
+		 *
+		 * @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	backgroundStyle				Name of the style for the tree view background.
+		 * @param	elementBtnStyle				Name of the style for a normal tree view element.
+		 * @param	foldoutBtnStyle				Name of the style for a foldout element (e.g. for a folder).
+		 * @param	selectionBackgroundStyle	Name of the style for the background of selected elements.
+		 * @param	editBoxStyle				Name of the style for element that is being renamed.
+		 * @param	dragHighlightStyle			Name of the style for the element being dragged over.
+		 * @param	dragSepHighlightStyle		Name of the style for the separator displayed while dragging
+		 *										an element between two other elements.
+		 */	
 		static GUISceneTreeView* create(const GUIOptions& options, 
 			const String& backgroundStyle = StringUtil::BLANK, const String& elementBtnStyle = StringUtil::BLANK, 
 			const String& foldoutBtnStyle = StringUtil::BLANK, const String& selectionBackgroundStyle = StringUtil::BLANK,
 			const String& editBoxStyle = StringUtil::BLANK, const String& dragHighlightStyle = StringUtil::BLANK, 
 			const String& dragSepHighlightStyle = StringUtil::BLANK);
 
+		/**
+		 * @brief	Returns a list of SceneObject&s currently selected (if any).
+		 */	
 		Vector<HSceneObject> getSelection() const;
+
+		/**
+		 * @brief	Changes the active selection to the provided SceneObject%s.
+		 */	
 		void setSelection(const Vector<HSceneObject>& objects);
 
-		Event<void()> onSelectionChanged;
+		Event<void()> onSelectionChanged; /**< Triggered whenever the selection changes. Call ::getSelection() to retrieve new selection: */
 		static const MessageId SELECTION_CHANGED_MSG;
 	protected:
 		virtual ~GUISceneTreeView();
@@ -58,20 +105,72 @@ namespace BansheeEngine
 			const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
 			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions);
 
+		/**
+		 * @brief	Checks it the SceneObject referenced by this tree element changed in any way and updates
+		 *			the tree element. This can involve recursing all children and updating them as well.
+		 */
 		void updateTreeElement(SceneTreeElement* element);
 
+		/**
+		 * @brief	Triggered when a drag and drop operation that was started by the tree view
+		 *			ends, regardless if it was processed or not.
+		 */
+		void dragAndDropFinalize();
+
+		/**
+		 * @copydoc	TreeView::getRootElement
+		 */
 		virtual TreeElement& getRootElement() override { return mRootElement; }
+
+		/**
+		 * @copydoc	TreeView::getRootElementConst
+		 */
 		virtual const TreeElement& getRootElementConst() const override { return mRootElement; }
+
+		/**
+		 * @copydoc	TreeView::updateTreeElementHierarchy
+		 */
 		virtual void updateTreeElementHierarchy() override;
+
+		/**
+		 * @copydoc	TreeView::renameTreeElement
+		 */
 		virtual void renameTreeElement(TreeElement* element, const WString& name) override;
+
+		/**
+		 * @copydoc	TreeView::deleteTreeElement
+		 */
 		virtual void deleteTreeElement(TreeElement* element) override;
+
+		/**
+		 * @copydoc	TreeView::acceptDragAndDrop
+		 */
 		virtual bool acceptDragAndDrop() const override;
+
+		/**
+		 * @copydoc	TreeView::dragAndDropStart
+		 */
 		virtual void dragAndDropStart() override;
+
+		/**
+		 * @copydoc	TreeView::dragAndDropEnded
+		 */
 		virtual void dragAndDropEnded(TreeElement* overTreeElement) override;
-		virtual void dragAndDropFinalize() override;
+
+		/**
+		 * @copydoc	TreeView::_acceptDragAndDrop
+		 */
 		virtual bool _acceptDragAndDrop(const Vector2I position, UINT32 typeId) const override;
+
+		/**
+		 * @copydoc	TreeView::selectionChanged
+		 */
 		virtual void selectionChanged() override;
 
+		/**
+		 * @brief	Deletes the internal TreeElement representation without
+		 *			actually deleting the referenced SceneObject.
+		 */
 		void deleteTreeElementInternal(TreeElement* element);
 	};
 

+ 80 - 5
BansheeEditor/Include/BsGUITabButton.h

@@ -8,37 +8,112 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Specialization of a GUIToggle element used for displaying
+	 *			tabs in a GUITabbedTitleBar. Aside from being toggleable these
+	 *			buttons also track drag and drop operations.
+	 */
 	class GUITabButton : public GUIToggle
 	{
 	public:
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
 
+		/**
+		 * @brief	Creates a new GUI tab button element.
+		 *
+		 * @param	toggleGroup		A toggle group that forms a link between related tab buttons.
+		 * @param	index			Unique index that can be used for identifying a tab.
+		 * @param	text			Label to display in 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 style is used.
+		 */
 		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const HString& text, 
 			const String& styleName = StringUtil::BLANK);
+
+		/**
+		 * @brief	Creates a new GUI tab button element.
+		 *
+		 * @param	toggleGroup		A toggle group that forms a link between related tab buttons.
+		 * @param	index			Unique index that can be used for identifying a tab.
+		 * @param	text			Label to display in the button.
+		 * @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 GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const HString& text, 
 			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 	
+		/**
+		 * @brief	Creates a new GUI tab button element.
+		 *
+		 * @param	toggleGroup		A toggle group that forms a link between related tab buttons.
+		 * @param	index			Unique index that can be used for identifying a tab.
+		 * @param	content			Content to display in 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 style is used.
+		 */
 		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, 
 			const String& styleName = StringUtil::BLANK);
+
+		/**
+		 * @brief	Creates a new GUI tab button element.
+		 *
+		 * @param	toggleGroup		A toggle group that forms a link between related tab buttons.
+		 * @param	index			Unique index that can be used for identifying a tab.
+		 * @param	content			Content to display in the button.
+		 * @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 GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, 
 			const GUIOptions& options, const String& styleName = StringUtil::BLANK);
 
+		/**
+		 * @brief	Returns the unique index for this tab button.
+		 */
 		UINT32 getIndex() const { return mIndex; }
+
+		/**
+		 * @brief	Changes the button state to dragged or not dragged, resulting primarily
+		 *			in a visual change.
+		 *
+		 * @note	Internal method.
+		 */
 		void _setDraggedState(bool active);
 
-		Event<void(UINT32, const Vector2I&)> onDragged;
+		/**
+		 * @brief	Triggered when the user starts dragging the tab button. Reported parameters
+		 *			are the unique index of the tab and pointer position relative to parent GUIWidget.
+		 */
+		Event<void(UINT32, const Vector2I&)> onDragged; 
+
+		/**
+		 * @brief	Triggered when the user ends dragging the tab button. Reported parameters
+		 *			are the unique index of the tab and pointer position relative to parent GUIWidget.
+		 */
 		Event<void(UINT32, const Vector2I&)> onDragEnd;
 	protected:
-		virtual bool _mouseEvent(const GUIMouseEvent& ev);
+		GUITabButton(const String& styleName, const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, const GUIDimensions& dimensions);
+
+		/**
+		 * @copydoc GUIElement::_mouseEvent
+		 */
+		virtual bool _mouseEvent(const GUIMouseEvent& ev) override;
 
-	private:
 		UINT32 mIndex;
 		Vector2I mDragStartPosition;
 		bool mDraggedState;
 		GUIButtonState mInactiveState;
 
 		static const UINT32 DRAG_MIN_DISTANCE;
-
-		GUITabButton(const String& styleName, const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, const GUIDimensions& dimensions);
 	};
 }

+ 151 - 16
BansheeEditor/Include/BsGUITabbedTitleBar.h

@@ -7,44 +7,120 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Tabbed title bar to be used in editor windows. Displays tabs that can
+	 *			be activated, reordered by dragging, or dragged off and on to/on other title bars.
+	 */
 	class GUITabbedTitleBar : public GUIElementContainer
 	{
 	public:
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
 
+		/**
+		 * @brief	Creates a new GUI foldout element.
+		 *
+		 * @param	backgroundStyle		GUI style to display the background in. Keep as blank for default.
+		 * @param	backgroundStyle		GUI style to display the tab buttons in. Keep as blank for default.
+		 * @param	maxBtnStyle			GUI style to display the maximize button in. Keep as blank for default.
+		 * @param	closeBtnStyle		GUI style to display the close button in. Keep as blank for default.
+		 */
 		static GUITabbedTitleBar* create(const String& backgroundStyle = StringUtil::BLANK, const String& tabBtnStyle = StringUtil::BLANK, 
-			const String& minBtnStyle = StringUtil::BLANK, const String& closeBtnStyle = StringUtil::BLANK);
+			const String& maxBtnStyle = StringUtil::BLANK, const String& closeBtnStyle = StringUtil::BLANK);
 
-		static GUITabbedTitleBar* create(const GUIDimensions& dimensions,
+		/**
+		 * @brief	Creates a new GUI foldout element.
+		 *
+		 *
+		 * @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	backgroundStyle		GUI style to display the background in. Keep as blank for default.
+		 * @param	backgroundStyle		GUI style to display the tab buttons in. Keep as blank for default.
+		 * @param	maxBtnStyle			GUI style to display the maximize button in. Keep as blank for default.
+		 * @param	closeBtnStyle		GUI style to display the close button in. Keep as blank for default.
+		 */
+		static GUITabbedTitleBar* create(const GUIOptions& options,
 			const String& backgroundStyle = StringUtil::BLANK, const String& tabBtnStyle = StringUtil::BLANK, 
-			const String& minBtnStyle = StringUtil::BLANK, const String& closeBtnStyle = StringUtil::BLANK);
+			const String& maxBtnStyle = StringUtil::BLANK, const String& closeBtnStyle = StringUtil::BLANK);
 
-		void addTab(const HString& name);
+		/**
+		 * @brief	Adds a new tab to the end of the tab list.
+		 *
+		 * @param	name	Title to display on the tab button.
+		 *
+		 * @returns	A unique index (not sequential) that you may use for later identifying the tab.
+		 */
+		UINT32 addTab(const HString& name);
+
+		/**
+		 * @brief	Inserts a new tab button at the specified position.
+		 *
+		 * @param	position	Sequential index to insert the tab button in. This will be clamped
+		 *						to a valid range.
+		 * @param	name		Title to display on the tab button.
+		 *
+		 * @returns	A unique index (not sequential) that you may use for later identifying the tab.
+		 */
 		UINT32 insertTab(UINT32 position, const HString& name);
+
+		/**
+		 * @brief	Removes the tab button with the specified unique index.
+		 */
 		void removeTab(UINT32 uniqueIdx);
+
+		/**
+		 * @brief	Activates the tab button with the specified unique index.
+		 */
 		void setActive(UINT32 uniqueIdx);
+
+		/**
+		 * @brief	Finds the unique tab index from the provided sequential tab position.
+		 */
 		UINT32 getTabIdx(UINT32 position) const;
+
+		/**
+		 * @brief	Returns the total number of display tab buttons.
+		 */
 		UINT32 getNumTabs() const { return (UINT32)mTabButtons.size(); }
+
+		/**
+		 * @brief	Changes the displayed title for a tab with the specified index.
+		 */
 		void updateTabName(UINT32 uniqueIdx, const HString& name);
 
+		/**
+		 * @brief	Calculates areas between the tab buttons and other GUI elements on the title bar.
+		 *			These areas are normally used for setting up valid areas the user can click on and drag
+		 *			the window the title bar belongs to.
+		 */
 		Vector<Rect2I> calcDraggableAreas(INT32 x, INT32 y, UINT32 width, UINT32 height) const;
 
-		Event<void(UINT32)> onTabActivated;
-		Event<void(UINT32)> onTabClosed;
-		Event<void(UINT32)> onTabDraggedOff;
-		Event<void(UINT32)> onTabDraggedOn;
+		/**
+		 * @brief	Triggered when the active tab changes. Provided parameter is the
+		 *			unique index of the activated tab.
+		 */
+		Event<void(UINT32)> onTabActivated; 
 
-	protected:
-		virtual ~GUITabbedTitleBar();
+		/**
+		 * @brief	Triggered when a tab is closed. Provided parameter is the
+		 *			unique index of the closed tab.
+		 */
+		Event<void(UINT32)> onTabClosed;
 
-		void updateClippedBounds();
+		/**
+		 * @brief	Triggered when a tab gets dragged off the title bar. Provided 
+		 *			parameter is the unique index of the activated tab.
+		 */
+		Event<void(UINT32)> onTabDraggedOff;
 
 		/**
-		 * @copydoc GUIElementContainer::_getOptimalSize
+		 * @brief	Triggered when a new tab gets dragged on the title bar. Provided 
+		 *			parameter is the sequential index of the activated tab.
 		 */
-		Vector2I _getOptimalSize() const override;
+		Event<void(UINT32)> onTabDraggedOn;
 
-		void _updateLayoutInternal(const GUILayoutData& data);
 	protected:
 		static const UINT32 TAB_SPACING;
 		static const UINT32 OPTION_BTN_SPACING;
@@ -68,22 +144,81 @@ namespace BansheeEngine
 
 		String mBackgroundStyle;
 		String mCloseBtnStyle;
-		String mMinimizeBtnStyle;
+		String mMaximizeBtnStyle;
 		String mTabBtnStyle;
 
 		GUITabbedTitleBar(const String& backgroundStyle, const String& tabBtnStyle, 
 			const String& minBtnStyle, const String& closeBtnStyle, const GUIDimensions& dimensions);
 
-		virtual bool _mouseEvent(const GUIMouseEvent& ev);
+		virtual ~GUITabbedTitleBar();
+
+		/**
+		 * @copydoc GUIElementContainer::updateClippedBounds
+		 */
+		void updateClippedBounds() override;
+
+		/**
+		 * @copydoc GUIElementContainer::_getOptimalSize
+		 */
+		Vector2I _getOptimalSize() const override;
+
+		/**
+		 * @copydoc GUIElementContainer::_updateLayoutInternal
+		 */
+		void _updateLayoutInternal(const GUILayoutData& data) override;
+
+		/**
+		 * @copydoc GUIElementContainer::_mouseEvent
+		 */
+		virtual bool _mouseEvent(const GUIMouseEvent& ev) override;
 
+		/**
+		 * @brief	Starts the internal drag and drop operation.
+		 *
+		 * @param	seqIdx			Sequential index of the dragged tab.
+		 * @param	startDragPos	Pointer position of where the drag originated, relative
+		 *							to parent widget.
+		 */
 		void startDrag(UINT32 seqIdx, const Vector2I& startDragPos);
+
+		/**
+		 * @brief	Ends the internal drag and drop operation started with ::startDrag.
+		 */
 		void endDrag();
 
+		/**
+		 * @brief	Triggered when a tab button is toggled on or off.
+		 *
+		 * @param	tabIdx		Unique index of the tab.
+		 * @param	toggledOn	Whether the tab was activated or deactivated.
+		 */
 		void tabToggled(UINT32 tabIdx, bool toggledOn);
+
+		/**
+		 * @brief	Triggered when the close button is pressed.
+		 */
 		void tabClosed();
+
+		/**
+		 * @brief	Triggered every frame while a tab button is being dragged.
+		 *
+		 * @param	tabIdx	Unique index of the dragged tab.
+		 * @param	dragPos	Position of the pointer, relative to parent widget.
+		 */
 		void tabDragged(UINT32 tabIdx, const Vector2I& dragPos);
+
+		/**
+		 * @brief	Triggered when a drag operation on a tab button ends.
+		 *
+		 * @param	tabIdx	Unique index of the dragged tab.
+		 * @param	dragPos	Position of the pointer, relative to parent widget.
+		 */
 		void tabDragEnd(UINT32 tabIdx, const Vector2I& dragPos);
 
+		/**
+		 * @brief	Converts unique tab index to a sequential index corresponding to the
+		 *			tab's position in the title bar.
+		 */
 		INT32 uniqueIdxToSeqIdx(UINT32 uniqueIdx) const;
 	};
 }

+ 159 - 11
BansheeEditor/Include/BsGUITextField.h

@@ -5,70 +5,218 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	A composite GUI object representing an editor field. Editor fields are a combination
+	 *			of a label and an input field. Label is optional. This specific implementation
+	 *			displays a text input field.
+	 */
 	class BS_ED_EXPORT GUITextField : public GUIElementContainer
 	{
 		struct PrivatelyConstruct {};
 
 	public:
-		static const String& getLabelStyleType();
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
+
+		/**
+		 * Returns style type name of the internal GUILabel element.
+		 */
+		static const String& getLabelStyleType();
+
+		/**
+		 * Returns style type name of the internal GUIInputBox element.
+		 */
 		static const String& getInputStyleType();
 
+		/**
+		 * @brief	Creates a new GUI text editor field with a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @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 GUITextField* create(bool multiline, const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field with a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @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 GUITextField* create(bool multiline, const GUIContent& labelContent, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field with a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @param	labelText		String to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @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 GUITextField* create(bool multiline, const HString& labelText, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field with a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @param	labelText		String to display in the editor field label.
+		 * @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 GUITextField* create(bool multiline, const HString& labelText, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field without a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @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 GUITextField* create(bool multiline, const GUIOptions& options, const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field with a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @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 GUITextField* create(bool multiline, const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field with a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @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 GUITextField* create(bool multiline, const GUIContent& labelContent,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field with a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @param	labelText		String to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @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 GUITextField* create(bool multiline, const HString& labelText, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field with a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @param	labelText		String to display in the editor field label.
+		 * @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 GUITextField* create(bool multiline, const HString& labelText,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new GUI text editor field without a label.
+		 *
+		 * @param	multiline		Should the input box accept multiple lines of input.
+		 * @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 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& dimensions, bool withLabel);
 
-		void _updateLayoutInternal(const GUILayoutData& data);
-
-		Vector2I _getOptimalSize() const;
-
+		/**
+		 * @brief	Returns the value currently input in the text field.
+		 */
 		WString getValue() const { return mValue; }
-		void setValue(const WString& value);
 
-		bool hasInputFocus() const { return mHasInputFocus; }
+		/**
+		 * @brief	Sets a new value in the text field.
+		 */
+		void setValue(const WString& value);
 
 		/**
-		 * @copydoc	GUIElement::setTint
+		 * @brief	Checks whether the element currently has keyboard focus.
 		 */
-		virtual void setTint(const Color& color);
+		bool hasInputFocus() const { return mHasInputFocus; }
 
-		Event<void(const WString&)> onValueChanged;
+		Event<void(const WString&)> onValueChanged; /** Triggered when the value in the field changes. */
 	protected:
 		static const UINT32 DEFAULT_LABEL_WIDTH;
 
 		virtual ~GUITextField();
 
-		void styleUpdated();
+		/**
+		 * @copydoc	GUIElement::styleUpdated
+		 */
+		void styleUpdated() override;
+
+		/**
+		 * @copydoc	GUIElement::setTint
+		 */
+		virtual void setTint(const Color& color) override;
+
+		/**
+		 * @copydoc	GUIElement::_updateLayoutInternal
+		 */
+		void _updateLayoutInternal(const GUILayoutData& data) override;
+
+		/**
+		 * @copydoc	GUIElement::_getOptimalSize
+		 */
+		Vector2I _getOptimalSize() const override;
 
+		/**
+		 * @brief	Triggered when the value in the internal input box changes.
+		 */
 		void valueChanged(const WString& newValue);
+
+		/**
+		 * @brief	Triggered when the internal input box gains focus.
+		 */
 		void focusGained();
+
+		/**
+		 * @brief	Triggered when the internal input box loses focus.
+		 */
 		void focusLost();
 
 		GUIInputBox* mInputBox;

+ 29 - 3
BansheeEditor/Include/BsGUIToggleField.h

@@ -5,28 +5,54 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	A composite GUI object representing an editor field. Editor fields are a combination
+	 *			of a label and an input field. Label is optional. This specific implementation
+	 *			displays a toggle button.
+	 */
 	class BS_ED_EXPORT GUIToggleField : public TGUIField<GUIToggleField>
 	{
 	public:
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
+
+		/**
+		 * Returns style type name of the internal GUIToggle element.
+		 */
 		static const String& getToggleStyleType();
 
 		GUIToggleField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style, const GUIDimensions& dimensions, bool withLabel);
 
+		/**
+		 * @brief	Returns the current value of the toggle.
+		 */
 		bool getValue() const { return mValue; }
+
+		/**
+		 * @brief	Activates/deactivates the toggle.
+		 */
 		void setValue(bool value);
 
 		/**
 		 * @copydoc	GUIElement::setTint
 		 */
-		virtual void setTint(const Color& color);
+		virtual void setTint(const Color& color) override;
 
-		Event<void(bool)> onValueChanged;
+		Event<void(bool)> onValueChanged; /** Triggered when the value of the toggle changes. */
 	protected:
 		virtual ~GUIToggleField() { }
 
-		void styleUpdated();
+		/**
+		 * @copydoc	GUIElement::styleUpdated
+		 */
+		void styleUpdated() override;
+
+		/**
+		 * @brief	Triggered when the value of the internal toggle button changes.
+		 */
 		void valueChanged(bool newValue);
 
 		GUIToggle* mToggle;

+ 237 - 56
BansheeEditor/Include/BsGUITreeView.h

@@ -7,9 +7,22 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	GUI element that displays some contents in a tree-view where elements
+	 *			are placed vertically above/beneath each other, and different elements
+	 *			may be nested within other elements.
+	 *
+	 *			Elements may be selected, renamed, dragged and re-parented.
+	 *
+	 *			This class is abstract and meant to be extended by an implementation 
+	 *			specific to some content type (e.g. scene object hierarchy). 
+	 */
 	class BS_ED_EXPORT GUITreeView : public GUIElementContainer
 	{
 	protected:
+		/**
+		 * @brief	Types of possible states when the tree view is auto-scrolling.
+		 */
 		enum class ScrollState
 		{
 			None,
@@ -19,6 +32,11 @@ namespace BansheeEngine
 			TransitioningDown
 		};
 
+		/**
+		 * @brief	Contains data about a single piece of content
+		 *			and all its children. This element may be visible and represented
+		 *			by a GUI element, but might not (e.g. its parent is collapsed).
+		 */
 		struct TreeElement
 		{
 			TreeElement();
@@ -40,6 +58,11 @@ namespace BansheeEngine
 			bool isParentRec(TreeElement* element) const;
 		};
 
+		/**
+		 * @brief	Contains data about all visible elements in the tree view.
+		 *			This might be a TreeElement entry, or a separator (empty space)
+		 *			between two TreeElement%s.
+		 */
 		struct InteractableElement
 		{
 			InteractableElement(TreeElement* parent, UINT32 index, const Rect2I& bounds)
@@ -54,6 +77,9 @@ namespace BansheeEngine
 			Rect2I bounds;
 		};
 
+		/**
+		 * @brief	Contains data about one of the currently selected tree elements.
+		 */
 		struct SelectedElement
 		{
 			SelectedElement(TreeElement* elem, GUITexture* back)
@@ -65,107 +91,262 @@ namespace BansheeEngine
 		};
 
 	public:
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
 
-		void update();
+		/**
+		 * @brief	Updates tree view if dirty, among other operations.
+		 *			Must be called every frame. 
+		 *
+		 * @note	Internal method.
+		 */
+		void _update();
 
 	protected:
-		virtual ~GUITreeView();
-
-		Vector2I _getOptimalSize() const;
-		void updateClippedBounds();
-
-		virtual void _updateLayoutInternal(const GUILayoutData& data);
-	protected:
-		static const UINT32 ELEMENT_EXTRA_SPACING;
-		static const UINT32 INDENT_SIZE;
-		static const UINT32 INITIAL_INDENT_OFFSET;
-		static const UINT32 DRAG_MIN_DISTANCE;
-		static const float AUTO_EXPAND_DELAY_SEC;
-		static const float SCROLL_AREA_HEIGHT_PCT;
-		static const UINT32 SCROLL_SPEED_PX_PER_SEC;
-
-		String mBackgroundStyle;
-		String mElementBtnStyle;
-		String mFoldoutBtnStyle;
-		String mSelectionBackgroundStyle;
-		String mEditBoxStyle;
-		String mDragHighlightStyle;
-		String mDragSepHighlightStyle;
-
-		GUITexture* mBackgroundImage;
-
-		Vector<InteractableElement> mVisibleElements;
-
-		bool mIsElementSelected;
-		Vector<SelectedElement> mSelectedElements;
-
-		TreeElement* mEditElement;
-		GUITreeViewEditBox* mNameEditBox;
-
-		Vector2I mDragStartPosition;
-		Vector2I mDragPosition;
-		bool mDragInProgress;
-		GUITexture* mDragHighlight;
-		GUITexture* mDragSepHighlight;
-
-		Rect2I mTopScrollBounds;
-		Rect2I mBottomScrollBounds;
-		ScrollState mScrollState;
-		float mLastScrollTime;
-
-		Stack<TreeElement*> mAutoExpandedElements;
-		TreeElement* mMouseOverDragElement;
-		float mMouseOverDragElementTime;
-
-		static VirtualButton mRenameVB;
-		static VirtualButton mDeleteVB;
-
 		GUITreeView(const String& backgroundStyle, const String& elementBtnStyle, 
 			const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
 			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUIDimensions& dimensions);
 
+		virtual ~GUITreeView();
+
+		/**
+		 * @copydoc	GUIElement::_getOptimalSize
+		 */
+		Vector2I _getOptimalSize() const override;
+
+		/**
+		 * @copydoc	GUIElement::updateClippedBounds
+		 */
+		void updateClippedBounds() override;
+
+		/**
+		 * @copydoc	GUIElement::_updateLayoutInternal
+		 */
+		virtual void _updateLayoutInternal(const GUILayoutData& data) override;
+
+		/**
+		 * @copydoc	GUIElement::_mouseEvent
+		 */
+		virtual bool _mouseEvent(const GUIMouseEvent& ev) override;
+
+		/**
+		 * @copydoc	GUIElement::_commandEvent
+		 */
+		virtual bool _commandEvent(const GUICommandEvent& ev) override;
+
+		/**
+		 * @copydoc	GUIElement::_virtualButtonEvent
+		 */
+		virtual bool _virtualButtonEvent(const GUIVirtualButtonEvent& ev) override;
+
+		/**
+		 * @brief	Attempts to find an interactable element under the specified coordinates.
+		 *			Returns null if one cannot be found.
+		 *
+		 * @param	coord	Coordinates relative to parent GUI widget.
+		 */
 		const GUITreeView::InteractableElement* findElementUnderCoord(const Vector2I& coord) const;
+
+		/**
+		 * @brief	Returns the top-most selected tree element if selection is active,
+		 *			null otherwise.
+		 */
 		TreeElement* getTopMostSelectedElement() const;
+
+		/**
+		 * @brief	Returns the bottom-most selected tree element if selection is active,
+		 *			null otherwise.
+		 */
 		TreeElement* getBottomMostSelectedElement() const;
 
+		/**
+		 * @brief	Starts rename operation on the specified tree element, spawning an input box.
+		 */
 		void enableEdit(TreeElement* element);
+
+		/**
+		 * @brief	Ends rename operation if one is currently active.
+		 *
+		 * @param	acceptChanges	Should the new name be accepted or discarded.
+		 */
 		void disableEdit(bool acceptChanges);
 
-		virtual bool _mouseEvent(const GUIMouseEvent& ev);
-		virtual bool _commandEvent(const GUICommandEvent& ev);
-		virtual bool _virtualButtonEvent(const GUIVirtualButtonEvent& ev);
+		/**
+		 * @brief	Triggered when the Foldout button for a tree element was been toggled.
+		 *			(i.e. something was expanded or collapsed).
+		 */
 		void elementToggled(TreeElement* element, bool toggled);
 
+		/**
+		 * @brief	Returns the top level TreeElement.
+		 */
 		virtual TreeElement& getRootElement() = 0;
+
+		/**
+		 * @brief	Returns the top level TreeElement that cannot be modified.
+		 */
 		virtual const TreeElement& getRootElementConst() const = 0;
+
+		/**
+		 * @brief	Checks if the hierarchy needs any updates and performs those
+		 *			updates if needed.
+		 */
 		virtual void updateTreeElementHierarchy() = 0;
+
+		/**
+		 * @brief	Changes the name of the content associated with the provided tree element.
+		 */
 		virtual void renameTreeElement(TreeElement* element, const WString& name) = 0;
+
+		/**
+		 * @brief	Deletes the content associated with the provided tree element.
+		 */
 		virtual void deleteTreeElement(TreeElement* element) = 0;
+
+		/**
+		 * @brief	Checks whether the tree view can accept the currently active drag and drop
+		 *			operation.
+		 */
 		virtual bool acceptDragAndDrop() const = 0;
+
+		/**
+		 * @brief	Triggered when the user drags a tree element and starts a drag and drop operation.
+		 */
 		virtual void dragAndDropStart() = 0;
+
+		/**
+		 * @brief	Triggered when the user ends a drag and drop operation over the tree view.
+		 *
+		 * @param	overTreeElement	TreeElement the drag operation ended over, if any.
+		 */
 		virtual void dragAndDropEnded(TreeElement* overTreeElement) = 0;
-		virtual void dragAndDropFinalize() = 0;
+
+		/**
+		 * @brief	Triggered whenever a TreeElement gets selected or deselected.
+		 */
 		virtual void selectionChanged() { }
 
+		/**
+		 * @brief	Are any tree elements currently selected.
+		 */
 		bool isSelectionActive() const;
+
+		/**
+		 * @brief	Expands the selection to the provided TreeElement. Doesn't clear
+		 *			previous selection.
+		 */
 		void selectElement(TreeElement* element);
+
+		/**
+		 * @brief	Unselects the provided TreeElement.
+		 */
 		void unselectElement(TreeElement* element);
+
+		/**
+		 * @brief	Unselects all selected TreeElement%s.
+		 */
 		void unselectAll();
 
+		/**
+		 * @brief	Expands all parents of the provided TreeElement making it interactable.
+		 */
 		void expandToElement(TreeElement* element);
+
+		/**
+		 * @brief	Expands the provided TreeElement making its children interactable.
+		 */
 		void expandElement(TreeElement* element);
+
+		/**
+		 * @brief	Collapses the provided TreeElement making its children hidden and not interactable.
+		 */
 		void collapseElement(TreeElement* element);
 
+		/**
+		 * @brief	Rebuilds the needed GUI elements for the provided TreeElement.
+		 */
 		void updateElementGUI(TreeElement* element);
 
+		/**
+		 * @brief	Close any elements that were temporarily expanded due to a drag operation
+		 *			hovering over them.
+		 */
 		void closeTemporarilyExpandedElements();
+
+		/**
+		 * @brief	Temporarily expand the provided element. Temporarily expanded elements can be
+		 *			closed by calling ::closeTemporarilyExpandedElements.
+		 */
 		void temporarilyExpandElement(const GUITreeView::InteractableElement* mouseOverElement);
+
+		/**
+		 * @brief	Scrolls the parent GUIScrollArea (if any) so that the specified TreeElement is visible.
+		 *
+		 * @param	element	Element to scroll to.
+		 * @param	center	If true the element will be centered in the scroll view,
+		 *					otherwise it will be at the top. 
+		 */
 		void scrollToElement(TreeElement* element, bool center);
 
+		/**
+		 * @brief	Attempts to find the parent GUIScrollArea that the tree view is a child of.
+		 */
 		GUIScrollArea* findParentScrollArea() const;
 
+		/**
+		 * @brief	Triggered when the user accepts the changes during a rename operation.
+		 */
 		void onEditAccepted();
+
+		/**
+		 * @brief	Triggered when the user rejects the changes during a rename operation.
+		 */
 		void onEditCanceled();
+
+		String mBackgroundStyle;
+		String mElementBtnStyle;
+		String mFoldoutBtnStyle;
+		String mSelectionBackgroundStyle;
+		String mEditBoxStyle;
+		String mDragHighlightStyle;
+		String mDragSepHighlightStyle;
+
+		GUITexture* mBackgroundImage;
+
+		Vector<InteractableElement> mVisibleElements;
+
+		bool mIsElementSelected;
+		Vector<SelectedElement> mSelectedElements;
+
+		TreeElement* mEditElement;
+		GUITreeViewEditBox* mNameEditBox;
+
+		Vector2I mDragStartPosition;
+		Vector2I mDragPosition;
+		bool mDragInProgress;
+		GUITexture* mDragHighlight;
+		GUITexture* mDragSepHighlight;
+
+		Rect2I mTopScrollBounds;
+		Rect2I mBottomScrollBounds;
+		ScrollState mScrollState;
+		float mLastScrollTime;
+
+		Stack<TreeElement*> mAutoExpandedElements;
+		TreeElement* mMouseOverDragElement;
+		float mMouseOverDragElementTime;
+
+		static VirtualButton mRenameVB;
+		static VirtualButton mDeleteVB;
+
+		static const UINT32 ELEMENT_EXTRA_SPACING;
+		static const UINT32 INDENT_SIZE;
+		static const UINT32 INITIAL_INDENT_OFFSET;
+		static const UINT32 DRAG_MIN_DISTANCE;
+		static const float AUTO_EXPAND_DELAY_SEC;
+		static const float SCROLL_AREA_HEIGHT_PCT;
+		static const UINT32 SCROLL_SPEED_PX_PER_SEC;
 	};
 }

+ 0 - 40
BansheeEditor/ReadMe.txt

@@ -1,40 +0,0 @@
-========================================================================
-    CONSOLE APPLICATION : CamelotClient Project Overview
-========================================================================
-
-AppWizard has created this CamelotClient application for you.
-
-This file contains a summary of what you will find in each of the files that
-make up your CamelotClient application.
-
-
-CamelotClient.vcxproj
-    This is the main project file for VC++ projects generated using an Application Wizard.
-    It contains information about the version of Visual C++ that generated the file, and
-    information about the platforms, configurations, and project features selected with the
-    Application Wizard.
-
-CamelotClient.vcxproj.filters
-    This is the filters file for VC++ projects generated using an Application Wizard. 
-    It contains information about the association between the files in your project 
-    and the filters. This association is used in the IDE to show grouping of files with
-    similar extensions under a specific node (for e.g. ".cpp" files are associated with the
-    "Source Files" filter).
-
-CamelotClient.cpp
-    This is the main application source file.
-
-/////////////////////////////////////////////////////////////////////////////
-Other standard files:
-
-StdAfx.h, StdAfx.cpp
-    These files are used to build a precompiled header (PCH) file
-    named CamelotClient.pch and a precompiled types file named StdAfx.obj.
-
-/////////////////////////////////////////////////////////////////////////////
-Other notes:
-
-AppWizard uses "TODO:" comments to indicate parts of the source code you
-should add to or customize.
-
-/////////////////////////////////////////////////////////////////////////////

+ 12 - 12
BansheeEditor/Source/BsGUITabbedTitleBar.cpp

@@ -22,18 +22,18 @@ 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& dimensions)
+		const String& maxBtnStyle, 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),
+		mTabBtnStyle(tabBtnStyle), mMaximizeBtnStyle(maxBtnStyle), mCloseBtnStyle(closeBtnStyle), mTempDraggedWidget(nullptr),
 		mTempDraggedTabIdx(0)
 	{
 		if(mBackgroundStyle == StringUtil::BLANK)
 			mBackgroundStyle = "TitleBarBackground";
 
-		if(mMinimizeBtnStyle == StringUtil::BLANK)
-			mMinimizeBtnStyle = "WinMinimizeBtn";
+		if(mMaximizeBtnStyle == StringUtil::BLANK)
+			mMaximizeBtnStyle = "WinMinimizeBtn";
 
 		if(mCloseBtnStyle == StringUtil::BLANK)
 			mCloseBtnStyle = "WinCloseBtn";
@@ -41,7 +41,7 @@ namespace BansheeEngine
 		if(mTabBtnStyle == StringUtil::BLANK)
 			mTabBtnStyle = "TabbedBarBtn";
 
-		mMinBtn = GUIButton::create(HString(L""), mMinimizeBtnStyle);
+		mMinBtn = GUIButton::create(HString(L""), mMaximizeBtnStyle);
 		mMinBtn->_setElementDepth(1);
 		_registerChildElement(mMinBtn);
 
@@ -64,22 +64,22 @@ namespace BansheeEngine
 	}
 
 	GUITabbedTitleBar* GUITabbedTitleBar::create(const String& backgroundStyle, const String& tabBtnStyle, 
-		const String& minBtnStyle, const String& closeBtnStyle)
+		const String& maxBtnStyle, const String& closeBtnStyle)
 	{
 		return new (bs_alloc<GUITabbedTitleBar, PoolAlloc>()) GUITabbedTitleBar(backgroundStyle, tabBtnStyle, 
-			minBtnStyle, closeBtnStyle, GUIDimensions::create());
+			maxBtnStyle, closeBtnStyle, GUIDimensions::create());
 	}
 
-	GUITabbedTitleBar* GUITabbedTitleBar::create(const GUIDimensions& dimensions, const String& backgroundStyle,
-		const String& tabBtnStyle, const String& minBtnStyle, const String& closeBtnStyle)
+	GUITabbedTitleBar* GUITabbedTitleBar::create(const GUIOptions& options, const String& backgroundStyle,
+		const String& tabBtnStyle, const String& maxBtnStyle, const String& closeBtnStyle)
 	{
 		return new (bs_alloc<GUITabbedTitleBar, PoolAlloc>()) GUITabbedTitleBar(backgroundStyle, tabBtnStyle, 
-			minBtnStyle, closeBtnStyle, dimensions);
+			maxBtnStyle, closeBtnStyle, GUIDimensions::create(options));
 	}
 
-	void GUITabbedTitleBar::addTab(const HString& name)
+	UINT32 GUITabbedTitleBar::addTab(const HString& name)
 	{
-		insertTab((UINT32)mTabButtons.size(), name);
+		return insertTab((UINT32)mTabButtons.size(), name);
 	}
 
 	UINT32 GUITabbedTitleBar::insertTab(UINT32 position, const HString& name)

+ 1 - 1
BansheeEditor/Source/BsGUITreeView.cpp

@@ -136,7 +136,7 @@ namespace BansheeEngine
 
 	}
 
-	void GUITreeView::update()
+	void GUITreeView::_update()
 	{
 		// Attempt to auto-expand elements we are dragging over
 		if(acceptDragAndDrop())

+ 1 - 1
SBansheeEditor/Source/BsScriptGUISceneTreeView.cpp

@@ -42,6 +42,6 @@ namespace BansheeEngine
 			return;
 
 		GUISceneTreeView* treeView = static_cast<GUISceneTreeView*>(thisPtr->getGUIElement());
-		treeView->update();
+		treeView->_update();
 	}
 }