Bladeren bron

Sync classref with current source

Rémi Verschelde 6 jaren geleden
bovenliggende
commit
3f9e8f98b8

+ 7 - 6
classes/[email protected]

@@ -884,7 +884,7 @@ Random range, any floating point value between ``from`` and ``to``.
 
 ::
 
-    prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263
+    prints(rand_range(0, 1), rand_range(0, 1)) # prints e.g. 0.135591 0.405263
 
 .. _class_@GDScript_method_rand_seed:
 
@@ -900,19 +900,20 @@ Returns a random floating point value on the interval ``[0, 1]``.
 
 ::
 
-    randf() # returns 0.375671
+    randf() # returns e.g. 0.375671
 
 .. _class_@GDScript_method_randi:
 
 - :ref:`int<class_int>` **randi** **(** **)**
 
-Returns a random 32 bit integer. Use remainder to obtain a random value in the interval ``[0, N]`` (where N is smaller than 2^32 -1).
+Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval ``[0, N]`` (where N is smaller than 2^32 -1).
 
 ::
 
-    randi() % 20      # returns random number between 0 and 19
-    randi() % 100     # returns random number between 0 and 99
-    randi() % 100 + 1 # returns random number between 1 and 100
+    randi()           # returns random integer between 0 and 2^32 - 1
+    randi() % 20      # returns random integer between 0 and 19
+    randi() % 100     # returns random integer between 0 and 99
+    randi() % 100 + 1 # returns random integer between 1 and 100
 
 .. _class_@GDScript_method_randomize:
 

+ 32 - 32
classes/class_array.rst

@@ -94,7 +94,7 @@ Methods
 Description
 -----------
 
-Generic array, contains several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example:
+Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example:
 
 ::
 
@@ -114,43 +114,43 @@ Method Descriptions
 
 - :ref:`Array<class_Array>` **Array** **(** :ref:`PoolColorArray<class_PoolColorArray>` from **)**
 
-Construct an array from a :ref:`PoolColorArray<class_PoolColorArray>`.
+Constructs an array from a :ref:`PoolColorArray<class_PoolColorArray>`.
 
 - :ref:`Array<class_Array>` **Array** **(** :ref:`PoolVector3Array<class_PoolVector3Array>` from **)**
 
-Construct an array from a :ref:`PoolVector3Array<class_PoolVector3Array>`.
+Constructs an array from a :ref:`PoolVector3Array<class_PoolVector3Array>`.
 
 - :ref:`Array<class_Array>` **Array** **(** :ref:`PoolVector2Array<class_PoolVector2Array>` from **)**
 
-Construct an array from a :ref:`PoolVector2Array<class_PoolVector2Array>`.
+Constructs an array from a :ref:`PoolVector2Array<class_PoolVector2Array>`.
 
 - :ref:`Array<class_Array>` **Array** **(** :ref:`PoolStringArray<class_PoolStringArray>` from **)**
 
-Construct an array from a :ref:`PoolStringArray<class_PoolStringArray>`.
+Constructs an array from a :ref:`PoolStringArray<class_PoolStringArray>`.
 
 - :ref:`Array<class_Array>` **Array** **(** :ref:`PoolRealArray<class_PoolRealArray>` from **)**
 
-Construct an array from a :ref:`PoolRealArray<class_PoolRealArray>`.
+Constructs an array from a :ref:`PoolRealArray<class_PoolRealArray>`.
 
 - :ref:`Array<class_Array>` **Array** **(** :ref:`PoolIntArray<class_PoolIntArray>` from **)**
 
-Construct an array from a :ref:`PoolIntArray<class_PoolIntArray>`.
+Constructs an array from a :ref:`PoolIntArray<class_PoolIntArray>`.
 
 - :ref:`Array<class_Array>` **Array** **(** :ref:`PoolByteArray<class_PoolByteArray>` from **)**
 
-Construct an array from a :ref:`PoolByteArray<class_PoolByteArray>`.
+Constructs an array from a :ref:`PoolByteArray<class_PoolByteArray>`.
 
 .. _class_Array_method_append:
 
 - void **append** **(** :ref:`Variant<class_Variant>` value **)**
 
