diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Area2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/CPUParticles2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/Control.xml | 55 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 10 | ||||
-rw-r--r-- | doc/classes/Theme.xml | 204 | ||||
-rw-r--r-- | doc/classes/Tree.xml | 2 | ||||
-rw-r--r-- | doc/classes/TreeItem.xml | 66 | ||||
-rw-r--r-- | doc/classes/Window.xml | 38 |
8 files changed, 220 insertions, 159 deletions
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index a1e522d146..72b7faf8e4 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -60,7 +60,7 @@ <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> If [code]true[/code], the area's audio bus overrides the default audio bus. </member> - <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="98.0"> + <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="980.0"> The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. </member> <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0"> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index aa9f99a31e..9e70978db8 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -199,7 +199,7 @@ <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> - <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 98 )"> + <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 980 )"> Gravity applied to every particle. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index c0f918a01f..a9a230b78f 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -462,10 +462,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. [codeblocks] [gdscript] func _ready(): @@ -485,10 +485,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_font" qualifiers="const"> @@ -496,10 +496,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_font_size" qualifiers="const"> @@ -507,10 +507,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -518,10 +518,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_stylebox" qualifiers="const"> @@ -529,10 +529,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_tooltip" qualifiers="const"> @@ -593,10 +593,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_color_override" qualifiers="const"> @@ -613,10 +613,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_constant_override" qualifiers="const"> @@ -633,10 +633,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_font_override" qualifiers="const"> @@ -653,10 +653,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_font_size_override" qualifiers="const"> @@ -673,10 +673,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_icon_override" qualifiers="const"> @@ -693,10 +693,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_stylebox_override" qualifiers="const"> @@ -1173,7 +1173,12 @@ Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> - Changing this property replaces the current [Theme] resource this node and all its [Control] children use. + The [Theme] resource this node and all its [Control] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. + </member> + <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="@"""> + The type name used by this [Control] to look up its own theme items. By default, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). Setting this property gives the highest priority to the type of the specified name, then falls back on the class names. + [b]Note:[/b] To look up [Control]'s own items use various [code]get_theme_*[/code] methods without specifying [code]theme_type[/code]. + [b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. </member> </members> <signals> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index d38c3fc0d8..b3813e6ca2 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1201,17 +1201,17 @@ The default angular damp in 2D. [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> - <member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98"> + <member name="physics/2d/default_gravity" type="float" setter="" getter="" default="980.0"> The default gravity strength in 2D. [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: [codeblocks] [gdscript] - # Set the default gravity strength to 98. - PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 98) + # Set the default gravity strength to 980. + PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 980) [/gdscript] [csharp] - // Set the default gravity strength to 98. - PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 98); + // Set the default gravity strength to 980. + PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 980); [/csharp] [/codeblocks] </member> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 3173dddb42..7448697df3 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -23,10 +23,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the [Color] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_constant"> @@ -34,10 +34,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the constant at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the constant at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_font"> @@ -45,10 +45,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the [Font] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_font_size"> @@ -56,10 +56,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the font size [code]name[/code] if the theme has [code]node_type[/code]. + Clears the font size [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_icon"> @@ -67,10 +67,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the icon at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the icon at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_stylebox"> @@ -78,10 +78,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_theme_item"> @@ -91,10 +91,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="copy_default_theme"> @@ -118,19 +118,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [Color] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]node_type[/code]. + Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_color_type_list" qualifiers="const"> @@ -145,19 +145,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the constant at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]node_type[/code]. + Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_constant_type_list" qualifiers="const"> @@ -172,19 +172,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [Font] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]node_type[/code]. + Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size" qualifiers="const"> @@ -192,19 +192,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the font size at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]node_type[/code]. + Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size_type_list" qualifiers="const"> @@ -226,19 +226,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]node_type[/code]. + Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_icon_type_list" qualifiers="const"> @@ -253,21 +253,21 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. - Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list]. + Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. + Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]node_type[/code]. - Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list]. + Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]theme_type[/code]. + Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_type_list" qualifiers="const"> @@ -284,11 +284,11 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code]. - Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. + Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. + Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. </description> </method> <method name="get_theme_item_list" qualifiers="const"> @@ -296,11 +296,11 @@ </return> <argument index="0" name="data_type" type="int" enum="Theme.DataType"> </argument> - <argument index="1" name="node_type" type="String"> + <argument index="1" name="theme_type" type="String"> </argument> <description> - Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]node_type[/code]. - Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. + Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]theme_type[/code]. + Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. </description> </method> <method name="get_theme_item_type_list" qualifiers="const"> @@ -324,11 +324,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> @@ -336,11 +336,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if constant with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_font" qualifiers="const"> @@ -348,11 +348,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_font_size" qualifiers="const"> @@ -360,11 +360,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if font size with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> @@ -372,11 +372,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> @@ -384,11 +384,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_item" qualifiers="const"> @@ -398,11 +398,11 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="rename_color"> @@ -412,10 +412,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_constant"> @@ -425,10 +425,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_font"> @@ -438,10 +438,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_font_size"> @@ -451,10 +451,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_icon"> @@ -464,10 +464,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_stylebox"> @@ -477,10 +477,10 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_theme_item"> @@ -492,10 +492,10 @@ </argument> <argument index="2" name="name" type="StringName"> </argument> - <argument index="3" name="node_type" type="StringName"> + <argument index="3" name="theme_type" type="StringName"> </argument> <description> - Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails. + Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="set_color"> @@ -503,13 +503,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="color" type="Color"> </argument> <description> - Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_constant"> @@ -517,13 +517,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="constant" type="int"> </argument> <description> - Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_font"> @@ -531,13 +531,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="font" type="Font"> </argument> <description> - Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_font_size"> @@ -545,13 +545,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="font_size" type="int"> </argument> <description> - Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_icon"> @@ -559,13 +559,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="texture" type="Texture2D"> </argument> <description> - Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_stylebox"> @@ -573,13 +573,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="texture" type="StyleBox"> </argument> <description> - Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]node_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_theme_item"> @@ -589,14 +589,14 @@ </argument> <argument index="1" name="name" type="StringName"> </argument> - <argument index="2" name="node_type" type="StringName"> + <argument index="2" name="theme_type" type="StringName"> </argument> <argument index="3" name="value" type="Variant"> </argument> <description> - Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]node_type[/code]. + Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]theme_type[/code]. Does nothing if the [code]value[/code] type does not match [code]data_type[/code]. - Creates [code]node_type[/code] if the theme does not have it. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> </methods> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index a09f1bf470..27b26801f3 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -30,7 +30,7 @@ } [/csharp] [/codeblocks] - To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree]. + To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_first_child] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree]. </description> <tutorials> </tutorials> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index add23c2ce6..7d37580504 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -63,6 +63,16 @@ Removes all OpenType features. </description> </method> + <method name="create_child"> + <return type="TreeItem"> + </return> + <argument index="0" name="idx" type="int" default="-1"> + </argument> + <description> + Creates an item and adds it as a child. + The new item will be inserted as position [code]idx[/code] (the default value [code]-1[/code] means the last position), or it will be the last child if [code]idx[/code] is higher than the child count. + </description> + </method> <method name="deselect"> <return type="void"> </return> @@ -123,11 +133,28 @@ Returns the column's cell mode. </description> </method> - <method name="get_children"> + <method name="get_child"> <return type="TreeItem"> </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Returns a child item by its index (see [method get_child_count]). This method is often used for iterating all children of an item. + Negative indices access the children from the last one. + </description> + </method> + <method name="get_child_count"> + <return type="int"> + </return> <description> - Returns the TreeItem's first child item or a null object if there is none. + Returns the number of child items. + </description> + </method> + <method name="get_children"> + <return type="Array"> + </return> + <description> + Returns an array of references to the item's children. </description> </method> <method name="get_custom_bg_color" qualifiers="const"> @@ -157,6 +184,13 @@ Returns [code]true[/code] if [code]expand_right[/code] is set. </description> </method> + <method name="get_first_child"> + <return type="TreeItem"> + </return> + <description> + Returns the TreeItem's first child. + </description> + </method> <method name="get_icon" qualifiers="const"> <return type="Texture2D"> </return> @@ -193,6 +227,13 @@ Returns the icon [Texture2D] region as [Rect2]. </description> </method> + <method name="get_index"> + <return type="int"> + </return> + <description> + Returns the node's order in the tree. For example, if called on the first child item the position is [code]0[/code]. + </description> + </method> <method name="get_language" qualifiers="const"> <return type="String"> </return> @@ -342,6 +383,13 @@ Returns the given column's tooltip. </description> </method> + <method name="get_tree"> + <return type="Tree"> + </return> + <description> + Returns the [Tree] that owns this TreeItem. + </description> + </method> <method name="is_button_disabled" qualifiers="const"> <return type="bool"> </return> @@ -397,18 +445,24 @@ Returns [code]true[/code] if column [code]column[/code] is selected. </description> </method> - <method name="move_to_bottom"> + <method name="move_after"> <return type="void"> </return> + <argument index="0" name="item" type="Object"> + </argument> <description> - Moves this TreeItem to the bottom in the [Tree] hierarchy. + Moves this TreeItem right after the given [code]item[/code]. + [b]Note:[/b] You can't move to the root or move the root. </description> </method> - <method name="move_to_top"> + <method name="move_before"> <return type="void"> </return> + <argument index="0" name="item" type="Object"> + </argument> <description> - Moves this TreeItem to the top in the [Tree] hierarchy. + Moves this TreeItem right before the given [code]item[/code]. + [b]Note:[/b] You can't move to the root or move the root. </description> </method> <method name="remove_child"> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index b99a251a11..37709753bc 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -45,7 +45,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -55,7 +55,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -65,10 +65,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_theme_font_size" qualifiers="const"> @@ -76,10 +76,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns the font size at [code]name[/code] if the theme has [code]type[/code]. + Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -87,7 +87,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -97,7 +97,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -119,7 +119,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -129,7 +129,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -139,11 +139,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_font_size" qualifiers="const"> @@ -151,11 +151,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font size with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_icon" qualifiers="const"> @@ -163,7 +163,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -173,7 +173,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -340,6 +340,8 @@ </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> </member> + <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="@"""> + </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> </member> <member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false"> |