summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml4
-rw-r--r--doc/classes/AnimationLibrary.xml70
-rw-r--r--doc/classes/AnimationPlayer.xml34
-rw-r--r--doc/classes/EditorInspector.xml10
-rw-r--r--doc/classes/OptionButton.xml20
-rw-r--r--doc/classes/RichTextLabel.xml7
-rw-r--r--doc/classes/TextServer.xml4
-rw-r--r--doc/classes/Tree.xml3
-rw-r--r--doc/classes/Window.xml9
9 files changed, 145 insertions, 16 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index a2b310ca82..da6513a08b 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -2546,13 +2546,13 @@
The property is a translatable string.
</constant>
<constant name="PROPERTY_USAGE_GROUP" value="128" enum="PropertyUsageFlags">
- Used to group properties together in the editor.
+ Used to group properties together in the editor. See [EditorInspector].
</constant>
<constant name="PROPERTY_USAGE_CATEGORY" value="256" enum="PropertyUsageFlags">
Used to categorize properties together in the editor.
</constant>
<constant name="PROPERTY_USAGE_SUBGROUP" value="512" enum="PropertyUsageFlags">
- Used to group properties together in the editor in a subgroup (under a group).
+ Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector].
</constant>
<constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048" enum="PropertyUsageFlags">
The property does not save its state in [PackedScene].
diff --git a/doc/classes/AnimationLibrary.xml b/doc/classes/AnimationLibrary.xml
new file mode 100644
index 0000000000..0a731edadd
--- /dev/null
+++ b/doc/classes/AnimationLibrary.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimationLibrary" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_animation">
+ <return type="int" enum="Error" />
+ <argument index="0" name="name" type="StringName" />
+ <argument index="1" name="animation" type="Animation" />
+ <description>
+ </description>
+ </method>
+ <method name="get_animation" qualifiers="const">
+ <return type="Animation" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_list" qualifiers="const">
+ <return type="StringName[]" />
+ <description>
+ </description>
+ </method>
+ <method name="has_animation" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="remove_animation">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="rename_animation">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
+ <argument index="1" name="newname" type="StringName" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{}">
+ </member>
+ </members>
+ <signals>
+ <signal name="animation_added">
+ <argument index="0" name="name" type="Animation" />
+ <description>
+ </description>
+ </signal>
+ <signal name="animation_removed">
+ <argument index="0" name="name" type="Animation" />
+ <description>
+ </description>
+ </signal>
+ <signal name="animation_renamed">
+ <argument index="0" name="name" type="Animation" />
+ <argument index="1" name="to_name" type="Animation" />
+ <description>
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index b1d04ce1f2..625cf3c47c 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -14,12 +14,11 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
- <method name="add_animation">
+ <method name="add_animation_library">
<return type="int" enum="Error" />
<argument index="0" name="name" type="StringName" />
- <argument index="1" name="animation" type="Animation" />
+ <argument index="1" name="library" type="AnimationLibrary" />
<description>
- Adds [code]animation[/code] to the player accessible with the key [code]name[/code].
</description>
</method>
<method name="advance">
@@ -63,6 +62,12 @@
Returns the name of [code]animation[/code] or an empty string if not found.
</description>
</method>
+ <method name="find_animation_library" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="animation" type="Animation" />
+ <description>
+ </description>
+ </method>
<method name="get_animation" qualifiers="const">
<return type="Animation" />
<argument index="0" name="name" type="StringName" />
@@ -70,6 +75,17 @@
Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found.
</description>
</method>
+ <method name="get_animation_library" qualifiers="const">
+ <return type="AnimationLibrary" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_library_list" qualifiers="const">
+ <return type="StringName[]" />
+ <description>
+ </description>
+ </method>
<method name="get_animation_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
@@ -103,6 +119,12 @@
Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code].
</description>
</method>
+ <method name="has_animation_library" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
<method name="is_playing" qualifiers="const">
<return type="bool" />
<description>
@@ -138,19 +160,17 @@
[b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow.
</description>
</method>
- <method name="remove_animation">
+ <method name="remove_animation_library">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
- Removes the animation with key [code]name[/code].
</description>
</method>
- <method name="rename_animation">
+ <method name="rename_animation_library">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="newname" type="StringName" />
<description>
- Renames an existing animation with key [code]name[/code] to [code]newname[/code].
</description>
</method>
<method name="seek">
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index cd249ed319..365e1f13a9 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorInspector" inherits="ScrollContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A tab used to edit properties of the selected node.
+ A control used to edit properties of an object.
</brief_description>
<description>
- The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as the Sprite2D then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow.
- [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_inspector].
+ This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the [EditorInspector] used in the editor's Inspector dock, use [method EditorInterface.get_inspector].
+ [EditorInspector] will show properties in the same order as the array returned by [method Object.get_property_list].
+ If a property's name is path-like (i.e. if it contains forward slashes), [EditorInspector] will create nested sections for "directories" along the path. For example, if a property is named [code]highlighting/gdscript/node_path_color[/code], it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section.
+ If a property has [constant @GlobalScope.PROPERTY_USAGE_GROUP] usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. [EditorInspector] will create a top-level section for each group. For example, if a property with group usage is named [code]Collide With[/code] and its hint string is [code]collide_with_[/code], a subsequent [code]collide_with_area[/code] property will be shown as "Area" inside the "Collide With" section.
+ If a property has [constant @GlobalScope.PROPERTY_USAGE_SUBGROUP] usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup.
+ [b]Note:[/b] Unlike sections created from path-like property names, [EditorInspector] won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 25e41116a2..b7145ab923 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -30,8 +30,9 @@
</method>
<method name="add_separator">
<return type="void" />
+ <argument index="0" name="text" type="String" default="&quot;&quot;" />
<description>
- Adds a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end.
+ Adds a separator to the list of items. Separators help to group items, and can optionally be given a [code]text[/code] header. A separator also gets an index assigned, and is appended at the end of the item list.
</description>
</method>
<method name="clear">
@@ -89,6 +90,12 @@
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
+ <method name="get_selectable_item" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="from_last" type="bool" default="false" />
+ <description>
+ </description>
+ </method>
<method name="get_selected_id" qualifiers="const">
<return type="int" />
<description>
@@ -101,6 +108,11 @@
Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata].
</description>
</method>
+ <method name="has_selectable_items" qualifiers="const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
<method name="is_item_disabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="idx" type="int" />
@@ -108,6 +120,12 @@
Returns [code]true[/code] if the item at index [code]idx[/code] is disabled.
</description>
</method>
+ <method name="is_item_separator" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="idx" type="int" />
+ <description>
+ </description>
+ </method>
<method name="remove_item">
<return type="void" />
<argument index="0" name="idx" type="int" />
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index a882a6c66f..b572ad2ed8 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -376,6 +376,13 @@
Scrolls the window's top line to match first line of the [code]paragraph[/code].
</description>
</method>
+ <method name="select_all">
+ <return type="void" />
+ <description>
+ Select all the text.
+ If [member selection_enabled] is [code]false[/code], no selection will occur.
+ </description>
+ </method>
<method name="set_cell_border_color">
<return type="void" />
<argument index="0" name="color" type="Color" />
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index b4339bef11..9ef800d7e1 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -1249,9 +1249,9 @@
<method name="shaped_text_get_word_breaks" qualifiers="const">
<return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
- <argument index="1" name="grapheme_flags" type="int" />
+ <argument index="1" name="grapheme_flags" type="int" default="264" />
<description>
- Breaks text into words and returns array of character ranges.
+ Breaks text into words and returns array of character ranges. Use [code]grapheme_flags[/code] to set what characters are used for breaking (see [enum GraphemeFlag]).
</description>
</method>
<method name="shaped_text_hit_test_grapheme" qualifiers="const">
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index b8c39bee49..5abec4b437 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -179,8 +179,9 @@
<return type="Rect2" />
<argument index="0" name="item" type="TreeItem" />
<argument index="1" name="column" type="int" default="-1" />
+ <argument index="2" name="button_index" type="int" default="-1" />
<description>
- Returns the rectangle area for the specified [TreeItem]. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
+ Returns the rectangle area for the specified [TreeItem]. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned.
</description>
</method>
<method name="get_item_at_position" qualifiers="const">
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 9853f906bc..87a65db192 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -349,6 +349,15 @@
<argument index="0" name="files" type="PackedStringArray" />
<description>
Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
+ Note that this method only works with non-embedded windows, i.e. the main window and [Window]-derived nodes when [member Viewport.gui_embed_subwindows] is disabled in the main viewport.
+ Example usage:
+ [codeblock]
+ func _ready():
+ get_viewport().files_dropped.connect(on_files_dropped)
+
+ func on_files_dropped(files):
+ print(files)
+ [/codeblock]
</description>
</signal>
<signal name="focus_entered">