-Append an element at the end of the array (alias of :ref:`push_back<class_Array_method_push_back>`).
+Appends an element at the end of the array (alias of :ref:`push_back<class_Array_method_push_back>`).
 
 .. _class_Array_method_back:
 
 - :ref:`Variant<class_Variant>` **back** **(** **)**
 
-Returns the last element of the array if the array is not empty (size>0).
+Returns the last element of the array if the array is not empty.
 
 .. _class_Array_method_bsearch:
 
@@ -168,13 +168,13 @@ Finds the index of an existing value (or the insertion index that maintains sort
 
 - void **clear** **(** **)**
 
-Clear the array (resize to 0).
+Clears the array (resizes to 0).
 
 .. _class_Array_method_count:
 
 - :ref:`int<class_int>` **count** **(** :ref:`Variant<class_Variant>` value **)**
 
-Return the amount of times an element is in the array.
+Returns the number of times an element is in the array.
 
 .. _class_Array_method_duplicate:
 
@@ -182,19 +182,19 @@ Return the amount of times an element is in the array.
 
 Returns a copy of the array.
 
-If ``deep`` is ``true``, a deep copy is be performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If ``false``, a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
+If ``deep`` is ``true``, a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If ``false``, a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
 
 .. _class_Array_method_empty:
 
 - :ref:`bool<class_bool>` **empty** **(** **)**
 
-Return true if the array is empty (size==0).
+Returns ``true`` if the array is empty.
 
 .. _class_Array_method_erase:
 
 - void **erase** **(** :ref:`Variant<class_Variant>` value **)**
 
-Remove the first occurrence of a value from the array.
+Removes the first occurrence of a value from the array.
 
 .. _class_Array_method_find:
 
@@ -212,13 +212,13 @@ Searches the array in reverse order for a value and returns its index or -1 if n
 
 - :ref:`Variant<class_Variant>` **front** **(** **)**
 
-Returns the first element of the array if the array is not empty (size>0).
+Returns the first element of the array if the array is not empty.
 
 .. _class_Array_method_has:
 
 - :ref:`bool<class_bool>` **has** **(** :ref:`Variant<class_Variant>` value **)**
 
-Return true if the array contains given value.
+Returns ``true`` if the array contains the given value.
 
 ::
 
@@ -231,67 +231,67 @@ Return true if the array contains given value.
 
 - :ref:`int<class_int>` **hash** **(** **)**
 
-Return a hashed integer value representing the array contents.
+Returns a hashed integer value representing the array contents.
 
 .. _class_Array_method_insert:
 
 - void **insert** **(** :ref:`int<class_int>` position, :ref:`Variant<class_Variant>` value **)**
 
-Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``pos == size()``).
+Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``pos == size()``).
 
 .. _class_Array_method_invert:
 
 - void **invert** **(** **)**
 
-Reverse the order of the elements in the array.
+Reverses the order of the elements in the array.
 
 .. _class_Array_method_max:
 
 - :ref:`Variant<class_Variant>` **max** **(** **)**
 
-Return maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned.
+Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned.
 
 .. _class_Array_method_min:
 
 - :ref:`Variant<class_Variant>` **min** **(** **)**
 
-Return minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned.
+Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned.
 
 .. _class_Array_method_pop_back:
 
 - :ref:`Variant<class_Variant>` **pop_back** **(** **)**
 
-Remove the last element of the array.
+Removes the last element of the array.
 
 .. _class_Array_method_pop_front:
 
 - :ref:`Variant<class_Variant>` **pop_front** **(** **)**
 
-Remove the first element of the array.
+Removes the first element of the array.
 
 .. _class_Array_method_push_back:
 
 - void **push_back** **(** :ref:`Variant<class_Variant>` value **)**
 
-Append an element at the end of the array.
+Appends an element at the end of the array.
 
 .. _class_Array_method_push_front:
 
 - void **push_front** **(** :ref:`Variant<class_Variant>` value **)**
 
-Add an element at the beginning of the array.
+Adds an element at the beginning of the array.
 
 .. _class_Array_method_remove:
 
 - void **remove** **(** :ref:`int<class_int>` position **)**
 
-Remove an element from the array by index.
+Removes an element from the array by index.
 
 .. _class_Array_method_resize:
 
 - void **resize** **(** :ref:`int<class_int>` size **)**
 
-Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
+Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
 
 .. _class_Array_method_rfind:
 
