From 8b330feb43f409fd41cb092a1970dcca3f360cc5 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 27 Sep 2022 17:18:16 +0200 Subject: [PATCH] Update the `2d` stretch mode name to `canvas_items` --- about/list_of_features.rst | 2 +- getting_started/first_2d_game/01.project_setup.rst | 6 +++--- tutorials/rendering/multiple_resolutions.rst | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/about/list_of_features.rst b/about/list_of_features.rst index 321ea47fe..386433d24 100644 --- a/about/list_of_features.rst +++ b/about/list_of_features.rst @@ -617,7 +617,7 @@ The editor UI can easily be extended in many ways using add-ons. layouts. - :ref:`Draggable splitter ` layouts. -- Scale to multiple resolutions using the ``2d`` or ``viewport`` stretch modes. +- Scale to multiple resolutions using the ``canvas_items`` or ``viewport`` stretch modes. - Support any aspect ratio using anchors and the ``expand`` stretch aspect. **Theming:** diff --git a/getting_started/first_2d_game/01.project_setup.rst b/getting_started/first_2d_game/01.project_setup.rst index 84a88bf6c..0fd05da77 100644 --- a/getting_started/first_2d_game/01.project_setup.rst +++ b/getting_started/first_2d_game/01.project_setup.rst @@ -55,9 +55,9 @@ window and in the left column, open the *Display -> Window* tab. There, set .. image:: img/setting-project-width-and-height.png -Also, scroll down to the bottom of the section and, under the "Stretch" options, -set ``Mode`` to "2d" and ``Aspect`` to "keep". This ensures that the game scales -consistently on different sized screens. +Also, scroll down to the bottom of the section and, under the **Stretch** +options, set **Mode** to ``canvas_items`` and **Aspect** to ``keep``. This +ensures that the game scales consistently on different sized screens. .. image:: img/setting-stretch-mode.png diff --git a/tutorials/rendering/multiple_resolutions.rst b/tutorials/rendering/multiple_resolutions.rst index 3fab47112..0b3a6b09e 100644 --- a/tutorials/rendering/multiple_resolutions.rst +++ b/tutorials/rendering/multiple_resolutions.rst @@ -273,7 +273,7 @@ Desktop game Note that this will make non-mipmapped textures grainy on low resolution devices, so make sure to follow the instructions described in :ref:`doc_multiple_resolutions_reducing_aliasing_on_downsampling`. -- Set the stretch mode to ``2d``. +- Set the stretch mode to ``canvas_items``. - Set the stretch aspect to ``expand``. This allows for supporting multiple aspect ratios and makes better use of tall smartphone displays (such as 18:9 or 19:9 aspect ratios). - Configure Control nodes' anchors to snap to the correct corners using the **Layout** menu. @@ -296,11 +296,11 @@ Desktop game The ``viewport`` stretch mode provides low-resolution rendering that is then stretched to the final window size. If you are OK with sprites being able to move or rotate in "sub-pixel" positions or wish to have a high resolution 3D - viewport, you should use the ``2d`` stretch mode instead of the ``viewport`` + viewport, you should use the ``canvas_items`` stretch mode instead of the ``viewport`` stretch mode. Godot currently doesn't have a way to enforce integer scaling when using the - ``2d`` or ``viewport`` stretch mode, which means pixel art may look bad if the + ``canvas_items`` or ``viewport`` stretch mode, which means pixel art may look bad if the final window size is not a multiple of the base window size. To fix this, use an add-on such as the `Integer Resolution Handler `__. @@ -320,7 +320,7 @@ to change the display orientation project setting. Note that this will make non-mipmapped textures grainy on low resolution devices, so make sure to follow the instructions described in :ref:`doc_multiple_resolutions_reducing_aliasing_on_downsampling`. -- Set the stretch mode to ``2d``. +- Set the stretch mode to ``canvas_items``. - Set the stretch aspect to ``expand``. This allows for supporting multiple aspect ratios and makes better use of tall smartphone displays (such as 18:9 or 19:9 aspect ratios). - Configure Control nodes' anchors to snap to the correct corners using the **Layout** menu. @@ -339,7 +339,7 @@ Mobile game in portrait mode so make sure to follow the instructions described in :ref:`doc_multiple_resolutions_reducing_aliasing_on_downsampling`. - Set **Display > Window > Handheld > Orientation** to ``portrait``. -- Set the stretch mode to ``2d``. +- Set the stretch mode to ``canvas_items``. - Set the stretch aspect to ``expand``. This allows for supporting multiple aspect ratios and makes better use of tall smartphone displays (such as 18:9 or 19:9 aspect ratios). - Configure Control nodes' anchors to snap to the correct corners using the **Layout** menu.