Browse Source

Update ui_introduction_to_the_ui_system.rst

Not all stretch modes of TextureRect was described.
GetLocalPlayer 7 years ago
parent
commit
c6a77c68af

+ 5 - 3
getting_started/step_by_step/ui_introduction_to_the_ui_system.rst

@@ -76,12 +76,14 @@ TextureRect
 It seems similar to the Sprite node but it offers multiple scaling modes.
 It seems similar to the Sprite node but it offers multiple scaling modes.
 Set the Stretch Mode property to change its behaviour:
 Set the Stretch Mode property to change its behaviour:
 
 
--  ``Tile`` makes the texture repeat, but it won't scale
--  The default, ``Scale and Expand (compat)``, lets you scale the
-   texture up, but it forces a minimal size
+- ``Scale On Expand (compat)`` scales the texture to fit the node’s bounding rectangle, only if ``expand`` property is ``true``; otherwise, it behaves like ``Keep`` mode. Default mode for backwards compatibility.
+- ``Sacle`` scales the texture to fit the node’s bounding rectangle
+- ``Tile`` makes the texture repeat, but it won't scale
 -  ``Keep`` and ``Keep Centered`` force the texture to remain at its
 -  ``Keep`` and ``Keep Centered`` force the texture to remain at its
    original size, in the top left corner or the center of the frame
    original size, in the top left corner or the center of the frame
    respectively
    respectively
+- ``Keep Aspect`` and ``Keep Aspect Centered`` scales the texture but force it to remain its original aspect ratio, in the top left corner or the center of the frame respectively
+- ``Keep Aspect Covered`` works just like ``Keep Aspect Centered`` but the shorter side fits the bounding rectangle and the other one clips to the node’s limits
 
 
 As with Sprite nodes, you can modulate the TextureRect's colour. Click
 As with Sprite nodes, you can modulate the TextureRect's colour. Click
 the ``Modulate`` property and use the color picker.
 the ``Modulate`` property and use the color picker.