Explorar o código

Update EditorPlugin doc

Franklin Sobrinho %!s(int64=9) %!d(string=hai) anos
pai
achega
a27d2e4c29
Modificáronse 1 ficheiros con 24 adicións e 0 borrados
  1. 24 0
      doc/base/classes.xml

+ 24 - 0
doc/base/classes.xml

@@ -11505,6 +11505,13 @@
 				Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
 			</description>
 		</method>
+		<method name="get_window_layout" qualifiers="virtual">
+			<argument index="0" name="layout" type="ConfigFile">
+			</argument>
+			<description>
+				Get the GUI layout of the plugin. This is used to save the project's editor layout when the [method EditorPlugin.queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock).
+			</description>
+		</method>
 		<method name="handles" qualifiers="virtual">
 			<return type="bool">
 			</return>
@@ -11529,6 +11536,11 @@
 				Remember that you have to manage the visibility of all your editor controls manually.
 			</description>
 		</method>
+		<method name="queue_save_layout" qualifiers="const">
+			<description>
+				Queue save the project's editor layout.
+			</description>
+		</method>
 		<method name="remove_control_from_bottom_panel">
 			<argument index="0" name="control" type="Control">
 			</argument>
@@ -11564,6 +11576,11 @@
 				Remove the import plugin, don't forget to call this on exit.
 			</description>
 		</method>
+		<method name="save_external_data" qualifiers="virtual">
+			<description>
+				This method is called after the editor save the project or when the it's closed. It asks the plugin to save edited external scenes/resources.
+			</description>
+		</method>
 		<method name="set_state" qualifiers="virtual">
 			<argument index="0" name="state" type="Dictionary">
 			</argument>
@@ -11571,6 +11588,13 @@
 				Restore the state saved by [method EditorPlugin.get_state].
 			</description>
 		</method>
+		<method name="set_window_layout" qualifiers="virtual">
+			<argument index="0" name="layout" type="ConfigFile">
+			</argument>
+			<description>
+				Restore the plugin GUI layout saved by [method EditorPlugin.get_window_layout].
+			</description>
+		</method>
 	</methods>
 	<constants>
 		<constant name="CONTAINER_TOOLBAR" value="0">