@@ -303,25 +303,25 @@ Searches the array in reverse order. Optionally, a start search index can be pas
 
 - void **shuffle** **(** **)**
 
-Shuffle the array such that the items will have a random order.
+Shuffles the array such that the items will have a random order.
 
 .. _class_Array_method_size:
 
 - :ref:`int<class_int>` **size** **(** **)**
 
-Return the amount of elements in the array.
+Returns the number of elements in the array.
 
 .. _class_Array_method_sort:
 
 - void **sort** **(** **)**
 
-Sort the array using natural order.
+Sorts the array. Note: strings are sorted in alphabetical, not natural order.
 
 .. _class_Array_method_sort_custom:
 
 - void **sort_custom** **(** :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func **)**
 
-Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
+Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
 
 **Note:** you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
 

+ 1 - 1
classes/class_collisionpolygon.rst

@@ -69,5 +69,5 @@ If true, no collision will be produced.
 | *Getter* | get_polygon()      |
 +----------+--------------------+
 
-Array of vertices which define the polygon.
+Array of vertices which define the polygon. Note that the returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the ``polygon`` member.
 

+ 1 - 1
classes/class_collisionpolygon2d.rst

@@ -110,5 +110,5 @@ If ``true``, only edges that face up, relative to CollisionPolygon2D's rotation,
 | *Getter* | get_polygon()      |
 +----------+--------------------+
 
-The polygon's list of vertices. The final point will be connected to the first.
+The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference.
 

+ 2 - 2
classes/class_control.rst

@@ -570,7 +570,7 @@ Godot sends input events to the scene's root node first, by calling :ref:`Node._
 
 Only one ``Control`` node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call :ref:`grab_focus<class_Control_method_grab_focus>`. ``Control`` nodes lose focus when another node grabs it, or if you hide the node in focus.
 
-Set :ref:`mouse_filter<class_Control_property_mouse_filter>` to MOUSE_FILTER_IGNORE to tell a ``Control`` node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
+Set :ref:`mouse_filter<class_Control_property_mouse_filter>` to :ref:`MOUSE_FILTER_IGNORE<class_Control_constant_MOUSE_FILTER_IGNORE>` to tell a ``Control`` node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
 
 :ref:`Theme<class_Theme>` resources change the Control's appearance. If you change the :ref:`Theme<class_Theme>` on a ``Control`` node, it affects all of its children. To override some of the theme's parameters, call one of the ``add_*_override`` methods, like :ref:`add_font_override<class_Control_method_add_font_override>`. You can override the theme with the inspector.
 
@@ -744,7 +744,7 @@ Controls the direction on the vertical axis in which the control should grow if
 | *Setter* | set_tooltip(value) |
 +----------+--------------------+
 
-Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments.
+Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter<class_Control_property_mouse_filter>` property is not :ref:`MOUSE_FILTER_IGNORE<class_Control_constant_MOUSE_FILTER_IGNORE>`.
 
 .. _class_Control_property_margin_bottom:
 

+ 2 - 0
classes/class_cpuparticles.rst

@@ -412,6 +412,8 @@ Property Descriptions
 | *Getter* | get_color_ramp()      |
 +----------+-----------------------+
 
+Each particle's vertex color will vary along this :ref:`GradientTexture<class_GradientTexture>`.
+
 .. _class_CPUParticles_property_damping:
 
 - :ref:`float<class_float>` **damping**

+ 2 - 2
classes/class_editorspatialgizmo.rst

@@ -28,7 +28,7 @@ Methods
 +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | void                                                            | :ref:`add_lines<class_EditorSpatialGizmo_method_add_lines>` **(** :ref:`PoolVector3Array<class_PoolVector3Array>` lines, :ref:`Material<class_Material>` material, :ref:`bool<class_bool>` billboard=false **)**                                                |
 +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| void                                                            | :ref:`add_mesh<class_EditorSpatialGizmo_method_add_mesh>` **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh, :ref:`bool<class_bool>` billboard=false, :ref:`RID<class_RID>` skeleton **)**                                                                           |
+| void                                                            | :ref:`add_mesh<class_EditorSpatialGizmo_method_add_mesh>` **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh, :ref:`bool<class_bool>` billboard=false, :ref:`RID<class_RID>` skeleton, :ref:`Material<class_Material>` material=null **)**                            |
 +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | void                                                            | :ref:`add_unscaled_billboard<class_EditorSpatialGizmo_method_add_unscaled_billboard>` **(** :ref:`Material<class_Material>` material, :ref:`float<class_float>` default_scale=1 **)**                                                                           |
 +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -89,7 +89,7 @@ Add lines to the gizmo (as sets of 2 points), with a given material. The lines a
 
 .. _class_EditorSpatialGizmo_method_add_mesh:
 
-- void **add_mesh** **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh, :ref:`bool<class_bool>` billboard=false, :ref:`RID<class_RID>` skeleton **)**
+- void **add_mesh** **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh, :ref:`bool<class_bool>` billboard=false, :ref:`RID<class_RID>` skeleton, :ref:`Material<class_Material>` material=null **)**
 
 .. _class_EditorSpatialGizmo_method_add_unscaled_billboard:
 

+ 11 - 0
classes/class_engine.rst

@@ -207,12 +207,23 @@ Returns the current engine version information in a Dictionary.
 
 "patch"    - Holds the patch version number as an int
 
+"hex"      - Holds the full version number encoded as an hexadecimal int with one byte (2 places) per number (see example below)
+
 "status"   - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
 
 "build"    - Holds the build name (e.g. "custom-build") as a String
 
 "string"   - major + minor + patch + status + build in a single String
 
+The "hex" value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be ``0x03010C``. Note that it's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code:
+
+::
+
+    if Engine.get_version_info().hex >= 0x030200:
+        # do things specific to version 3.2 or later
+    else:
+        # do things specific to versions before 3.2
+
 .. _class_Engine_method_has_singleton:
 
 - :ref:`bool<class_bool>` **has_singleton** **(** :ref:`String<class_String>` name **)** const

+ 18 - 1
classes/class_int.rst

@@ -28,7 +28,24 @@ Methods
 Description
 -----------
 
-Integer built-in type.
+Signed 64-bit integer type.
+
+It can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around.
+
+``int`` is a :ref:`Variant<class_Variant>` type, and will thus be used when assigning an integer value to a :ref:`Variant<class_Variant>`. It can also be enforced with the ``: int`` type hint.
+
+::
+
+    var my_variant = 0    # int, value 0
+    my_variant += 4.2     # float, value 4.2
+    var my_int: int = 1   # int, value 1
+    my_int = 4.2          # int, value 4, the right value is implicitly cast to int
+    my_int = int("6.7")   # int, value 6, the String is explicitly cast with [method int]
+    
+    var max_int = 9223372036854775807
+    print(max_int)        # 9223372036854775807, OK
+    max_int += 1
+    print(max_int)        # -9223372036854775808, we overflowed and wrapped around
 
 Method Descriptions
 -------------------

+ 1 - 1
classes/class_label.rst

@@ -125,7 +125,7 @@ Description
 
 Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use :ref:`RichTextLabel<class_RichTextLabel>` instead.
 
-Note that contrarily to most other :ref:`Control<class_Control>`\ s, Label's :ref:`Control.mouse_filter<class_Control_property_mouse_filter>` defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events).
+Note that contrarily to most other :ref:`Control<class_Control>`\ s, Label's :ref:`Control.mouse_filter<class_Control_property_mouse_filter>` defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured :ref:`Control.hint_tooltip<class_Control_property_hint_tooltip>`, unless you change its mouse filter.
 
 Property Descriptions
 ---------------------

+ 1 - 1
classes/class_occluderpolygon2d.rst

@@ -88,5 +88,5 @@ Set the direction of the occlusion culling when not ``CULL_DISABLED``. Default v
 | *Getter* | get_polygon()      |
 +----------+--------------------+
 
-A :ref:`Vector2<class_Vector2>` array with the index for polygon's vertices positions.
+A :ref:`Vector2<class_Vector2>` array with the index for polygon's vertices positions. Note that the returned value is a copy of the underlying array, rather than a reference.
 

+ 1 - 1
classes/class_polygon2d.rst

@@ -168,7 +168,7 @@ The offset applied to each vertex.
 | *Getter* | get_polygon()      |
 +----------+--------------------+
 
-The polygon's list of vertices. The final point will be connected to the first.
+The polygon's list of vertices. The final point will be connected to the first. Note that this returns a copy of the :ref:`PoolVector2Array<class_PoolVector2Array>` rather than a reference.
 
 .. _class_Polygon2D_property_polygons:
 

+ 14 - 14
classes/class_projectsettings.rst

@@ -146,17 +146,17 @@ Properties
 +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`Vector2<class_Vector2>`       | :ref:`display/mouse_cursor/custom_image_hotspot<class_ProjectSettings_property_display/mouse_cursor/custom_image_hotspot>`                                           |
 +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| :ref:`bool<class_bool>`             | :ref:`display/window/allow_per_pixel_transparency<class_ProjectSettings_property_display/window/allow_per_pixel_transparency>`                                       |
-+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`bool<class_bool>`             | :ref:`display/window/dpi/allow_hidpi<class_ProjectSettings_property_display/window/dpi/allow_hidpi>`                                                                 |
 +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`bool<class_bool>`             | :ref:`display/window/energy_saving/keep_screen_on<class_ProjectSettings_property_display/window/energy_saving/keep_screen_on>`                                       |
 +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`String<class_String>`         | :ref:`display/window/handheld/orientation<class_ProjectSettings_property_display/window/handheld/orientation>`                                                       |
 +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| :ref:`bool<class_bool>`             | :ref:`display/window/per_pixel_transparency<class_ProjectSettings_property_display/window/per_pixel_transparency>`                                                   |
+| :ref:`bool<class_bool>`             | :ref:`display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>`                                   |
++-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| :ref:`bool<class_bool>`             | :ref:`display/window/per_pixel_transparency/enabled<class_ProjectSettings_property_display/window/per_pixel_transparency/enabled>`                                   |
 +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| :ref:`bool<class_bool>`             | :ref:`display/window/per_pixel_transparency_splash<class_ProjectSettings_property_display/window/per_pixel_transparency_splash>`                                     |
+| :ref:`bool<class_bool>`             | :ref:`display/window/per_pixel_transparency/splash<class_ProjectSettings_property_display/window/per_pixel_transparency/splash>`                                     |
 +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`bool<class_bool>`             | :ref:`display/window/size/always_on_top<class_ProjectSettings_property_display/window/size/always_on_top>`                                                           |
 +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -894,12 +894,6 @@ Custom image for the mouse cursor.
 
 Hotspot for the custom mouse cursor image.
 
-.. _class_ProjectSettings_property_display/window/allow_per_pixel_transparency:
-
-- :ref:`bool<class_bool>` **display/window/allow_per_pixel_transparency**
-
-Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off.
-
 .. _class_ProjectSettings_property_display/window/dpi/allow_hidpi:
 
 - :ref:`bool<class_bool>` **display/window/dpi/allow_hidpi**
@@ -918,13 +912,19 @@ Force keep the screen on, so the screensaver does not take over. Works on Deskto
 
 Default orientation for cell phone or tablet.
 
-.. _class_ProjectSettings_property_display/window/per_pixel_transparency:
+.. _class_ProjectSettings_property_display/window/per_pixel_transparency/allowed:
+
+- :ref:`bool<class_bool>` **display/window/per_pixel_transparency/allowed**
+
+Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off.
+
+.. _class_ProjectSettings_property_display/window/per_pixel_transparency/enabled:
 
-- :ref:`bool<class_bool>` **display/window/per_pixel_transparency**
+- :ref:`bool<class_bool>` **display/window/per_pixel_transparency/enabled**
 
-.. _class_ProjectSettings_property_display/window/per_pixel_transparency_splash:
+.. _class_ProjectSettings_property_display/window/per_pixel_transparency/splash:
 
-- :ref:`bool<class_bool>` **display/window/per_pixel_transparency_splash**
+- :ref:`bool<class_bool>` **display/window/per_pixel_transparency/splash**
 
 .. _class_ProjectSettings_property_display/window/size/always_on_top:
 

+ 9 - 0
classes/class_scenetree.rst

@@ -428,6 +428,15 @@ Changes to the given :ref:`PackedScene<class_PackedScene>`.
 
 Returns a :ref:`SceneTreeTimer<class_SceneTreeTimer>` which will :ref:`SceneTreeTimer.timeout<class_SceneTreeTimer_signal_timeout>` after the given time in seconds elapsed in this SceneTree. If ``pause_mode_process`` is set to false, pausing the SceneTree will also pause the timer.
 
+Commonly used to create a one-shot delay timer as in the following example:
+
+::
+
+    func some_function():
+        print("start")
+        yield(get_tree().create_timer(1.0), "timeout")
+        print("end")
+
 .. _class_SceneTree_method_get_frame:
 
 - :ref:`int<class_int>` **get_frame** **(** **)** const

+ 19 - 1
classes/class_scenetreetimer.rst

@@ -14,7 +14,7 @@ SceneTreeTimer
 Brief Description
 -----------------
 
-
+One-shot timer.
 
 Properties
 ----------
@@ -30,6 +30,22 @@ Signals
 
 - **timeout** **(** **)**
 
+Emitted when the timer reaches 0.
+
+Description
+-----------
+
+A one-shot timer managed by the scene tree, which emits :ref:`timeout<class_SceneTreeTimer_signal_timeout>` on completion. See also :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>`.
+
+As opposed to :ref:`Timer<class_Timer>`, it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example:
+
+::
+
+    func some_function():
+    print("start")
+    yield(get_tree().create_timer(1.0), "timeout")
+    print("end")
+
 Property Descriptions
 ---------------------
 
