Update ui_introduction_to_the_ui_system.rst

Not all stretch modes of TextureRect was described.
This commit is contained in:
GetLocalPlayer
2018-04-03 20:55:16 +04:00
committed by GitHub
parent 4b92b7786b
commit c6a77c68af
@@ -76,12 +76,14 @@ TextureRect
It seems similar to the Sprite node but it offers multiple scaling modes.
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 nodes 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 nodes bounding rectangle
- ``Tile`` makes the texture repeat, but it won't scale
- ``Keep`` and ``Keep Centered`` force the texture to remain at its
original size, in the top left corner or the center of the frame
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 nodes limits
As with Sprite nodes, you can modulate the TextureRect's colour. Click
the ``Modulate`` property and use the color picker.