mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 19:29:06 +00:00
Update ui_introduction_to_the_ui_system.rst
Not all stretch modes of TextureRect was described.
This commit is contained in:
@@ -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 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
|
||||
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 node’s limits
|
||||
|
||||
As with Sprite nodes, you can modulate the TextureRect's colour. Click
|
||||
the ``Modulate`` property and use the color picker.
|
||||
|
||||
Reference in New Issue
Block a user