diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Color.xml | 5 | ||||
-rw-r--r-- | doc/classes/Tree.xml | 7 | ||||
-rw-r--r-- | doc/classes/TreeItem.xml | 20 |
3 files changed, 28 insertions, 4 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 4e73d4d9d8..8fd01509ec 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -221,14 +221,15 @@ Returns a new color from [code]rgba[/code], an HTML hexadecimal color string. [code]rgba[/code] is not case sensitive, and may be prefixed with a '#' character. [code]rgba[/code] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [code]rgba[/code] does not contain an alpha channel value, an alpha channel value of 1.0 is applied. If [code]rgba[/code] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned. + [b]Note:[/b] This method is not implemented in C#, but the same functionality is provided in the class constructor. [codeblocks] [gdscript] var green = Color.html("#00FF00FF") # set green to Color(0.0, 1.0, 0.0, 1.0) var blue = Color.html("#0000FF") # set blue to Color(0.0, 0.0, 1.0, 1.0) [/gdscript] [csharp] - var green = Color.Html("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0) - var blue = Color.Html("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0) + var green = new Color("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0) + var blue = new Color("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0) [/csharp] [/codeblocks] </description> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 4b051c4938..35a70ae53f 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -72,6 +72,13 @@ [b]Note:[/b] Despite the name of this method, the focus cursor itself is only visible in [constant SELECT_MULTI] mode. </description> </method> + <method name="get_button_id_at_position" qualifiers="const"> + <return type="int" /> + <argument index="0" name="position" type="Vector2" /> + <description> + Returns the button id at [code]position[/code], or -1 if no button is there. + </description> + </method> <method name="get_column_at_position" qualifiers="const"> <return type="int" /> <argument index="0" name="position" type="Vector2" /> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 12c91cdd10..675c534e7b 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -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="""" /> <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 after 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,6 +80,14 @@ 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" /> @@ -87,6 +95,14 @@ 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. </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"> <return type="String" /> <argument index="0" name="column" type="int" /> |