summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-20 13:56:50 +0200
committerGitHub <noreply@github.com>2020-07-20 13:56:50 +0200
commit639252d0f8dfee26f6392861929886a9f217740e (patch)
tree7f4be340540fd9733666b0b179c2cffadd321911 /doc/classes
parentfe1ec3beab997699e68ee1ac65db859bfd3bc19e (diff)
parenta36912b3cbba6e24ae562ec5ab67fc51202bd56f (diff)
Merge pull request #40409 from Calinou/doc-control-rect-scale
Document caveats related to Control scaling
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Control.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 9dbb843902..1f495bf91a 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -856,7 +856,9 @@
The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position.
</member>
<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 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 instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_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.