Răsfoiți Sursa

Documentation

Marko Pintera 10 ani în urmă
părinte
comite
ce8b50083e

+ 24 - 0
SBansheeEditor/Include/BsEditorScriptManager.h

@@ -5,18 +5,42 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Handles all editor script modules, updates editor windows and similar.
+	 */
 	class BS_SCR_BED_EXPORT EditorScriptManager : public Module<EditorScriptManager>
 	{
 	public:
 		EditorScriptManager();
 		~EditorScriptManager();
 
+		/**
+		 * @brief	Called every frame. Updates editor windows and script modules.
+		 *
+		 * @note	Internal method.
+		 */
 		void update();
 
 	private:
+		/**
+		 * @brief	Triggers Program::OnInitialize callback. Should be called
+		 *			after startup and after assembly reload.
+		 */
 		void triggerOnInitialize();
+
+		/**
+		 * @brief	Triggered when an assembly refreshed finished.
+		 */
 		void onAssemblyRefreshDone();
+
+		/**
+		 * @brief	Loads all managed types and methods used by this module.
+		 */
 		void loadMonoTypes();
+
+		/**
+		 * @brief	Triggers assembly refresh on next ::update.
+		 */
 		static void debug_refreshAssembly();
 
 		static const float EDITOR_UPDATE_RATE;

+ 153 - 4
SBansheeEditor/Include/BsGUIGameObjectField.h

@@ -5,64 +5,213 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	GUI object that displays a field in which a GameObject can be dragged and dropped.
+	 *			The field accepts a GameObject of a specific type and displays an optional label.
+	 */
 	class BS_SCR_BED_EXPORT GUIGameObjectField : public GUIElementContainer
 	{
 		struct PrivatelyConstruct {};
 
 	public:
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
 
+		/**
+		 * @brief	Creates a new game object GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @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	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& options, 
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @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	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @param	labelText		Text 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	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const HString& labelText, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @param	labelText		Text 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	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const HString& labelText, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field without a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @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	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const GUIOptions& options, const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @param	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @param	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @param	labelText		Text to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @param	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const HString& labelText, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @param	labelText		Text to display in the editor field label.
+		 * @param	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const HString& labelText,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new game object GUI editor field without a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts.
+		 * @param	type			Type name of the type this field accepts. Must derive from GameObject.
+		 * @param	style			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 GUIGameObjectField* create(const String& typeNamespace, const String& type, const String& style = StringUtil::BLANK);
 
 		GUIGameObjectField(const PrivatelyConstruct& dummy, const String& typeNamespace, const String& type, const GUIContent& labelContent,
 			UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel);
 
+		/**
+		 * @brief	Returns the game object currently referenced by the field, if any.
+		 */
 		HGameObject getValue() const;
+
+		/**
+		 * @brief	Sets the game object referenced by the field.
+		 */
 		void setValue(const HGameObject& value);
 
 		/**
 		 * @copydoc	GUIElement::setTint
 		 */
-		virtual void setTint(const Color& color);
+		virtual void setTint(const Color& color) override;
 
-		void _updateLayoutInternal(const GUILayoutData& data);
+		/**
+		 * @copydoc	GUIElement::_updateLayoutInternal
+		 */
+		void _updateLayoutInternal(const GUILayoutData& data) override;
 
-		Vector2I _getOptimalSize() const;
+		/**
+		 * @copydoc	GUIElement::_getOptimalSize
+		 */
+		Vector2I _getOptimalSize() const override;
 
+		/**
+		 * @brief	Triggered whenever the referenced game object changes.
+		 */
 		Event<void(const HGameObject&)> onValueChanged;
 	private:
 		virtual ~GUIGameObjectField();
 
-		void styleUpdated();
+		/**
+		 * @copydoc	GUIElement::styleUpdated
+		 */
+		void styleUpdated() override;
 
+		/**
+		 * @brief	Triggered when a drag and drop operation finishes over this element.
+		 */
 		void dataDropped(void* data);
+
+		/**
+		 * @brief	Triggered when the drop button that displays the game object label is clicked.
+		 */
 		void onDropButtonClicked();
+
+		/**
+		 * @brief	Triggered when the clear button is clicked.
+		 */
 		void onClearButtonClicked();
 
 	private:

+ 163 - 4
SBansheeEditor/Include/BsGUIResourceField.h

@@ -5,67 +5,226 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	GUI object that displays a field in which a Resource can be dragged and dropped.
+	 *			The field accepts a Resource of a specific type and displays an optional label.
+	 */
 	class BS_SCR_BED_EXPORT GUIResourceField : public GUIElementContainer
 	{
 		struct PrivatelyConstruct {};
 
 	public:
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
 
+		/**
+		 * @brief	Creates a new resource GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @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	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @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	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @param	labelText		Text 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	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const HString& labelText, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @param	labelText		Text 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	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const HString& labelText, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field without a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @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	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const GUIOptions& options, const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @param	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @param	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const GUIContent& labelContent,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @param	labelText		Text to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @param	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const HString& labelText, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field with a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @param	labelText		Text to display in the editor field label.
+		 * @param	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const HString& labelText,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new resource GUI editor field without a label.
+		 *
+		 * @param	typeNamespace	Namespace of the type this field accepts. 
+		 * @param	type			Type name of the type this field accepts. Must derive from Resource.
+		 * @param	style			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 GUIResourceField* create(const String& typeNamespace, const String& type, const String& style = StringUtil::BLANK);
 
 		GUIResourceField(const PrivatelyConstruct& dummy, const String& typeNamespace, const String& type, const GUIContent& labelContent,
 			UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel);
 
+		/**
+		 * @brief	Returns the resource referenced by the field, if any.
+		 */
 		HResource getValue() const;
+
+		/**
+		 * @brief	Sets the resource referenced by the field.
+		 */
 		void setValue(const HResource& value);
 
+		/**
+		 * @brief	Returns the resource referenced by the field. Returns
+		 *			empty string with no resource is referenced.
+		 */
 		String getUUID() const { return mUUID; }
+
+		/**
+		 * @brief	Sets the resource referenced by the field by finding
+		 *			the resource with the provided UUID.
+		 */
 		void setUUID(const String& uuid);
 
 		/**
 		 * @copydoc	GUIElement::setTint
 		 */
-		virtual void setTint(const Color& color);
+		virtual void setTint(const Color& color) override;
 
-		void _updateLayoutInternal(const GUILayoutData& data);
+		/**
+		 * @copydoc	GUIElement::_updateLayoutInternal
+		 */
+		void _updateLayoutInternal(const GUILayoutData& data) override;
 
-		Vector2I _getOptimalSize() const;
+		/**
+		 * @copydoc	GUIElement::_getOptimalSize
+		 */
+		Vector2I _getOptimalSize() const override;
 
+		/**
+		 * @brief	Triggered whenever the referenced resource changes. Provides
+		 *			the UUID of the resource, or empty string if no resource is referenced.
+		 */
 		Event<void(const String&)> onValueChanged;
 	private:
 		virtual ~GUIResourceField();
 
-		void styleUpdated();
+		/**
+		 * @copydoc	GUIElement::styleUpdated
+		 */
+		void styleUpdated() override;
 
+		/**
+		 * @brief	Triggered when a drag and drop operation finishes over this element.
+		 */
 		void dataDropped(void* data);
+
+		/**
+		 * @brief	Triggered when the drop button that displays the game object label is clicked.
+		 */
 		void onDropButtonClicked();
+
+		/**
+		 * @brief	Triggered when the clear button is clicked.
+		 */
 		void onClearButtonClicked();
 
 	private:

+ 140 - 0
SBansheeEditor/Include/BsGUITextureField.h

@@ -5,48 +5,164 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	GUI object that displays a field in which a Texture can be dragged and dropped.
+	 *			The field accepts a Texture of a specific type and displays an optional label.
+	 *			If texture is referenced its image is displayed in the field.
+	 */
 	class BS_SCR_BED_EXPORT GUITextureField : public GUIElementContainer
 	{
 		struct PrivatelyConstruct {};
 
 	public:
+		/**
+		 * Returns type name of the GUI element used for finding GUI element styles. 
+		 */
 		static const String& getGUITypeName();
 
+		/**
+		 * @brief	Creates a new texture GUI editor field with a label.
+		 *
+		 * @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	style			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 GUITextureField* create(const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field with a label.
+		 *
+		 * @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	style			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 GUITextureField* create(const GUIContent& labelContent, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field with a label.
+		 *
+		 * @param	labelText		Text 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	style			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 GUITextureField* create(const HString& labelText, UINT32 labelWidth, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field with a label.
+		 *
+		 * @param	labelText		Text 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	style			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 GUITextureField* create(const HString& labelText, const GUIOptions& options,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field without a 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	style			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 GUITextureField* create(const GUIOptions& options, const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field with a label.
+		 *
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @param	style			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 GUITextureField* create(const GUIContent& labelContent, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field with a label.
+		 *
+		 * @param	labelContent	Content to display in the editor field label.
+		 * @param	style			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 GUITextureField* create(const GUIContent& labelContent,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field with a label.
+		 *
+		 * @param	labelText		Text to display in the editor field label.
+		 * @param	labelWidth		Width of the label in pixels.
+		 * @param	style			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 GUITextureField* create(const HString& labelText, UINT32 labelWidth,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field with a label.
+		 *
+		 * @param	labelText		Text to display in the editor field label.
+		 * @param	style			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 GUITextureField* create(const HString& labelText,
 			const String& style = StringUtil::BLANK);
 
+		/**
+		 * @brief	Creates a new texture GUI editor field without a label.
+		 *
+		 * @param	style			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 GUITextureField* create(const String& style = StringUtil::BLANK);
 
 		GUITextureField(const PrivatelyConstruct& dummy, const GUIContent& labelContent,
 			UINT32 labelWidth, const String& style, const GUIDimensions& dimensions, bool withLabel);
 
+		/**
+		 * @brief	Returns the texture referenced by the field, if any.
+		 */
 		HTexture getValue() const;
+
+		/**
+		 * @brief	Sets the texture referenced by the field.
+		 */
 		void setValue(const HTexture& value);
 
+		/**
+		 * @brief	Returns the texture referenced by the field. Returns
+		 *			empty string with no texture is referenced.
+		 */
 		String getUUID() const { return mUUID; }
+
+		/**
+		 * @brief	Sets the texture referenced by the field by finding
+		 *			the texture with the provided UUID.
+		 */
 		void setUUID(const String& uuid);
 
 		/**
@@ -54,18 +170,42 @@ namespace BansheeEngine
 		 */
 		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 whenever the referenced texture changes. Provides
+		 *			the UUID of the resource, or empty string if no texture is referenced.
+		 */
 		Event<void(const String&)> onValueChanged;
 	private:
 		virtual ~GUITextureField();
 
+		/**
+		 * @copydoc	GUIElement::styleUpdated
+		 */
 		void styleUpdated() override;
 
+		/**
+		 * @brief	Triggered when a drag and drop operation finishes over this element.
+		 */
 		void dataDropped(void* data);
+
+		/**
+		 * @brief	Triggered when the drop button that displays the game object label is clicked.
+		 */
 		void onDropButtonClicked();
+
+		/**
+		 * @brief	Triggered when the clear button is clicked.
+		 */
 		void onClearButtonClicked();
 
 	private:

+ 30 - 0
SBansheeEditor/Include/BsMenuItemManager.h

@@ -5,6 +5,10 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Tracks main menu items that are registered in managed code using the MenuItem
+	 *			attribute.
+	 */
 	class BS_SCR_BED_EXPORT MenuItemManager : public Module<MenuItemManager>
 	{
 	public:
@@ -12,10 +16,36 @@ namespace BansheeEngine
 		~MenuItemManager();
 
 	private:
+		/**
+		 * @brief	Removes all managed menu items from the main menu.
+		 */
 		void clearMenuItems();
+
+		/**
+		 * @brief	Reloads all assembly types and attempts to find uses of MenuItem. Old
+		 *			menu items are cleared and new are added.
+		 */
 		void reloadAssemblyData();
+
+		/**
+		 * @brief	Parse the provided method and detect whether it has a MenuItem attribute.
+		 *			If it has extract needed data from it.
+		 *
+		 * @param	method		Managed method to parse.
+		 * @param	path		Output path defined in the MenuItem attribute.
+		 * @param	shortcut	Shortcut key defined in the MenuItem attribute.
+		 * @param	priority	Menu item priority defined in the MenuItem attribute.
+		 *
+		 * @return	True if the method has a MenuItem attribute. If false is returned output parameters
+		 *			from this method are undefined.
+		 */
 		bool parseMenuItemMethod(MonoMethod* method, WString& path, ShortcutKey& shortcut, INT32& priority) const;
 
+		/**
+		 * @brief	Triggered when one of the managed menu items is clicked. 
+		 *
+		 * @param	method	Managed method that the MenuItem is referencing.
+		 */
 		static void menuItemCallback(MonoMethod* method);
 
 		ScriptAssemblyManager& mScriptObjectManager;

+ 7 - 0
SBansheeEditor/Include/BsScriptBrowseDialog.h

@@ -5,12 +5,19 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Interop class between C++ & CLR for browse dialog methods in Platform.
+	 */
 	class BS_SCR_BED_EXPORT ScriptBrowseDialog : public ScriptObject<ScriptBrowseDialog>
 	{
 	public:
 		SCRIPT_OBJ(EDITOR_ASSEMBLY, "BansheeEditor", "BrowseDialog")
 
 	private:
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
 		static bool internal_OpenFile(MonoString* defaultFolder, MonoString* filterList, bool allowMultiselect, MonoArray** outPaths);
 		static bool internal_OpenFolder(MonoString* defaultFolder, MonoString* filterList, MonoString** outPath);
 		static bool internal_SaveFile(MonoString* defaultFolder, MonoString* filterList, MonoString** outPath);

+ 6 - 0
SBansheeEditor/Include/BsScriptBuildManager.h

@@ -6,6 +6,9 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Interop class between C++ & CLR for BuildManager.
+	 */
 	class BS_SCR_BED_EXPORT ScriptBuildManager : public ScriptObject <ScriptBuildManager>
 	{
 	public:
@@ -14,6 +17,9 @@ namespace BansheeEngine
 	private:
 		ScriptBuildManager(MonoObject* instance);
 
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
 		static MonoArray* internal_GetAvailablePlatforms();
 		static PlatformType internal_GetActivePlatform();
 		static void internal_SetActivePlatform(PlatformType value);

+ 8 - 2
SBansheeEditor/Include/BsScriptCodeEditor.h

@@ -5,17 +5,23 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Interop class between C++ & CLR for CodeEditorManager.
+	 */
 	class BS_SCR_BED_EXPORT ScriptCodeEditor : public ScriptObject<ScriptCodeEditor>
 	{
 	public:
 		SCRIPT_OBJ(EDITOR_ASSEMBLY, "BansheeEditor", "CodeEditor")
 
 	private:
+		ScriptCodeEditor(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
 		static void internal_SetActiveEditor(CodeEditorType type);
 		static MonoArray* internal_GetAvailableEditors();
 		static void internal_OpenFile(MonoString* path, UINT32 line);
 		static void internal_SyncSolution();
-
-		ScriptCodeEditor(MonoObject* instance);
 	};
 }

+ 1 - 1
SBansheeEngine/Include/BsScriptBuiltin.h

@@ -6,7 +6,7 @@
 namespace BansheeEngine
 {
 	/**
-	 * @brief	Interop class between C++ & CLR for ScriptResourceManager.
+	 * @brief	Interop class between C++ & CLR for BuiltinResources.
 	 */
 	class BS_SCR_BE_EXPORT ScriptBuiltin : public ScriptObject <ScriptBuiltin>
 	{

+ 1 - 2
TODO.txt

@@ -85,8 +85,7 @@ Ribek use:
  - Test level save/load (also test hidden & non-saveable scene objects)
  - Ability to create assets in Project view (At least Material)
  - Need a way to add scene objects and components (and remove them)
-  - Components adding should be only done by drag and dropping scripts to inspector (undoable)
-  - COmponent removal should be done by clicking X in inspector (undoable)
+  - Need to add default components (Camera, Renderable, Light) to main menu
   - Adding scene objects should be doable from context menu in Hierarchy, by dropping a Prefab or by main Menu (undoable)
  - Hook up color picker to guicolor field
  - (Optionally, needed for GUI editing) GUISkin resource inspector & a way to inspect and save the default editor skin