@@ -43,3 +59,5 @@ Property Descriptions
 | *Getter* | get_time_left()      |
 +----------+----------------------+
 
+The time remaining.
+

+ 23 - 1
classes/class_stylebox.rst

@@ -68,6 +68,14 @@ Property Descriptions
 | *Getter* | get_default_margin()      |
 +----------+---------------------------+
 
+The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.
+
+If this value is negative, it is ignored and a child-specific margin is used instead. For example for :ref:`StyleBoxFlat<class_StyleBoxFlat>` the border thickness (if any) is used instead.
+
+It is up to the code using this style box to decide what these contents are: for example, a :ref:`Button<class_Button>` respects this content margin for the textual contents of the button.
+
+:ref:`get_margin<class_StyleBox_method_get_margin>` should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above.
+
 .. _class_StyleBox_property_content_margin_left:
 
 - :ref:`float<class_float>` **content_margin_left**
@@ -78,6 +86,10 @@ Property Descriptions
 | *Getter* | get_default_margin()      |
 +----------+---------------------------+
 
+The left margin for the contents of this style box.	Increasing this value reduces the space available to the contents from the left.
+
+Refer to :ref:`content_margin_bottom<class_StyleBox_property_content_margin_bottom>` for extra considerations.
+
 .. _class_StyleBox_property_content_margin_right:
 
 - :ref:`float<class_float>` **content_margin_right**
