Skip to content

Commit c362d2e

Browse files
mhilbrunnerGodot Organization
andauthored
classref: Sync with current master branch (540ea0b) (#11384)
Co-authored-by: Godot Organization <[email protected]>
2 parents e4d463e + 28f839e commit c362d2e

12 files changed

+213
-45
lines changed

classes/class_control.rst

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ Properties
141141
+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
142142
| :ref:`Vector2<class_Vector2>` | :ref:`pivot_offset<class_Control_property_pivot_offset>` | ``Vector2(0, 0)`` |
143143
+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
144+
| :ref:`Vector2<class_Vector2>` | :ref:`pivot_offset_ratio<class_Control_property_pivot_offset_ratio>` | ``Vector2(0, 0)`` |
145+
+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
144146
| :ref:`Vector2<class_Vector2>` | :ref:`position<class_Control_property_position>` | ``Vector2(0, 0)`` |
145147
+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+
146148
| :ref:`float<class_float>` | :ref:`rotation<class_Control_property_rotation>` | ``0.0`` |
@@ -235,6 +237,8 @@ Methods
235237
+--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
236238
| :ref:`Vector2<class_Vector2>` | :ref:`get_combined_minimum_size<class_Control_method_get_combined_minimum_size>`\ (\ ) |const| |
237239
+--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
240+
| :ref:`Vector2<class_Vector2>` | :ref:`get_combined_pivot_offset<class_Control_method_get_combined_pivot_offset>`\ (\ ) |const| |
241+
+--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
238242
| :ref:`CursorShape<enum_Control_CursorShape>` | :ref:`get_cursor_shape<class_Control_method_get_cursor_shape>`\ (\ position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |const| |
239243
+--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
240244
| :ref:`Vector2<class_Vector2>` | :ref:`get_end<class_Control_method_get_end>`\ (\ ) |const| |
@@ -1969,7 +1973,28 @@ Offsets are often controlled by one or multiple parent :ref:`Container<class_Con
19691973
- |void| **set_pivot_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
19701974
- :ref:`Vector2<class_Vector2>` **get_pivot_offset**\ (\ )
19711975

1972-
By default, the node's pivot is its top-left corner. When you change its :ref:`rotation<class_Control_property_rotation>` or :ref:`scale<class_Control_property_scale>`, it will rotate or scale around this pivot. Set this property to :ref:`size<class_Control_property_size>` / 2 to pivot around the Control's center.
1976+
By default, the node's pivot is its top-left corner. When you change its :ref:`rotation<class_Control_property_rotation>` or :ref:`scale<class_Control_property_scale>`, it will rotate or scale around this pivot.
1977+
1978+
The actual offset is the combined value of this property and :ref:`pivot_offset_ratio<class_Control_property_pivot_offset_ratio>`.
1979+
1980+
.. rst-class:: classref-item-separator
1981+
1982+
----
1983+
1984+
.. _class_Control_property_pivot_offset_ratio:
1985+
1986+
.. rst-class:: classref-property
1987+
1988+
:ref:`Vector2<class_Vector2>` **pivot_offset_ratio** = ``Vector2(0, 0)`` :ref:`🔗<class_Control_property_pivot_offset_ratio>`
1989+
1990+
.. rst-class:: classref-property-setget
1991+
1992+
- |void| **set_pivot_offset_ratio**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
1993+
- :ref:`Vector2<class_Vector2>` **get_pivot_offset_ratio**\ (\ )
1994+
1995+
Same as :ref:`pivot_offset<class_Control_property_pivot_offset>`, but expressed as uniform vector, where ``Vector2(0, 0)`` is the top-left corner of this control, and ``Vector2(1, 1)`` is its bottom-right corner. Set this property to ``Vector2(0.5, 0.5)`` to pivot around this control's center.
1996+
1997+
The actual offset is the combined value of this property and :ref:`pivot_offset<class_Control_property_pivot_offset>`.
19731998

19741999
.. rst-class:: classref-item-separator
19752000

@@ -2852,6 +2877,18 @@ Returns combined minimum size from :ref:`custom_minimum_size<class_Control_prope
28522877

28532878
----
28542879

2880+
.. _class_Control_method_get_combined_pivot_offset:
2881+
2882+
.. rst-class:: classref-method
2883+
2884+
:ref:`Vector2<class_Vector2>` **get_combined_pivot_offset**\ (\ ) |const| :ref:`🔗<class_Control_method_get_combined_pivot_offset>`
2885+
2886+
Returns the combined value of :ref:`pivot_offset<class_Control_property_pivot_offset>` and :ref:`pivot_offset_ratio<class_Control_property_pivot_offset_ratio>`, in pixels. The ratio is multiplied by the control's size.
2887+
2888+
.. rst-class:: classref-item-separator
2889+
2890+
----
2891+
28552892
.. _class_Control_method_get_cursor_shape:
28562893

28572894
.. rst-class:: classref-method

classes/class_editorsettings.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ Properties
195195
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
196196
| :ref:`int<class_int>` | :ref:`editors/3d/navigation/zoom_style<class_EditorSettings_property_editors/3d/navigation/zoom_style>` |
197197
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
198+
| :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/angle_snap_threshold<class_EditorSettings_property_editors/3d/navigation_feel/angle_snap_threshold>` |
199+
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
198200
| :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/orbit_inertia<class_EditorSettings_property_editors/3d/navigation_feel/orbit_inertia>` |
199201
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
200202
| :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/orbit_sensitivity<class_EditorSettings_property_editors/3d/navigation_feel/orbit_sensitivity>` |
@@ -1871,6 +1873,18 @@ The mouse cursor movement direction to use when zooming by moving the mouse. Thi
18711873

18721874
----
18731875

1876+
.. _class_EditorSettings_property_editors/3d/navigation_feel/angle_snap_threshold:
1877+
1878+
.. rst-class:: classref-property
1879+
1880+
:ref:`float<class_float>` **editors/3d/navigation_feel/angle_snap_threshold** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation_feel/angle_snap_threshold>`
1881+
1882+
The angle threshold for snapping camera rotation to 45-degree angles while orbiting with :kbd:`Alt` held.
1883+
1884+
.. rst-class:: classref-item-separator
1885+
1886+
----
1887+
18741888
.. _class_EditorSettings_property_editors/3d/navigation_feel/orbit_inertia:
18751889

18761890
.. rst-class:: classref-property
@@ -5832,7 +5846,7 @@ How many script names can be highlighted at most, if :ref:`text_editor/script_li
58325846

58335847
:ref:`bool<class_bool>` **text_editor/script_list/show_members_overview** :ref:`🔗<class_EditorSettings_property_text_editor/script_list/show_members_overview>`
58345848

5835-
If ``true``, displays an overview of the current script's member variables and functions at the left of the script editor. See also :ref:`text_editor/script_list/sort_members_outline_alphabetically<class_EditorSettings_property_text_editor/script_list/sort_members_outline_alphabetically>`.
5849+
If ``true``, displays an overview of the current script's member functions at the left of the script editor. See also :ref:`text_editor/script_list/sort_members_outline_alphabetically<class_EditorSettings_property_text_editor/script_list/sort_members_outline_alphabetically>`.
58365850

58375851
.. rst-class:: classref-item-separator
58385852

classes/class_editortranslationparserplugin.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Description
2121

2222
**EditorTranslationParserPlugin** is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the :ref:`_parse_file()<class_EditorTranslationParserPlugin_private_method__parse_file>` method in script.
2323

24-
The return value should be an :ref:`Array<class_Array>` of :ref:`PackedStringArray<class_PackedStringArray>`\ s, one for each extracted translatable string. Each entry should contain ``[msgid, msgctxt, msgid_plural, comment]``, where all except ``msgid`` are optional. Empty strings will be ignored.
24+
The return value should be an :ref:`Array<class_Array>` of :ref:`PackedStringArray<class_PackedStringArray>`\ s, one for each extracted translatable string. Each entry should contain ``[msgid, msgctxt, msgid_plural, comment, source_line]``, where all except ``msgid`` are optional. Empty strings will be ignored.
2525

2626
The extracted strings will be written into a POT file selected by user under "POT Generation" in "Localization" tab in "Project Settings" menu.
2727

@@ -78,24 +78,24 @@ Below shows an example of a custom parser that extracts strings from a CSV file
7878

7979

8080

81-
To add a translatable string associated with a context, plural, or comment:
81+
To add a translatable string associated with a context, plural, comment, or source line:
8282

8383

8484
.. tabs::
8585

8686
.. code-tab:: gdscript
8787

88-
# This will add a message with msgid "Test 1", msgctxt "context", msgid_plural "test 1 plurals", and comment "test 1 comment".
89-
ret.append(PackedStringArray(["Test 1", "context", "test 1 plurals", "test 1 comment"]))
88+
# This will add a message with msgid "Test 1", msgctxt "context", msgid_plural "test 1 plurals", comment "test 1 comment", and source line "7".
89+
ret.append(PackedStringArray(["Test 1", "context", "test 1 plurals", "test 1 comment", "7"]))
9090
# This will add a message with msgid "A test without context" and msgid_plural "plurals".
9191
ret.append(PackedStringArray(["A test without context", "", "plurals"]))
9292
# This will add a message with msgid "Only with context" and msgctxt "a friendly context".
9393
ret.append(PackedStringArray(["Only with context", "a friendly context"]))
9494

9595
.. code-tab:: csharp
9696

97-
// This will add a message with msgid "Test 1", msgctxt "context", msgid_plural "test 1 plurals", and comment "test 1 comment".
98-
ret.Add(["Test 1", "context", "test 1 plurals", "test 1 comment"]);
97+
// This will add a message with msgid "Test 1", msgctxt "context", msgid_plural "test 1 plurals", comment "test 1 comment", and source line "7".
98+
ret.Add(["Test 1", "context", "test 1 plurals", "test 1 comment", "7"]);
9999
// This will add a message with msgid "A test without context" and msgid_plural "plurals".
100100
ret.Add(["A test without context", "", "plurals"]);
101101
// This will add a message with msgid "Only with context" and msgctxt "a friendly context".

0 commit comments

Comments
 (0)