summaryrefslogtreecommitdiff
path: root/doc/classes/TreeItem.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/TreeItem.xml')
-rw-r--r--doc/classes/TreeItem.xml30
1 files changed, 23 insertions, 7 deletions
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 13f2c7120c..c909a35ab5 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TreeItem" inherits="Object" version="4.0">
+<class name="TreeItem" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Control for a single item inside a [Tree].
</brief_description>
@@ -14,11 +14,11 @@
<return type="void" />
<argument index="0" name="column" type="int" />
<argument index="1" name="button" type="Texture2D" />
- <argument index="2" name="button_idx" type="int" default="-1" />
+ <argument index="2" name="id" type="int" default="-1" />
<argument index="3" name="disabled" type="bool" default="false" />
<argument index="4" name="tooltip" type="String" default="&quot;&quot;" />
<description>
- Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
+ Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]id[/code] is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
</description>
</method>
<method name="call_recursive" qualifiers="vararg">
@@ -80,11 +80,27 @@
Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code].
</description>
</method>
+ <method name="get_button_by_id" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="id" type="int" />
+ <description>
+ Returns the button index if there is a button with id [code]id[/code] in column [code]column[/code], otherwise returns -1.
+ </description>
+ </method>
<method name="get_button_count" qualifiers="const">
<return type="int" />
<argument index="0" name="column" type="int" />
<description>
- Returns the number of buttons in column [code]column[/code]. May be used to get the most recently added button's index, if no index was specified.
+ Returns the number of buttons in column [code]column[/code].
+ </description>
+ </method>
+ <method name="get_button_id" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="button_idx" type="int" />
+ <description>
+ Returns the id for the button at index [code]button_idx[/code] in column [code]column[/code].
</description>
</method>
<method name="get_button_tooltip" qualifiers="const">
@@ -371,7 +387,7 @@
</method>
<method name="move_after">
<return type="void" />
- <argument index="0" name="item" type="Object" />
+ <argument index="0" name="item" type="TreeItem" />
<description>
Moves this TreeItem right after the given [code]item[/code].
[b]Note:[/b] You can't move to the root or move the root.
@@ -379,7 +395,7 @@
</method>
<method name="move_before">
<return type="void" />
- <argument index="0" name="item" type="Object" />
+ <argument index="0" name="item" type="TreeItem" />
<description>
Moves this TreeItem right before the given [code]item[/code].
[b]Note:[/b] You can't move to the root or move the root.
@@ -395,7 +411,7 @@
</method>
<method name="remove_child">
<return type="void" />
- <argument index="0" name="child" type="Object" />
+ <argument index="0" name="child" type="TreeItem" />
<description>
Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free].
</description>