summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/EditorResourcePicker.xml3
-rw-r--r--doc/classes/PhysicsServer2D.xml6
-rw-r--r--doc/classes/PhysicsServer3D.xml6
-rw-r--r--doc/classes/String.xml14
4 files changed, 20 insertions, 9 deletions
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index 9c490cbb3e..b26b6f9527 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -62,8 +62,9 @@
</signal>
<signal name="resource_selected">
<argument index="0" name="resource" type="Resource" />
+ <argument index="1" name="edit" type="bool" />
<description>
- Emitted when the resource value was set and user clicked to edit it.
+ Emitted when the resource value was set and user clicked to edit it. When [code]edit[/code] is [code]true[/code], the signal was caused by the context menu "Edit" option.
</description>
</signal>
</signals>
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 24a20b5613..e44bf71e8d 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -123,8 +123,7 @@
<method name="area_set_area_monitor_callback">
<return type="void" />
<argument index="0" name="area" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
+ <argument index="1" name="callback" type="Callable" />
<description>
</description>
</method>
@@ -147,8 +146,7 @@
<method name="area_set_monitor_callback">
<return type="void" />
<argument index="0" name="area" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
+ <argument index="1" name="callback" type="Callable" />
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 034bd55519..0c34cf8092 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -110,8 +110,7 @@
<method name="area_set_area_monitor_callback">
<return type="void" />
<argument index="0" name="area" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
+ <argument index="1" name="callback" type="Callable" />
<description>
</description>
</method>
@@ -134,8 +133,7 @@
<method name="area_set_monitor_callback">
<return type="void" />
<argument index="0" name="area" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
+ <argument index="1" name="callback" type="Callable" />
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 1190d90190..a58bfd5c15 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -202,6 +202,19 @@
If the string is a valid file path, returns the filename.
</description>
</method>
+ <method name="get_slice" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="delimiter" type="String" />
+ <argument index="1" name="slice" type="int" />
+ <description>
+ Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist.
+ This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
+ Example:
+ [codeblock]
+ print("i/am/example/string".get_slice("/", 2)) # Prints 'example'.
+ [/codeblock]
+ </description>
+ </method>
<method name="hash" qualifiers="const">
<return type="int" />
<description>
@@ -602,6 +615,7 @@
<description>
Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. The [code]delimiter[/code] can be of any length.
If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of [code]0[/code] means that all items are split.
+ If you need only one element from the array at a specific index, [method get_slice] is a more performant option.
Example:
[codeblocks]
[gdscript]