@@ -88,6 +100,10 @@ Property Descriptions
 | *Getter* | get_default_margin()      |
 +----------+---------------------------+
 
+The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.
+
+Refer to :ref:`content_margin_bottom<class_StyleBox_property_content_margin_bottom>` for extra considerations.
+
 .. _class_StyleBox_property_content_margin_top:
 
 - :ref:`float<class_float>` **content_margin_top**
@@ -98,6 +114,10 @@ Property Descriptions
 | *Getter* | get_default_margin()      |
 +----------+---------------------------+
 
+The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.
+
+Refer to :ref:`content_margin_bottom<class_StyleBox_property_content_margin_bottom>` for extra considerations.
+
 Method Descriptions
 -------------------
 
@@ -117,7 +137,9 @@ Method Descriptions
 
 - :ref:`float<class_float>` **get_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
 
-Return the offset of margin "margin" (see MARGIN\_\* enum).
+Return the content margin offset for the specified margin
+
+Positive values reduce size inwards, unlike :ref:`Control<class_Control>`'s margin values.
 
 .. _class_StyleBox_method_get_minimum_size:
 

+ 42 - 0
classes/class_styleboxtexture.rst

@@ -134,6 +134,8 @@ Property Descriptions
 | *Getter* | get_expand_margin_size()      |
 +----------+-------------------------------+
 
+Expands the bottom margin of this style box when drawing, causing it be drawn larger than requested.
+
 .. _class_StyleBoxTexture_property_expand_margin_left:
 
 - :ref:`float<class_float>` **expand_margin_left**
@@ -144,6 +146,8 @@ Property Descriptions
 | *Getter* | get_expand_margin_size()      |
 +----------+-------------------------------+
 
