diff options
Diffstat (limited to 'doc/classes/Control.xml')
-rw-r--r-- | doc/classes/Control.xml | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index b00bf1c250..7c8239977f 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -16,7 +16,7 @@ [b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class. </description> <tutorials> - <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/ui/index.html</link> + <link title="GUI documentation index">https://docs.godotengine.org/en/latest/tutorials/ui/index.html</link> <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> <link title="Control node gallery">https://docs.godotengine.org/en/latest/tutorials/ui/control_node_gallery.html</link> <link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link> @@ -458,6 +458,27 @@ See [method get_theme_color] for details. </description> </method> + <method name="get_theme_default_base_scale" qualifiers="const"> + <return type="float" /> + <description> + Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value. + See [method get_theme_color] for details. + </description> + </method> + <method name="get_theme_default_font" qualifiers="const"> + <return type="Font" /> + <description> + Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value. + See [method get_theme_color] for details. + </description> + </method> + <method name="get_theme_default_font_size" qualifiers="const"> + <return type="int" /> + <description> + Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value. + See [method get_theme_color] for details. + </description> + </method> <method name="get_theme_font" qualifiers="const"> <return type="Font" /> <argument index="0" name="name" type="StringName" /> @@ -1023,7 +1044,7 @@ <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value. [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. - [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property. + [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]yield(get_tree(), "process_frame")[/code] then set its [member rect_scale] property. </member> <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)"> The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. |