+Expands the left margin of this style box when drawing, causing it be drawn larger than requested.
+
 .. _class_StyleBoxTexture_property_expand_margin_right:
 
 - :ref:`float<class_float>` **expand_margin_right**
@@ -154,6 +158,8 @@ Property Descriptions
 | *Getter* | get_expand_margin_size()      |
 +----------+-------------------------------+
 
+Expands the right margin of this style box when drawing, causing it be drawn larger than requested.
+
 .. _class_StyleBoxTexture_property_expand_margin_top:
 
 - :ref:`float<class_float>` **expand_margin_top**
@@ -164,6 +170,8 @@ Property Descriptions
 | *Getter* | get_expand_margin_size()      |
 +----------+-------------------------------+
 
+Expands the top margin of this style box when drawing, causing it be drawn larger than requested.
+
 .. _class_StyleBoxTexture_property_margin_bottom:
 
 - :ref:`float<class_float>` **margin_bottom**
@@ -174,6 +182,12 @@ Property Descriptions
 | *Getter* | get_margin_size()      |
 +----------+------------------------+
 
+Increases the bottom margin of the 3x3 texture box.
+
+A higher value means more of the source texture is considered to be part of the bottom border of the 3x3 box.
+
+This is also the value used as fallback for :ref:`StyleBox.content_margin_bottom<class_StyleBox_property_content_margin_bottom>` if it is negative.
+
 .. _class_StyleBoxTexture_property_margin_left:
 
 - :ref:`float<class_float>` **margin_left**
@@ -184,6 +198,12 @@ Property Descriptions
 | *Getter* | get_margin_size()      |
 +----------+------------------------+
 
+Increases the left margin of the 3x3 texture box.
+
+A higher value means more of the source texture is considered to be part of the left border of the 3x3 box.
+
+This is also the value used as fallback for :ref:`StyleBox.content_margin_left<class_StyleBox_property_content_margin_left>` if it is negative.
+
 .. _class_StyleBoxTexture_property_margin_right:
 
 - :ref:`float<class_float>` **margin_right**
@@ -194,6 +214,12 @@ Property Descriptions
 | *Getter* | get_margin_size()      |
 +----------+------------------------+
 
+Increases the right margin of the 3x3 texture box.
+
+A higher value means more of the source texture is considered to be part of the right border of the 3x3 box.
+
+This is also the value used as fallback for :ref:`StyleBox.content_margin_right<class_StyleBox_property_content_margin_right>` if it is negative.
+
 .. _class_StyleBoxTexture_property_margin_top:
 
 - :ref:`float<class_float>` **margin_top**
@@ -204,6 +230,12 @@ Property Descriptions
 | *Getter* | get_margin_size()      |
 +----------+------------------------+
 
+Increases the top margin of the 3x3 texture box.
+
+A higher value means more of the source texture is considered to be part of the top border of the 3x3 box.
+
+This is also the value used as fallback for :ref:`StyleBox.content_margin_top<class_StyleBox_property_content_margin_top>` if it is negative.
+
 .. _class_StyleBoxTexture_property_modulate_color:
 
 - :ref:`Color<class_Color>` **modulate_color**
@@ -214,6 +246,8 @@ Property Descriptions
 | *Getter* | get_modulate()      |
 +----------+---------------------+
 
+Modulates the color of the texture when this style box is drawn.
+
 .. _class_StyleBoxTexture_property_normal_map:
 
 - :ref:`Texture<class_Texture>` **normal_map**
@@ -224,6 +258,8 @@ Property Descriptions
 | *Getter* | get_normal_map()      |
 +----------+-----------------------+
 
+The normal map to use when drawing this style box.
+
 .. _class_StyleBoxTexture_property_region_rect:
 
 - :ref:`Rect2<class_Rect2>` **region_rect**
@@ -234,6 +270,10 @@ Property Descriptions
 | *Getter* | get_region_rect()      |
 +----------+------------------------+
 
+Species a sub region of the texture to use.
+
+This is equivalent to first wrapping the texture in an :ref:`AtlasTexture<class_AtlasTexture>` with the same region.
+
 .. _class_StyleBoxTexture_property_texture:
 
 - :ref:`Texture<class_Texture>` **texture**
@@ -244,6 +284,8 @@ Property Descriptions
 | *Getter* | get_texture()      |
 +----------+--------------------+
 
+The texture to use when drawing this style box.
+
 Method Descriptions
 -------------------
 

+ 14 - 12
classes/class_undoredo.rst

@@ -60,11 +60,11 @@ Enumerations
 
 enum **MergeMode**:
 
-- **MERGE_DISABLE** = **0**
+- **MERGE_DISABLE** = **0** --- Makes ``do``/``undo`` operations stay in separate actions.
 
-- **MERGE_ENDS** = **1**
+- **MERGE_ENDS** = **1** --- Makes so that the action's ``do`` operation is from the first action created and the ``undo`` operation is from the last subsequent action with the same name.
 
-- **MERGE_ALL** = **2**
+- **MERGE_ALL** = **2** --- Makes subsequent actions with the same name be merged into one.
 
 Description
 -----------
@@ -77,22 +77,22 @@ Here's an example on how to add an action to Godot editor's own 'undoredo':
 
 ::
 
-    var undoredo = get_undo_redo() # method of EditorPlugin
+    var undo_redo = get_undo_redo() # Method of EditorPlugin.
     
     func do_something():
-        pass # put your code here
+        pass # Put your code here.
     
     func undo_something():
-        pass # put here the code that reverts what's done by "do_something()"
+        pass # Put here the code that reverts what's done by "do_something()".
     
     func _on_MyButton_pressed():
         var node = get_node("MyNode2D")
-        undoredo.create_action("Move the node")
-        undoredo.add_do_method(self, "do_something")
-        undoredo.add_undo_method(self, "undo_something")
-        undoredo.add_do_property(node, "position", Vector2(100,100))
-        undoredo.add_undo_property(node, "position", node.position)
-        undoredo.commit_action()
+        undo_redo.create_action("Move the node")
+        undo_redo.add_do_method(self, "do_something")
+        undo_redo.add_undo_method(self, "undo_something")
+        undo_redo.add_do_property(node, "position", Vector2(100,100))
+        undo_redo.add_undo_property(node, "position", node.position)
+        undo_redo.commit_action()
 
 :ref:`create_action<class_UndoRedo_method_create_action>`, :ref:`add_do_method<class_UndoRedo_method_add_do_method>`, :ref:`add_undo_method<class_UndoRedo_method_add_undo_method>`, :ref:`add_do_property<class_UndoRedo_method_add_do_property>`, :ref:`add_undo_property<class_UndoRedo_method_add_undo_property>`, and :ref:`commit_action<class_UndoRedo_method_commit_action>` should be called one after the other, like in the example. Not doing so could lead to crashes.
 
@@ -157,6 +157,8 @@ Commit the action. All 'do' methods/properties are called/set when this function
 
 Create a new action. After this is called, do all your calls to :ref:`add_do_method<class_UndoRedo_method_add_do_method>`, :ref:`add_undo_method<class_UndoRedo_method_add_undo_method>`, :ref:`add_do_property<class_UndoRedo_method_add_do_property>`, and :ref:`add_undo_property<class_UndoRedo_method_add_undo_property>`, then commit the action with :ref:`commit_action<class_UndoRedo_method_commit_action>`.
 
+The way actions are merged is dictated by the ``merge_mode`` argument. See :ref:`MergeMode<enum_UndoRedo_MergeMode>` for details.
+
 .. _class_UndoRedo_method_get_current_action_name:
 
 - :ref:`String<class_String>` **get_current_action_name** **(** **)** const

+ 6 - 1
classes/class_viewport.rst

@@ -726,7 +726,12 @@ Returns the size override set with :ref:`set_size_override<class_Viewport_method
 
 - :ref:`ViewportTexture<class_ViewportTexture>` **get_texture** **(** **)** const
 
-Returns the viewport's texture.
+Returns the viewport's texture. Note that due to the way OpenGL works, the resulting :ref:`ViewportTexture<class_ViewportTexture>` is flipped vertically. You can use :ref:`Image.flip_y<class_Image_method_flip_y>` on the result of :ref:`Texture.get_data<class_Texture_method_get_data>` to flip it back, for example:
+
+::
+
+    var img = get_viewport().get_texture().get_data()
+    img.flip_y()
 
 .. _class_Viewport_method_get_viewport_rid: