From 4f5d503b25e68388f223aa6c2d519f13a5ac8253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 7 Jan 2019 10:08:00 +0100 Subject: [PATCH] Sync classref with current source --- classes/class_@gdscript.rst | 27 +++- classes/class_animationnode.rst | 8 +- classes/class_area.rst | 14 +- classes/class_area2d.rst | 14 +- classes/class_audiostream.rst | 2 +- classes/class_basebutton.rst | 2 +- classes/class_camera2d.rst | 118 ++++++++------ classes/class_control.rst | 102 ++++++++----- classes/class_curve2d.rst | 34 ++--- classes/class_curve3d.rst | 44 +++--- classes/class_editorimportplugin.rst | 8 +- classes/class_editorplugin.rst | 12 ++ classes/class_editorspatialgizmoplugin.rst | 122 +++++++++++++++ classes/class_filedialog.rst | 2 +- classes/class_float.rst | 6 +- classes/class_gradienttexture.rst | 2 +- classes/class_gridcontainer.rst | 2 +- classes/class_gridmap.rst | 2 +- classes/class_httprequest.rst | 8 +- classes/class_imagetexture.rst | 14 +- classes/class_inputmap.rst | 2 +- classes/class_joint.rst | 8 +- classes/class_lineedit.rst | 32 ++-- classes/class_mutex.rst | 2 +- classes/class_navigation.rst | 2 +- classes/class_navigation2d.rst | 2 +- classes/class_node.rst | 6 +- classes/class_os.rst | 2 +- classes/class_particlesmaterial.rst | 2 +- classes/class_physics2ddirectspacestate.rst | 2 +- classes/class_physicsdirectspacestate.rst | 4 +- classes/class_physicsserver.rst | 2 +- classes/class_poolbytearray.rst | 16 +- classes/class_poolcolorarray.rst | 8 +- classes/class_poolintarray.rst | 10 +- classes/class_poolrealarray.rst | 10 +- classes/class_poolstringarray.rst | 12 +- classes/class_poolvector2array.rst | 10 +- classes/class_poolvector3array.rst | 10 +- classes/class_rect2.rst | 2 +- classes/class_resource.rst | 2 +- classes/class_richtextlabel.rst | 6 +- classes/class_rigidbody.rst | 4 +- classes/class_rigidbody2d.rst | 2 +- classes/class_scenetree.rst | 2 +- classes/class_scrollcontainer.rst | 2 +- classes/class_semaphore.rst | 4 +- classes/class_sliderjoint.rst | 2 +- classes/class_spatial.rst | 26 ++-- classes/class_staticbody.rst | 4 +- classes/class_streampeertcp.rst | 4 +- classes/class_string.rst | 16 +- classes/class_styleboxflat.rst | 6 +- classes/class_texturebutton.rst | 2 +- classes/class_tileset.rst | 144 +++++++++++++++++- classes/class_timer.rst | 4 +- .../class_visualscriptbasictypeconstant.rst | 2 +- classes/class_visualscriptbuiltinfunc.rst | 4 +- classes/class_visualscriptclassconstant.rst | 2 +- classes/class_visualserver.rst | 6 +- classes/class_websocketpeer.rst | 2 +- 61 files changed, 632 insertions(+), 301 deletions(-) create mode 100644 classes/class_editorspatialgizmoplugin.rst diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 9a431e2e6..1c817b9ae 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -535,6 +535,25 @@ Returns a reference to the specified function ``funcname`` in the ``instance`` n - :ref:`Array` **get_stack** **(** **)** +Returns an array of dictionaries representing the current call stack. + +:: + + func _ready(): + foo() + + func foo(): + bar() + + func bar(): + print(get_stack()) + +would print + +:: + + [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}] + .. _class_@GDScript_hash: - :ref:`int` **hash** **(** :ref:`Variant` var **)** @@ -594,17 +613,19 @@ Returns a normalized value considering the given range. - :ref:`bool` **is_inf** **(** :ref:`float` s **)** -Returns True/False whether ``s`` is an infinity value (either positive infinity or negative infinity). +Returns whether ``s`` is an infinity value (either positive infinity or negative infinity). .. _class_@GDScript_is_instance_valid: - :ref:`bool` **is_instance_valid** **(** :ref:`Object` instance **)** +Returns whether ``instance`` is a valid object (e.g. has not been deleted from memory). + .. _class_@GDScript_is_nan: - :ref:`bool` **is_nan** **(** :ref:`float` s **)** -Returns True/False whether ``s`` is a NaN (Not-A-Number) value. +Returns whether ``s`` is a NaN (Not-A-Number) value. .. _class_@GDScript_len: @@ -756,6 +777,8 @@ Converts one or more arguments to strings in the best way possible and prints th - void **print_debug** **(** **)** vararg +Like :ref:`print`, but prints only when used in debug mode. + .. _class_@GDScript_print_stack: - void **print_stack** **(** **)** diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 607d105c5..e858ee177 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -135,7 +135,7 @@ Blend an animation by "blend" amount (name must be valid in the linked :ref:`Ani - :ref:`float` **blend_input** **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** -Blend an input. This is only useful for nodes created for an AnimationBlendTree. Time is a delta, unless "seek" is true, in which case it is absolute. A filter mode may be optionally passed. +Blend an input. This is only useful for nodes created for an :ref:`AnimationNodeBlendTree`. Time is a delta, unless "seek" is true, in which case it is absolute. A filter mode may be optionally passed. .. _class_AnimationNode_blend_node: @@ -165,7 +165,7 @@ Get all children nodes, in order as a name:node dictionary. Only useful when inh - :ref:`int` **get_input_count** **(** **)** const -Amount of inputs in this node, only useful for nodes that go into AnimationBlendTree. +Amount of inputs in this node, only useful for nodes that go into :ref:`AnimationNodeBlendTree`. .. _class_AnimationNode_get_input_name: @@ -189,9 +189,7 @@ Get the default value of a parameter. Parameters are custom local memory used fo - :ref:`Array` **get_parameter_list** **(** **)** virtual -Get the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. - -Format is similar to Object.get_property_list +Get the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. .. _class_AnimationNode_has_filter: diff --git a/classes/class_area.rst b/classes/class_area.rst index 05c1c9b66..1057f409e 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -138,13 +138,13 @@ enum **SpaceOverride**: - **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping. -- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order). +- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order). -- **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order), ignoring any lower priority areas. +- **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order), ignoring any lower priority areas. - **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. -- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas. +- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in :ref:`priority` order), but keeps calculating the rest of the areas. Description ----------- @@ -200,7 +200,7 @@ If ``true``, the area's audio bus overrides the default audio bus. Default value | *Getter* | get_collision_layer() | +----------+----------------------------+ -The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also ``collision_mask``. +The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also :ref:`collision_mask`. .. _class_Area_collision_mask: @@ -248,7 +248,7 @@ The falloff factor for point gravity. The greater the value, the faster gravity | *Getter* | is_gravity_a_point() | +----------+-----------------------------+ -If ``true``, gravity is calculated from a point (set via ``gravity_vec``). Also see ``space_override``. Default value: ``false``. +If ``true``, gravity is calculated from a point (set via :ref:`gravity_vec`). Also see :ref:`space_override`. Default value: ``false``. .. _class_Area_gravity_vec: @@ -260,7 +260,7 @@ If ``true``, gravity is calculated from a point (set via ``gravity_vec``). Also | *Getter* | get_gravity_vector() | +----------+---------------------------+ -The area's gravity vector (not normalized). If gravity is a point (see :ref:`is_gravity_a_point`), this will be the point of attraction. +The area's gravity vector (not normalized). If gravity is a point (see :ref:`gravity_point`), this will be the point of attraction. .. _class_Area_linear_damp: @@ -368,7 +368,7 @@ The degree to which this area's reverb is a uniform effect. Ranges from ``0`` to | *Getter* | get_space_override_mode() | +----------+--------------------------------+ -Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE\_\* constants for values. +Override mode for gravity and damping calculations within this area. See :ref:`SpaceOverride` for possible values. Method Descriptions ------------------- diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 54bfa93e7..a939570cb 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -130,13 +130,13 @@ enum **SpaceOverride**: - **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping. -- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order). +- **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order). -- **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order), ignoring any lower priority areas. +- **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority` order), ignoring any lower priority areas. - **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. -- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas. +- **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in :ref:`priority` order), but keeps calculating the rest of the areas. Description ----------- @@ -192,7 +192,7 @@ If ``true``, the area's audio bus overrides the default audio bus. Default value | *Getter* | get_collision_layer() | +----------+----------------------------+ -The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also ``collision_mask``. +The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also :ref:`collision_mask`. .. _class_Area2D_collision_mask: @@ -240,7 +240,7 @@ The falloff factor for point gravity. The greater the value, the faster gravity | *Getter* | is_gravity_a_point() | +----------+-----------------------------+ -If ``true``, gravity is calculated from a point (set via ``gravity_vec``). Also see ``space_override``. Default value: ``false``. +If ``true``, gravity is calculated from a point (set via :ref:`gravity_vec`). Also see :ref:`space_override`. Default value: ``false``. .. _class_Area2D_gravity_vec: @@ -252,7 +252,7 @@ If ``true``, gravity is calculated from a point (set via ``gravity_vec``). Also | *Getter* | get_gravity_vector() | +----------+---------------------------+ -The area's gravity vector (not normalized). If gravity is a point (see :ref:`is_gravity_a_point`), this will be the point of attraction. +The area's gravity vector (not normalized). If gravity is a point (see :ref:`gravity_point`), this will be the point of attraction. .. _class_Area2D_linear_damp: @@ -312,7 +312,7 @@ The area's priority. Higher priority areas are processed first. Default value: 0 | *Getter* | get_space_override_mode() | +----------+--------------------------------+ -Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE\_\* constants for values. +Override mode for gravity and damping calculations within this area. See :ref:`SpaceOverride` for possible values. Method Descriptions ------------------- diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index f08e527d4..babb1e179 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -28,7 +28,7 @@ Methods Description ----------- -Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a Sample. +Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via :ref:`AudioStreamSample`) and OGG (via :ref:`AudioStreamOGGVorbis`) file formats. Tutorials --------- diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index 8ce8cf0cb..1860d059d 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -198,7 +198,7 @@ If ``true``, the button's state is pressed. Means the button is pressed down or | *Getter* | get_shortcut() | +----------+---------------------+ -Shortcut associated to the button. +:ref:`ShortCut` associated to the button. .. _class_BaseButton_shortcut_in_tooltip: diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 5ad159a75..a9a919103 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -19,55 +19,57 @@ Camera node for 2D scenes. Properties ---------- -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`AnchorMode` | :ref:`anchor_mode` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`current` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`custom_viewport` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`drag_margin_bottom` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`drag_margin_h_enabled` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`drag_margin_left` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`drag_margin_right` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`drag_margin_top` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`drag_margin_v_enabled` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editor_draw_drag_margin` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editor_draw_limits` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editor_draw_screen` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`int` | :ref:`limit_bottom` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`int` | :ref:`limit_left` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`int` | :ref:`limit_right` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`limit_smoothed` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`int` | :ref:`limit_top` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`offset` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`offset_h` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`offset_v` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rotating` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`smoothing_enabled` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`smoothing_speed` | -+---------------------------------------------+------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`zoom` | -+---------------------------------------------+------------------------------------------------------------------------+ ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`AnchorMode` | :ref:`anchor_mode` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`current` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`custom_viewport` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`drag_margin_bottom` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`drag_margin_h_enabled` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`drag_margin_left` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`drag_margin_right` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`drag_margin_top` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`drag_margin_v_enabled` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editor_draw_drag_margin` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editor_draw_limits` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editor_draw_screen` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`int` | :ref:`limit_bottom` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`int` | :ref:`limit_left` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`int` | :ref:`limit_right` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`limit_smoothed` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`int` | :ref:`limit_top` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`offset` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`offset_h` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`offset_v` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`Camera2DProcessMode` | :ref:`process_mode` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`rotating` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`smoothing_enabled` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`smoothing_speed` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`zoom` | ++---------------------------------------------------------------+------------------------------------------------------------------------+ Methods ------- @@ -99,6 +101,14 @@ enum **AnchorMode**: - **ANCHOR_MODE_DRAG_CENTER** = **1** --- The camera's position takes into account vertical/horizontal offsets and the screen size. +.. _enum_Camera2D_Camera2DProcessMode: + +enum **Camera2DProcessMode**: + +- **CAMERA2D_PROCESS_PHYSICS** = **0** + +- **CAMERA2D_PROCESS_IDLE** = **1** + Description ----------- @@ -347,6 +357,16 @@ The horizontal offset of the camera, relative to the drag margins. Default value The vertical offset of the camera, relative to the drag margins. Default value: ``0`` +.. _class_Camera2D_process_mode: + +- :ref:`Camera2DProcessMode` **process_mode** + ++----------+-------------------------+ +| *Setter* | set_process_mode(value) | ++----------+-------------------------+ +| *Getter* | get_process_mode() | ++----------+-------------------------+ + .. _class_Camera2D_rotating: - :ref:`bool` **rotating** diff --git a/classes/class_control.rst b/classes/class_control.rst index 6b8dc6f35..40542aca4 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -288,7 +288,7 @@ enum **FocusMode**: enum **CursorShape**: -- **CURSOR_ARROW** = **0** --- Show the system's arrow mouse cursor when the user hovers the node. Use with :ref:`set_default_cursor_shape`. +- **CURSOR_ARROW** = **0** --- Show the system's arrow mouse cursor when the user hovers the node. Use with :ref:`mouse_default_cursor_shape`. - **CURSOR_IBEAM** = **1** --- Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text. @@ -326,37 +326,37 @@ enum **CursorShape**: enum **LayoutPreset**: -- **PRESET_TOP_LEFT** = **0** --- Snap all 4 anchors to the top-left of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_TOP_LEFT** = **0** --- Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_TOP_RIGHT** = **1** --- Snap all 4 anchors to the top-right of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_TOP_RIGHT** = **1** --- Snap all 4 anchors to the top-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_BOTTOM_LEFT** = **2** --- Snap all 4 anchors to the bottom-left of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_BOTTOM_LEFT** = **2** --- Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_BOTTOM_RIGHT** = **3** --- Snap all 4 anchors to the bottom-right of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_BOTTOM_RIGHT** = **3** --- Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_CENTER_LEFT** = **4** --- Snap all 4 anchors to the center of the left edge of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_CENTER_LEFT** = **4** --- Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_CENTER_TOP** = **5** --- Snap all 4 anchors to the center of the top edge of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_CENTER_TOP** = **5** --- Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_CENTER_RIGHT** = **6** --- Snap all 4 anchors to the center of the right edge of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_CENTER_RIGHT** = **6** --- Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_CENTER_BOTTOM** = **7** --- Snap all 4 anchors to the center of the bottom edge of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_CENTER_BOTTOM** = **7** --- Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_CENTER** = **8** --- Snap all 4 anchors to the center of the parent container's bounds. Use with :ref:`set_anchors_preset`. +- **PRESET_CENTER** = **8** --- Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:`set_anchors_preset`. -- **PRESET_LEFT_WIDE** = **9** --- Snap all 4 anchors to the left edge of the parent container. The left margin becomes relative to the left edge and the top margin relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset`. +- **PRESET_LEFT_WIDE** = **9** --- Snap all 4 anchors to the left edge of the parent control. The left margin becomes relative to the left edge and the top margin relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset`. -- **PRESET_TOP_WIDE** = **10** --- Snap all 4 anchors to the top edge of the parent container. The left margin becomes relative to the top left corner, the top margin relative to the top edge, and the right margin relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. +- **PRESET_TOP_WIDE** = **10** --- Snap all 4 anchors to the top edge of the parent control. The left margin becomes relative to the top left corner, the top margin relative to the top edge, and the right margin relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. -- **PRESET_RIGHT_WIDE** = **11** --- Snap all 4 anchors to the right edge of the parent container. The right margin becomes relative to the right edge and the top margin relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. +- **PRESET_RIGHT_WIDE** = **11** --- Snap all 4 anchors to the right edge of the parent control. The right margin becomes relative to the right edge and the top margin relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. -- **PRESET_BOTTOM_WIDE** = **12** --- Snap all 4 anchors to the bottom edge of the parent container. The left margin becomes relative to the bottom left corner, the bottom margin relative to the bottom edge, and the right margin relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset`. +- **PRESET_BOTTOM_WIDE** = **12** --- Snap all 4 anchors to the bottom edge of the parent control. The left margin becomes relative to the bottom left corner, the bottom margin relative to the bottom edge, and the right margin relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset`. -- **PRESET_VCENTER_WIDE** = **13** --- Snap all 4 anchors to a vertical line that cuts the parent container in half. Use with :ref:`set_anchors_preset`. +- **PRESET_VCENTER_WIDE** = **13** --- Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. -- **PRESET_HCENTER_WIDE** = **14** --- Snap all 4 anchors to a horizontal line that cuts the parent container in half. Use with :ref:`set_anchors_preset`. +- **PRESET_HCENTER_WIDE** = **14** --- Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. -- **PRESET_WIDE** = **15** --- Snap all 4 anchors to the respective corners of the parent container. Set all 4 margins to 0 after you applied this preset and the ``Control`` will fit its parent container. Use with :ref:`set_anchors_preset`. +- **PRESET_WIDE** = **15** --- Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the ``Control`` will fit its parent control. This is equivalent to to the "Full Rect" layout option in the editor. Use with :ref:`set_anchors_preset`. .. _enum_Control_LayoutPresetMode: @@ -390,7 +390,7 @@ enum **MouseFilter**: - **MOUSE_FILTER_STOP** = **0** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. These events are automatically marked as handled and they will not propagate further to other controls. -- **MOUSE_FILTER_PASS** = **1** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. If this control does not handle the event, the parent control (if any) will be considered for a mouse click, and so on until there is no more parent control to potentially handle it. Even if no control handled it at all, the event will still be handled automatically. +- **MOUSE_FILTER_PASS** = **1** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. If this control does not handle the event, the parent control (if any) will be considered for a mouse click, and so on until there is no more parent control to potentially handle it. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. - **MOUSE_FILTER_IGNORE** = **2** --- The control will not receive mouse button input events through :ref:`_gui_input` and will not block other controls from receiving these events. These events will also not be handled automatically. @@ -398,11 +398,11 @@ enum **MouseFilter**: enum **GrowDirection**: -- **GROW_DIRECTION_BEGIN** = **0** +- **GROW_DIRECTION_BEGIN** = **0** --- The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. -- **GROW_DIRECTION_END** = **1** +- **GROW_DIRECTION_END** = **1** --- The control wil grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis. -- **GROW_DIRECTION_BOTH** = **2** +- **GROW_DIRECTION_BOTH** = **2** --- The control wil grow in both directions equally to make up if its minimum size is changed to be greater than its current size. .. _enum_Control_Anchor: @@ -425,13 +425,13 @@ Constants - **NOTIFICATION_FOCUS_EXIT** = **44** --- Sent when the node loses focus. -- **NOTIFICATION_THEME_CHANGED** = **45** --- Sent when the node's :ref:`theme` changes, right before Godot redraws the control. Happens when you call one of the ``add_*_override`` +- **NOTIFICATION_THEME_CHANGED** = **45** --- Sent when the node's :ref:`theme` changes, right before Godot redraws the control. Happens when you call one of the ``add_*_override`` methods. - **NOTIFICATION_MODAL_CLOSE** = **46** --- Sent when an open modal dialog closes. See :ref:`show_modal`. -- **NOTIFICATION_SCROLL_BEGIN** = **47** +- **NOTIFICATION_SCROLL_BEGIN** = **47** --- Sent when this node is inside a :ref:`ScrollContainer` which has begun being scrolled. -- **NOTIFICATION_SCROLL_END** = **48** +- **NOTIFICATION_SCROLL_END** = **48** --- Sent when this node is inside a :ref:`ScrollContainer` which has stopped being scrolled. Description ----------- @@ -468,7 +468,7 @@ Property Descriptions | *Getter* | get_anchor() | +----------+--------------+ -Anchors the bottom edge of the node to the origin, the center, or the end of its parent container. It changes how the bottom margin updates when the node moves or changes size. Use one of the ``ANCHOR_*`` constants. Default value: ``ANCHOR_BEGIN``. +Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: ``ANCHOR_BEGIN``. .. _class_Control_anchor_left: @@ -478,7 +478,7 @@ Anchors the bottom edge of the node to the origin, the center, or the end of its | *Getter* | get_anchor() | +----------+--------------+ -Anchors the left edge of the node to the origin, the center or the end of its parent container. It changes how the left margin updates when the node moves or changes size. Use one of the ``ANCHOR_*`` constants. Default value: ``ANCHOR_BEGIN``. +Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience.Default value: ``ANCHOR_BEGIN``. .. _class_Control_anchor_right: @@ -488,7 +488,7 @@ Anchors the left edge of the node to the origin, the center or the end of its pa | *Getter* | get_anchor() | +----------+--------------+ -Anchors the right edge of the node to the origin, the center or the end of its parent container. It changes how the right margin updates when the node moves or changes size. Use one of the ``ANCHOR_*`` constants. Default value: ``ANCHOR_BEGIN``. +Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: ``ANCHOR_BEGIN``. .. _class_Control_anchor_top: @@ -498,7 +498,7 @@ Anchors the right edge of the node to the origin, the center or the end of its p | *Getter* | get_anchor() | +----------+--------------+ -Anchors the top edge of the node to the origin, the center or the end of its parent container. It changes how the top margin updates when the node moves or changes size. Use one of the ``ANCHOR_*`` constants. Default value: ``ANCHOR_BEGIN``. +Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the ``ANCHOR_*`` constants for convenience. Default value: ``ANCHOR_BEGIN``. .. _class_Control_focus_mode: @@ -522,9 +522,7 @@ The focus access mode for the control (None, Click or All). Only one Control can | *Getter* | get_focus_neighbour() | +----------+----------------------------+ -Tells Godot which node it should give keyboard focus to if the user presses Tab, the down arrow on the keyboard, or down on a gamepad. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. - -If the user presses Tab, Godot will give focus to the closest node to the right first, then to the bottom. If the user presses Shift+Tab, Godot will look to the left of the node, then above it. +Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the ``ui_down`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. .. _class_Control_focus_neighbour_left: @@ -536,7 +534,7 @@ If the user presses Tab, Godot will give focus to the closest node to the right | *Getter* | get_focus_neighbour() | +----------+----------------------------+ -Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the left arrow on the keyboard or left on a gamepad. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the left of this one. +Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the ``ui_left`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the left of this one. .. _class_Control_focus_neighbour_right: @@ -548,7 +546,7 @@ Tells Godot which node it should give keyboard focus to if the user presses Shif | *Getter* | get_focus_neighbour() | +----------+----------------------------+ -Tells Godot which node it should give keyboard focus to if the user presses Tab, the right arrow on the keyboard or right on a gamepad. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. +Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the ``ui_right`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. .. _class_Control_focus_neighbour_top: @@ -560,7 +558,7 @@ Tells Godot which node it should give keyboard focus to if the user presses Tab, | *Getter* | get_focus_neighbour() | +----------+----------------------------+ -Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the top arrow on the keyboard or top on a gamepad. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. +Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the ``ui_top`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. .. _class_Control_focus_next: @@ -572,6 +570,10 @@ Tells Godot which node it should give keyboard focus to if the user presses Shif | *Getter* | get_focus_next() | +----------+-----------------------+ +Tells Godot which node it should give keyboard focus to if the user presses Tab on a keyboard by default. You can change the key by editing the ``ui_focus_next`` input action. + +If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. + .. _class_Control_focus_previous: - :ref:`NodePath` **focus_previous** @@ -582,6 +584,10 @@ Tells Godot which node it should give keyboard focus to if the user presses Shif | *Getter* | get_focus_previous() | +----------+---------------------------+ +Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab on a keyboard by default. You can change the key by editing the ``ui_focus_prev`` input action. + +If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. + .. _class_Control_grow_horizontal: - :ref:`GrowDirection` **grow_horizontal** @@ -592,6 +598,8 @@ Tells Godot which node it should give keyboard focus to if the user presses Shif | *Getter* | get_h_grow_direction() | +----------+-----------------------------+ +Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. + .. _class_Control_grow_vertical: - :ref:`GrowDirection` **grow_vertical** @@ -602,6 +610,8 @@ Tells Godot which node it should give keyboard focus to if the user presses Shif | *Getter* | get_v_grow_direction() | +----------+-----------------------------+ +Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. + .. _class_Control_hint_tooltip: - :ref:`String` **hint_tooltip** @@ -622,9 +632,9 @@ Changes the tooltip text. The tooltip appears when the user's mouse cursor stays | *Getter* | get_margin() | +----------+-------------------+ -Distance between the node's bottom edge and its parent container, based on :ref:`anchor_bottom`. +Distance between the node's bottom edge and its parent control, based on :ref:`anchor_bottom`. -Margins are often controlled by one or multiple parent :ref:`Container` nodes. Margins update automatically when you move or resize the node. +Margins are often controlled by one or multiple parent :ref:`Container` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container`. Margins update automatically when you move or resize the node. .. _class_Control_margin_left: @@ -636,7 +646,9 @@ Margins are often controlled by one or multiple parent :ref:`Container`. +Distance between the node's left edge and its parent control, based on :ref:`anchor_left`. + +Margins are often controlled by one or multiple parent :ref:`Container` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container`. Margins update automatically when you move or resize the node. .. _class_Control_margin_right: @@ -648,7 +660,9 @@ Distance between the node's left edge and its parent container, based on :ref:`a | *Getter* | get_margin() | +----------+-------------------+ -Distance between the node's right edge and its parent container, based on :ref:`anchor_right`. +Distance between the node's right edge and its parent control, based on :ref:`anchor_right`. + +Margins are often controlled by one or multiple parent :ref:`Container` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container`. Margins update automatically when you move or resize the node. .. _class_Control_margin_top: @@ -660,7 +674,9 @@ Distance between the node's right edge and its parent container, based on :ref:` | *Getter* | get_margin() | +----------+-------------------+ -Distance between the node's top edge and its parent container, based on :ref:`anchor_top`. +Distance between the node's top edge and its parent control, based on :ref:`anchor_top`. + +Margins are often controlled by one or multiple parent :ref:`Container` nodes, so you should not modify them manually if your node is a direct child of a :ref:`Container`. Margins update automatically when you move or resize the node. .. _class_Control_mouse_default_cursor_shape: @@ -686,7 +702,7 @@ The default cursor shape for this control. Useful for Godot plugins and applicat | *Getter* | get_mouse_filter() | +----------+-------------------------+ -Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input` and how these events should be handled. Use one of the ``MOUSE_FILTER_*`` constants. See the constants to learn what each does. +Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input` and how these events should be handled. See the constants to learn what each does. .. _class_Control_rect_clip_content: @@ -698,6 +714,8 @@ Controls whether the control will be able to receive mouse button input events t | *Getter* | is_clipping_contents() | +----------+--------------------------+ +Enables whether rendering of children should be clipped to this control's rectangle. If true, parts of a child which would be visibly outside of this control's rectangle will not be rendered. + .. _class_Control_rect_global_position: - :ref:`Vector2` **rect_global_position** @@ -895,7 +913,7 @@ Overrides the ``name`` shader in the :ref:`theme` resource - void **add_stylebox_override** **(** :ref:`String` name, :ref:`StyleBox` stylebox **)** -Overrides the ``name`` Stylebox in the :ref:`theme` resource the node uses. If ``stylebox`` is empty, Godot clears the override. +Overrides the ``name`` :ref:`StyleBox` in the :ref:`theme` resource the node uses. If ``stylebox`` is empty, Godot clears the override. .. _class_Control_can_drop_data: @@ -1053,7 +1071,7 @@ Returns the tooltip, which will appear when the cursor is resting over this cont - void **grab_focus** **(** **)** -Steal the focus from another control and become the focused control (see :ref:`set_focus_mode`). +Steal the focus from another control and become the focused control (see :ref:`focus_mode`). .. _class_Control_has_color: diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index ee3d007ec..0765f10d3 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -93,9 +93,9 @@ Method Descriptions - void **add_point** **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2( 0, 0 ), :ref:`Vector2` out=Vector2( 0, 0 ), :ref:`int` at_position=-1 **)** -Adds a point to a curve, at "position", with control points "in" and "out". +Adds a point to a curve, at ``position``, with control points ``in`` and ``out``. -If "at_position" is given, the point is inserted before the point number "at_position", moving that point (and every point after) after the inserted point. If "at_position" is not given, or is an illegal value (at_position <0 or at_position >= :ref:`get_point_count`), the point will be appended at the end of the point list. +If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. .. _class_Curve2D_clear_points: @@ -107,7 +107,7 @@ Removes all points from the curve. - :ref:`float` **get_baked_length** **(** **)** const -Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`set_bake_interval`), it should be approximate enough. +Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`bake_interval`), it should be approximate enough. .. _class_Curve2D_get_baked_points: @@ -141,35 +141,35 @@ Returns the number of points describing the curve. - :ref:`Vector2` **get_point_in** **(** :ref:`int` idx **)** const -Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). +Returns the position of the control point leading to the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0)``. .. _class_Curve2D_get_point_out: - :ref:`Vector2` **get_point_out** **(** :ref:`int` idx **)** const -Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). +Returns the position of the control point leading out of the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0)``. .. _class_Curve2D_get_point_position: - :ref:`Vector2` **get_point_position** **(** :ref:`int` idx **)** const -Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). +Returns the position of the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0)``. .. _class_Curve2D_interpolate: - :ref:`Vector2` **interpolate** **(** :ref:`int` idx, :ref:`float` t **)** const -Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. +Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 >= t <=1``) give strange, but predictable results. -If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0). +If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t`` is ignored. If the curve has no points, the function sends an error to the console, and returns ``(0, 0)``. .. _class_Curve2D_interpolate_baked: - :ref:`Vector2` **interpolate_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const -Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve. +Returns a point within the curve at position ``offset``, where ``offset`` is measured as a pixel distance along the curve. -To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. +To do that, it finds the two cached points where the ``offset`` lies between, then interpolates the values. This interpolation is cubic if ``cubic`` is set to true, or linear if set to false. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). @@ -177,31 +177,31 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and - :ref:`Vector2` **interpolatef** **(** :ref:`float` fofs **)** const -Returns the position at the vertex "fofs". It calls :ref:`interpolate` using the integer part of fofs as "idx", and its fractional part as "t". +Returns the position at the vertex ``fofs``. It calls :ref:`interpolate` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. .. _class_Curve2D_remove_point: - void **remove_point** **(** :ref:`int` idx **)** -Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. +Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. .. _class_Curve2D_set_point_in: - void **set_point_in** **(** :ref:`int` idx, :ref:`Vector2` position **)** -Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. +Sets the position of the control point leading to the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. .. _class_Curve2D_set_point_out: - void **set_point_out** **(** :ref:`int` idx, :ref:`Vector2` position **)** -Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. +Sets the position of the control point leading out of the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. .. _class_Curve2D_set_point_position: - void **set_point_position** **(** :ref:`int` idx, :ref:`Vector2` position **)** -Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. +Sets the position for the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. .. _class_Curve2D_tessellate: @@ -211,7 +211,7 @@ Returns a list of points along the curve, with a curvature controlled point dens This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. -"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! +``max_stages`` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! -"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. +``tolerance_degrees`` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 157f5b2b4..0cf5614b2 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -117,9 +117,9 @@ Method Descriptions - void **add_point** **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3( 0, 0, 0 ), :ref:`Vector3` out=Vector3( 0, 0, 0 ), :ref:`int` at_position=-1 **)** -Adds a point to a curve, at "position", with control points "in" and "out". +Adds a point to a curve, at ``position``, with control points ``in`` and ``out``. -If "at_position" is given, the point is inserted before the point number "at_position", moving that point (and every point after) after the inserted point. If "at_position" is not given, or is an illegal value (at_position <0 or at_position >= :ref:`get_point_count`), the point will be appended at the end of the point list. +If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. .. _class_Curve3D_clear_points: @@ -131,7 +131,7 @@ Removes all points from the curve. - :ref:`float` **get_baked_length** **(** **)** const -Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`set_bake_interval`), it should be approximate enough. +Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`bake_interval`), it should be approximate enough. .. _class_Curve3D_get_baked_points: @@ -143,7 +143,7 @@ Returns the cache of points as a :ref:`PoolVector3Array` - :ref:`PoolRealArray` **get_baked_tilts** **(** **)** const -Returns the cache of tilts as a RealArray. +Returns the cache of tilts as a :ref:`PoolRealArray`. .. _class_Curve3D_get_baked_up_vectors: @@ -157,7 +157,7 @@ If :ref:`up_vector_enabled` is ``false``, the c - :ref:`float` **get_closest_offset** **(** :ref:`Vector3` to_point **)** const -Returns the closest offset to ``to_point``. This offset is meant to be used in one of the interpolate_baked\* methods. +Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`interpolate_baked` or :ref:`interpolate_baked_up_vector`. ``to_point`` must be in this curve's local space. @@ -179,41 +179,41 @@ Returns the number of points describing the curve. - :ref:`Vector3` **get_point_in** **(** :ref:`int` idx **)** const -Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). +Returns the position of the control point leading to the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0, 0)``. .. _class_Curve3D_get_point_out: - :ref:`Vector3` **get_point_out** **(** :ref:`int` idx **)** const -Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). +Returns the position of the control point leading out of the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0, 0)``. .. _class_Curve3D_get_point_position: - :ref:`Vector3` **get_point_position** **(** :ref:`int` idx **)** const -Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). +Returns the position of the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0, 0)``. .. _class_Curve3D_get_point_tilt: - :ref:`float` **get_point_tilt** **(** :ref:`int` idx **)** const -Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0. +Returns the tilt angle in radians for the point ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``0``. .. _class_Curve3D_interpolate: - :ref:`Vector3` **interpolate** **(** :ref:`int` idx, :ref:`float` t **)** const -Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. +Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 >= t <=1``) give strange, but predictable results. -If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0). +If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t`` is ignored. If the curve has no points, the function sends an error to the console, and returns ``(0, 0, 0)``. .. _class_Curve3D_interpolate_baked: - :ref:`Vector3` **interpolate_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const -Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve. +Returns a point within the curve at position ``offset``, where ``offset`` is measured as a pixel distance along the curve. -To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. +To do that, it finds the two cached points where the ``offset`` lies between, then interpolates the values. This interpolation is cubic if ``cubic`` is set to true, or linear if set to false. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). @@ -225,43 +225,43 @@ Returns an up vector within the curve at position ``offset``, where ``offset`` i To do that, it finds the two cached up vectors where the ``offset`` lies between, then interpolates the values. If ``apply_tilt`` is ``true``, an interpolated tilt is applied to the interpolated up vector. -If the curve has no up vectors, the function sends an error to the console, and returns (0, 1, 0). +If the curve has no up vectors, the function sends an error to the console, and returns ``(0, 1, 0)``. .. _class_Curve3D_interpolatef: - :ref:`Vector3` **interpolatef** **(** :ref:`float` fofs **)** const -Returns the position at the vertex "fofs". It calls :ref:`interpolate` using the integer part of fofs as "idx", and its fractional part as "t". +Returns the position at the vertex ``fofs``. It calls :ref:`interpolate` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. .. _class_Curve3D_remove_point: - void **remove_point** **(** :ref:`int` idx **)** -Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. +Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. .. _class_Curve3D_set_point_in: - void **set_point_in** **(** :ref:`int` idx, :ref:`Vector3` position **)** -Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. +Sets the position of the control point leading to the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. .. _class_Curve3D_set_point_out: - void **set_point_out** **(** :ref:`int` idx, :ref:`Vector3` position **)** -Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. +Sets the position of the control point leading out of the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. .. _class_Curve3D_set_point_position: - void **set_point_position** **(** :ref:`int` idx, :ref:`Vector3` position **)** -Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. +Sets the position for the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. .. _class_Curve3D_set_point_tilt: - void **set_point_tilt** **(** :ref:`int` idx, :ref:`float` tilt **)** -Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console. +Sets the tilt angle in radians for the point ``idx``. If the index is out of bounds, the function sends an error to the console. The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a :ref:`PathFollow` or :ref:`OrientedPathFollow`, this tilt is an offset over the natural tilt the :ref:`PathFollow` or :ref:`OrientedPathFollow` calculates. @@ -273,7 +273,7 @@ Returns a list of points along the curve, with a curvature controlled point dens This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. -"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! +``max_stages`` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! -"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. +``tolerance_degrees`` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index 2a125327a..4669603b5 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -50,7 +50,7 @@ Description EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your :ref:`EditorPlugin` with :ref:`EditorPlugin.add_import_plugin`. -EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`get_recognized_extension` and :ref:`get_resource_type`). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.import`` directory. +EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`get_recognized_extensions` and :ref:`get_resource_type`). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.import`` directory. Below is an example EditorImportPlugin that imports a :ref:`Mesh` from a file with the extension ".special" or ".spec": @@ -107,7 +107,7 @@ Method Descriptions - :ref:`Array` **get_import_options** **(** :ref:`int` preset **)** virtual -Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: "name", "default_value", "property_hint" (optional), "hint_string" (optional), "usage" (optional). +Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: ``name``, ``default_value``, ``property_hint`` (optional), ``hint_string`` (optional), ``usage`` (optional). .. _class_EditorImportPlugin_get_import_order: @@ -147,13 +147,13 @@ Get the priority of this plugin for the recognized extension. Higher priority pl - :ref:`Array` **get_recognized_extensions** **(** **)** virtual -Get the list of file extensions to associate with this loader (case insensitive). e.g. "obj". +Get the list of file extensions to associate with this loader (case insensitive). e.g. ``["obj"]``. .. _class_EditorImportPlugin_get_resource_type: - :ref:`String` **get_resource_type** **(** **)** virtual -Get the Godot resource type associated with this loader. e.g. "Mesh" or "Animation". +Get the Godot resource type associated with this loader. e.g. ``"Mesh"`` or ``"Animation"``. .. _class_EditorImportPlugin_get_save_extension: diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index fe1638889..b0634b6a9 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -38,6 +38,8 @@ Methods +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_scene_import_plugin` **(** :ref:`EditorSceneImporter` scene_importer **)** | +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_spatial_gizmo_plugin` **(** :ref:`EditorSpatialGizmoPlugin` plugin **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_tool_menu_item` **(** :ref:`String` name, :ref:`Object` handler, :ref:`String` callback, :ref:`Variant` ud=null **)** | +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_tool_submenu_item` **(** :ref:`String` name, :ref:`Object` submenu **)** | @@ -108,6 +110,8 @@ Methods +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_scene_import_plugin` **(** :ref:`EditorSceneImporter` scene_importer **)** | +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_spatial_gizmo_plugin` **(** :ref:`EditorSpatialGizmoPlugin` plugin **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_tool_menu_item` **(** :ref:`String` name **)** | +------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`save_external_data` **(** **)** virtual | @@ -270,6 +274,10 @@ During run-time, this will be a simple object with a script so this function doe - void **add_scene_import_plugin** **(** :ref:`EditorSceneImporter` scene_importer **)** +.. _class_EditorPlugin_add_spatial_gizmo_plugin: + +- void **add_spatial_gizmo_plugin** **(** :ref:`EditorSpatialGizmoPlugin` plugin **)** + .. _class_EditorPlugin_add_tool_menu_item: - void **add_tool_menu_item** **(** :ref:`String` name, :ref:`Object` handler, :ref:`String` callback, :ref:`Variant` ud=null **)** @@ -472,6 +480,10 @@ Remove a custom type added by :ref:`add_custom_type` scene_importer **)** +.. _class_EditorPlugin_remove_spatial_gizmo_plugin: + +- void **remove_spatial_gizmo_plugin** **(** :ref:`EditorSpatialGizmoPlugin` plugin **)** + .. _class_EditorPlugin_remove_tool_menu_item: - void **remove_tool_menu_item** **(** :ref:`String` name **)** diff --git a/classes/class_editorspatialgizmoplugin.rst b/classes/class_editorspatialgizmoplugin.rst new file mode 100644 index 000000000..55e90fd15 --- /dev/null +++ b/classes/class_editorspatialgizmoplugin.rst @@ -0,0 +1,122 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the EditorSpatialGizmoPlugin.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_EditorSpatialGizmoPlugin: + +EditorSpatialGizmoPlugin +======================== + +**Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + + + +Methods +------- + ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_material` **(** :ref:`String` name, :ref:`SpatialMaterial` material **)** | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_be_hidden` **(** **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`commit_handle` **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index, :ref:`Variant` restore, :ref:`bool` cancel=false **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorSpatialGizmo` | :ref:`create_gizmo` **(** :ref:`Spatial` spatial **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_handle_material` **(** :ref:`String` name, :ref:`bool` billboard=false **)** | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_icon_material` **(** :ref:`String` name, :ref:`Texture` texture, :ref:`bool` on_top=false, :ref:`Color` color=Color( 1, 1, 1, 1 ) **)** | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_material` **(** :ref:`String` name, :ref:`Color` color, :ref:`bool` billboard=false, :ref:`bool` on_top=false, :ref:`bool` use_vertex_color=false **)** | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_handle_name` **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_handle_value` **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SpatialMaterial` | :ref:`get_material` **(** :ref:`String` name, :ref:`EditorSpatialGizmo` gizmo **)** | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_gizmo` **(** :ref:`Spatial` spatial **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_gizmo_handle_highlighted` **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selectable_when_hidden` **(** **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`redraw` **(** :ref:`EditorSpatialGizmo` gizmo **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_handle` **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index, :ref:`Camera` camera, :ref:`Vector2` point **)** virtual | ++------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_EditorSpatialGizmoPlugin_add_material: + +- void **add_material** **(** :ref:`String` name, :ref:`SpatialMaterial` material **)** + +.. _class_EditorSpatialGizmoPlugin_can_be_hidden: + +- :ref:`bool` **can_be_hidden** **(** **)** virtual + +.. _class_EditorSpatialGizmoPlugin_commit_handle: + +- void **commit_handle** **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index, :ref:`Variant` restore, :ref:`bool` cancel=false **)** virtual + +.. _class_EditorSpatialGizmoPlugin_create_gizmo: + +- :ref:`EditorSpatialGizmo` **create_gizmo** **(** :ref:`Spatial` spatial **)** virtual + +.. _class_EditorSpatialGizmoPlugin_create_handle_material: + +- void **create_handle_material** **(** :ref:`String` name, :ref:`bool` billboard=false **)** + +.. _class_EditorSpatialGizmoPlugin_create_icon_material: + +- void **create_icon_material** **(** :ref:`String` name, :ref:`Texture` texture, :ref:`bool` on_top=false, :ref:`Color` color=Color( 1, 1, 1, 1 ) **)** + +.. _class_EditorSpatialGizmoPlugin_create_material: + +- void **create_material** **(** :ref:`String` name, :ref:`Color` color, :ref:`bool` billboard=false, :ref:`bool` on_top=false, :ref:`bool` use_vertex_color=false **)** + +.. _class_EditorSpatialGizmoPlugin_get_handle_name: + +- :ref:`String` **get_handle_name** **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index **)** virtual + +.. _class_EditorSpatialGizmoPlugin_get_handle_value: + +- :ref:`Variant` **get_handle_value** **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index **)** virtual + +.. _class_EditorSpatialGizmoPlugin_get_material: + +- :ref:`SpatialMaterial` **get_material** **(** :ref:`String` name, :ref:`EditorSpatialGizmo` gizmo **)** + +.. _class_EditorSpatialGizmoPlugin_get_name: + +- :ref:`String` **get_name** **(** **)** virtual + +.. _class_EditorSpatialGizmoPlugin_has_gizmo: + +- :ref:`bool` **has_gizmo** **(** :ref:`Spatial` spatial **)** virtual + +.. _class_EditorSpatialGizmoPlugin_is_gizmo_handle_highlighted: + +- :ref:`bool` **is_gizmo_handle_highlighted** **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index **)** virtual + +.. _class_EditorSpatialGizmoPlugin_is_selectable_when_hidden: + +- :ref:`bool` **is_selectable_when_hidden** **(** **)** virtual + +.. _class_EditorSpatialGizmoPlugin_redraw: + +- void **redraw** **(** :ref:`EditorSpatialGizmo` gizmo **)** virtual + +.. _class_EditorSpatialGizmoPlugin_set_handle: + +- void **set_handle** **(** :ref:`EditorSpatialGizmo` gizmo, :ref:`int` index, :ref:`Camera` camera, :ref:`Vector2` point **)** virtual + diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index f9891a2c3..c8566a44e 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -205,7 +205,7 @@ Set dialog to open or save mode, changes selection behavior. See enum ``Mode`` c | *Getter* | is_mode_overriding_title() | +----------+---------------------------------+ -If ``true``, changing the ``Mode`` property will set the window title accordingly (e. g. setting mode to ``MODE_OPEN_FILE`` will change the window title to "Open a File"). +If ``true``, changing the ``Mode`` property will set the window title accordingly (e.g. setting mode to ``MODE_OPEN_FILE`` will change the window title to "Open a File"). .. _class_FileDialog_show_hidden_files: diff --git a/classes/class_float.rst b/classes/class_float.rst index cb682ccd6..0c9083c16 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -37,17 +37,17 @@ Method Descriptions - :ref:`float` **float** **(** :ref:`bool` from **)** -Cast a :ref:`bool` value to a floating point value, ``float(true)`` will be equals to 1.0 and ``float(false)`` will be equals to 0.0. +Cast a :ref:`bool` value to a floating point value, ``float(true)`` will be equal to 1.0 and ``float(false)`` will be equal to 0.0. .. _class_float_float: - :ref:`float` **float** **(** :ref:`int` from **)** -Cast an :ref:`int` value to a floating point value, ``float(1)`` will be equals to 1.0. +Cast an :ref:`int` value to a floating point value, ``float(1)`` will be equal to 1.0. .. _class_float_float: - :ref:`float` **float** **(** :ref:`String` from **)** -Cast a :ref:`String` value to a floating point value. This method accepts float value strings like `` '1.23' `` and exponential notation strings for its parameter so calling `` float('1e3') `` will return 1000.0 and calling `` float('1e-3') `` will return 0.001. +Cast a :ref:`String` value to a floating point value. This method accepts float value strings like ``"1.23"`` and exponential notation strings for its parameter so calling ``float("1e3")`` will return 1000.0 and calling ``float("1e-3")`` will return 0.001. diff --git a/classes/class_gradienttexture.rst b/classes/class_gradienttexture.rst index bcb9a78b4..bb52af81a 100644 --- a/classes/class_gradienttexture.rst +++ b/classes/class_gradienttexture.rst @@ -28,7 +28,7 @@ Properties Description ----------- -Uses a :ref:`Gradient` to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see :ref:`set_width`). +Uses a :ref:`Gradient` to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see :ref:`width`). Property Descriptions --------------------- diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index 2bb2fbc4d..64c6aa413 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -35,7 +35,7 @@ Theme Properties Description ----------- -Grid container will arrange its children in a grid like structure, the grid columns are specified using the :ref:`set_columns` method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. +Grid container will arrange its children in a grid like structure, the grid columns are specified using the :ref:`columns` property and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. Property Descriptions --------------------- diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 72dbb7914..49df61b27 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -245,7 +245,7 @@ Clear all cells. - :ref:`int` **get_cell_item** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const -The :ref:`MeshLibrary` item index located at the grid-based X, Y and Z coordinates. If the cell is empty, INVALID_CELL_ITEM will be returned. +The :ref:`MeshLibrary` item index located at the grid-based X, Y and Z coordinates. If the cell is empty, constant INVALID_CELL_ITEM will be returned. .. _class_GridMap_get_cell_item_orientation: diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index d3c85f57a..bba35d2e0 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -68,13 +68,13 @@ enum **Result**: - **RESULT_CANT_RESOLVE** = **3** --- Request failed while resolving. -- **RESULT_CONNECTION_ERROR** = **4** --- Request failed due to connection(read/write) error. +- **RESULT_CONNECTION_ERROR** = **4** --- Request failed due to connection (read/write) error. - **RESULT_SSL_HANDSHAKE_ERROR** = **5** --- Request failed on SSL handshake. -- **RESULT_NO_RESPONSE** = **6** --- Request does not have a response(yet). +- **RESULT_NO_RESPONSE** = **6** --- Request does not have a response (yet). -- **RESULT_BODY_SIZE_LIMIT_EXCEEDED** = **7** --- Request exceeded its maximum size limit, see :ref:`set_body_size_limit`. +- **RESULT_BODY_SIZE_LIMIT_EXCEEDED** = **7** --- Request exceeded its maximum size limit, see :ref:`body_size_limit`. - **RESULT_REQUEST_FAILED** = **8** --- Request failed. (Unused) @@ -82,7 +82,7 @@ enum **Result**: - **RESULT_DOWNLOAD_FILE_WRITE_ERROR** = **10** --- HTTPRequest couldn't write to the download file. -- **RESULT_REDIRECT_LIMIT_REACHED** = **11** --- Request reached its maximum redirect limit, see :ref:`set_max_redirects`. +- **RESULT_REDIRECT_LIMIT_REACHED** = **11** --- Request reached its maximum redirect limit, see :ref:`max_redirects`. Description ----------- diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index 1b1ee723f..7ef3e5eef 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -51,7 +51,7 @@ enum **Storage**: - **STORAGE_RAW** = **0** --- :ref:`Image` data is stored raw and unaltered. -- **STORAGE_COMPRESS_LOSSY** = **1** --- :ref:`Image` data is compressed with a lossy algorithm. You can set the storage quality with :ref:`set_lossy_storage_quality`. +- **STORAGE_COMPRESS_LOSSY** = **1** --- :ref:`Image` data is compressed with a lossy algorithm. You can set the storage quality with :ref:`lossy_quality`. - **STORAGE_COMPRESS_LOSSLESS** = **2** --- :ref:`Image` data is compressed with a lossless algorithm. @@ -73,7 +73,7 @@ Property Descriptions | *Getter* | get_lossy_storage_quality() | +----------+----------------------------------+ -The storage quality for ``ImageTexture``.STORAGE_COMPRESS_LOSSY. +The storage quality for ``STORAGE_COMPRESS_LOSSY``. .. _class_ImageTexture_storage: @@ -94,23 +94,21 @@ Method Descriptions - void **create** **(** :ref:`int` width, :ref:`int` height, :ref:`Format` format, :ref:`int` flags=7 **)** -Create a new ``ImageTexture`` with "width" and "height". +Create a new ``ImageTexture`` with ``width`` and ``height``. -"format" one of :ref:`Image`.FORMAT\_\*. - -"flags" one or more of :ref:`Texture`.FLAG\_\*. +``format`` is a value from :ref:`Format`, ``flags`` is any combination of :ref:`Flags`. .. _class_ImageTexture_create_from_image: - void **create_from_image** **(** :ref:`Image` image, :ref:`int` flags=7 **)** -Create a new ``ImageTexture`` from an :ref:`Image` with "flags" from :ref:`Texture`.FLAG\_\*. An sRGB to linear color space conversion can take place, according to :ref:`Image`.FORMAT\_\*. +Create a new ``ImageTexture`` from an :ref:`Image` with ``flags`` from :ref:`Flags`. An sRGB to linear color space conversion can take place, according to :ref:`Format`. .. _class_ImageTexture_get_format: - :ref:`Format` **get_format** **(** **)** const -Return the format of the ``ImageTexture``, one of :ref:`Image`.FORMAT\_\*. +Return the format of the ``ImageTexture``, one of :ref:`Format`. .. _class_ImageTexture_load: diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index 13cfcc6ea..4b1865d00 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -104,7 +104,7 @@ Removes an action from the ``InputMap``. - :ref:`bool` **event_is_action** **(** :ref:`InputEvent` event, :ref:`String` action **)** const -Returns true if the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event` if you don't want this behavior. +Returns ``true`` if the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event` if you don't want this behavior. .. _class_InputMap_get_action_list: diff --git a/classes/class_joint.rst b/classes/class_joint.rst index 5891b87c5..983fd71e7 100644 --- a/classes/class_joint.rst +++ b/classes/class_joint.rst @@ -34,7 +34,7 @@ Properties Description ----------- -All 3D joints link two nodes, has a priority, and can decide if the two bodies of the nodes should be able to collide with each other +Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. Property Descriptions --------------------- @@ -61,7 +61,7 @@ If ``true``, the two bodies of the nodes are not able to collide with each other | *Getter* | get_node_a() | +----------+-------------------+ -The :ref:`Node`, the first side of the Joint attaches to. +The node attached to the first side (A) of the joint. .. _class_Joint_nodes/node_b: @@ -73,7 +73,7 @@ The :ref:`Node`, the first side of the Joint attaches to. | *Getter* | get_node_b() | +----------+-------------------+ -The :ref:`Node`, the second side of the Joint attaches to. +The node attached to the second side (B) of the joint. .. _class_Joint_solver/priority: @@ -85,5 +85,5 @@ The :ref:`Node`, the second side of the Joint attaches to. | *Getter* | get_solver_priority() | +----------+----------------------------+ -The order in which the solver is executed compared to the other Joints, the lower, the earlier. +The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 6f6a86490..444ba13f4 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -112,7 +112,7 @@ Emitted when the text changes. - **text_entered** **(** :ref:`String` new_text **)** -Emitted when the user presses KEY_ENTER on the ``LineEdit``. +Emitted when the user presses ``KEY_ENTER`` on the ``LineEdit``. Enumerations ------------ @@ -121,27 +121,27 @@ Enumerations enum **Align**: -- **ALIGN_LEFT** = **0** --- Aligns the text on the left hand side of the :ref:`LineEdit`. +- **ALIGN_LEFT** = **0** --- Aligns the text on the left hand side of the ``LineEdit``. -- **ALIGN_CENTER** = **1** --- Centers the text in the middle of the :ref:`LineEdit`. +- **ALIGN_CENTER** = **1** --- Centers the text in the middle of the ``LineEdit``. -- **ALIGN_RIGHT** = **2** --- Aligns the text on the right hand side of the :ref:`LineEdit`. +- **ALIGN_RIGHT** = **2** --- Aligns the text on the right hand side of the ``LineEdit``. -- **ALIGN_FILL** = **3** --- Stretches whitespaces to fit the :ref:`LineEdit`'s width. +- **ALIGN_FILL** = **3** --- Stretches whitespaces to fit the ``LineEdit``'s width. .. _enum_LineEdit_MenuItems: enum **MenuItems**: -- **MENU_CUT** = **0** --- Cuts (Copies and clears) the selected text. +- **MENU_CUT** = **0** --- Cuts (copies and clears) the selected text. - **MENU_COPY** = **1** --- Copies the selected text. - **MENU_PASTE** = **2** --- Pastes the clipboard text over the selected text (or at the cursor's position). -- **MENU_CLEAR** = **3** --- Erases the whole Linedit text. +- **MENU_CLEAR** = **3** --- Erases the whole ``LineEdit`` text. -- **MENU_SELECT_ALL** = **4** --- Selects the whole Linedit text. +- **MENU_SELECT_ALL** = **4** --- Selects the whole ``LineEdit`` text. - **MENU_UNDO** = **5** --- Undoes the previous action. @@ -251,7 +251,7 @@ If ``false``, existing text cannot be modified and new text cannot be added. | *Getter* | get_expand_to_text_length() | +----------+----------------------------------+ -If ``true``, the :ref:`LineEdit` width will increase to stay longer than the :ref:`text`. It will **not** compress if the :ref:`text` is shortened. +If ``true``, the ``LineEdit`` width will increase to stay longer than the :ref:`text`. It will **not** compress if the :ref:`text` is shortened. .. _class_LineEdit_focus_mode: @@ -263,7 +263,7 @@ If ``true``, the :ref:`LineEdit` width will increase to stay lon | *Getter* | get_focus_mode() | +----------+-----------------------+ -Defines how the :ref:`LineEdit` can grab focus (Keyboard and mouse, only keyboard, or none). See ``enum FocusMode`` in :ref:`Control` for details. +Defines how the ``LineEdit`` can grab focus (Keyboard and mouse, only keyboard, or none). See ``enum FocusMode`` in :ref:`Control` for details. .. _class_LineEdit_max_length: @@ -275,7 +275,7 @@ Defines how the :ref:`LineEdit` can grab focus (Keyboard and mou | *Getter* | get_max_length() | +----------+-----------------------+ -Maximum amount of characters that can be entered inside the :ref:`LineEdit`. If ``0``, there is no limit. +Maximum amount of characters that can be entered inside the ``LineEdit``. If ``0``, there is no limit. .. _class_LineEdit_placeholder_alpha: @@ -299,7 +299,7 @@ Opacity of the :ref:`placeholder_text`. From `` | *Getter* | get_placeholder() | +----------+------------------------+ -Text shown when the :ref:`LineEdit` is empty. It is **not** the :ref:`LineEdit`'s default value (see :ref:`text`). +Text shown when the ``LineEdit`` is empty. It is **not** the ``LineEdit``'s default value (see :ref:`text`). .. _class_LineEdit_secret: @@ -335,7 +335,7 @@ The character to use to mask secret input (defaults to "\*"). Only a single char | *Getter* | get_text() | +----------+-----------------+ -String value of the :ref:`LineEdit`. +String value of the ``LineEdit``. Method Descriptions ------------------- @@ -350,7 +350,7 @@ Adds ``text`` after the cursor. If the resulting value is longer than :ref:`max_ - void **clear** **(** **)** -Erases the :ref:`LineEdit` text. +Erases the ``LineEdit`` text. .. _class_LineEdit_deselect: @@ -362,7 +362,7 @@ Clears the current selection. - :ref:`PopupMenu` **get_menu** **(** **)** const -Returns the :ref:`PopupMenu` of this ``LineEdit``. By default, this menu is displayed when right-clicking on the :ref:`LineEdit`. +Returns the :ref:`PopupMenu` of this ``LineEdit``. By default, this menu is displayed when right-clicking on the ``LineEdit``. .. _class_LineEdit_menu_option: @@ -374,7 +374,7 @@ Executes a given action as defined in the MENU\_\* enum. - void **select** **(** :ref:`int` from=0, :ref:`int` to=-1 **)** -Selects characters inside :ref:`LineEdit` between ``from`` and ``to``. By default ``from`` is at the beginning and ``to`` at the end. +Selects characters inside ``LineEdit`` between ``from`` and ``to``. By default ``from`` is at the beginning and ``to`` at the end. :: diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index 619020858..dee1b1bc7 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -45,7 +45,7 @@ Lock this ``Mutex``, blocks until it is unlocked by the current owner. - :ref:`Error` **try_lock** **(** **)** -Try locking this ``Mutex``, does not block. Returns OK on success, ERR_BUSY otherwise. +Try locking this ``Mutex``, does not block. Returns ``OK`` on success, ``ERR_BUSY`` otherwise. .. _class_Mutex_unlock: diff --git a/classes/class_navigation.rst b/classes/class_navigation.rst index 1f12f5e22..f97cfaadf 100644 --- a/classes/class_navigation.rst +++ b/classes/class_navigation.rst @@ -83,7 +83,7 @@ Returns the surface normal at the navigation point closest to the point given. U - :ref:`Object` **get_closest_point_owner** **(** :ref:`Vector3` to_point **)** -Returns the owner of the :ref:`NavigationMesh` which contains the navigation point closest to the point given. This is usually a NavigtionMeshInstance. For meshes added via :ref:`navmesh_add`, returns the owner that was given (or ``null`` if the ``owner`` parameter was omitted). +Returns the owner of the :ref:`NavigationMesh` which contains the navigation point closest to the point given. This is usually a :ref:`NavigationMeshInstance`. For meshes added via :ref:`navmesh_add`, returns the owner that was given (or ``null`` if the ``owner`` parameter was omitted). .. _class_Navigation_get_closest_point_to_segment: diff --git a/classes/class_navigation2d.rst b/classes/class_navigation2d.rst index 237b38a1b..8803ed5cb 100644 --- a/classes/class_navigation2d.rst +++ b/classes/class_navigation2d.rst @@ -51,7 +51,7 @@ Returns the navigation point closest to the point given. Points are in local coo - :ref:`Object` **get_closest_point_owner** **(** :ref:`Vector2` to_point **)** -Returns the owner of the :ref:`NavigationPolygon` which contains the navigation point closest to the point given. This is usually a NavigtionPolygonInstance. For polygons added via :ref:`navpoly_add`, returns the owner that was given (or ``null`` if the ``owner`` parameter was omitted). +Returns the owner of the :ref:`NavigationPolygon` which contains the navigation point closest to the point given. This is usually a :ref:`NavigationPolygonInstance`. For polygons added via :ref:`navpoly_add`, returns the owner that was given (or ``null`` if the ``owner`` parameter was omitted). .. _class_Navigation2D_get_simple_path: diff --git a/classes/class_node.rst b/classes/class_node.rst index 80aa45fbc..1fc86c095 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -316,7 +316,7 @@ This means that when adding a node to the scene tree, the following order will b Nodes can also process input events. When present, the :ref:`_input` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the :ref:`_unhandled_input` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control` nodes), ensuring that the node only receives the events that were meant for it. -To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with :ref:`set_owner`. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. +To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the :ref:`owner` property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with :ref:`Object.free` or :ref:`queue_free`, it will also free all its children. @@ -517,7 +517,7 @@ Adds the node to a group. Groups are helpers to name and organize a subset of no - :ref:`bool` **can_process** **(** **)** const -Returns ``true`` if the node can process while the scene tree is paused (see :ref:`set_pause_mode`). Always returns ``true`` if the scene tree is not paused, and ``false`` if the node is not in the tree. FIXME: Why FAIL_COND? +Returns ``true`` if the node can process while the scene tree is paused (see :ref:`pause_mode`). Always returns ``true`` if the scene tree is not paused, and ``false`` if the node is not in the tree. .. _class_Node_duplicate: @@ -525,7 +525,7 @@ Returns ``true`` if the node can process while the scene tree is paused (see :re Duplicates the node, returning a new node. -You can fine-tune the behavior using the ``flags``. See DUPLICATE\_\* constants. +You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags`). .. _class_Node_find_node: diff --git a/classes/class_os.rst b/classes/class_os.rst index 915ac2e96..576663efb 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -821,7 +821,7 @@ Returns the amount of static memory being used by the program in bytes. - :ref:`String` **get_system_dir** **(** :ref:`SystemDir` dir **)** const -Returns the actual path to commonly used folders across different platforms. Available locations are specified in OS.SystemDir. +Returns the actual path to commonly used folders across different platforms. Available locations are specified in :ref:`SystemDir`. .. _class_OS_get_system_time_msecs: diff --git a/classes/class_particlesmaterial.rst b/classes/class_particlesmaterial.rst index 9e44991b4..17ace9a01 100644 --- a/classes/class_particlesmaterial.rst +++ b/classes/class_particlesmaterial.rst @@ -348,7 +348,7 @@ Animation speed randomness ratio. Default value: ``0``. | *Getter* | get_color() | +----------+------------------+ -Each particle's initial color. If the Particle2D's ``texture`` is defined, it will be multiplied by this color. +Each particle's initial color. If the :ref:`Particles2D`'s ``texture`` is defined, it will be multiplied by this color. .. _class_ParticlesMaterial_color_ramp: diff --git a/classes/class_physics2ddirectspacestate.rst b/classes/class_physics2ddirectspacestate.rst index 57226d943..5faf3e498 100644 --- a/classes/class_physics2ddirectspacestate.rst +++ b/classes/class_physics2ddirectspacestate.rst @@ -52,7 +52,7 @@ Method Descriptions - :ref:`Array` **cast_motion** **(** :ref:`Physics2DShapeQueryParameters` shape **)** -Checks how far the shape can travel toward a point. Note that both the shape and the motion are supplied through a :ref:`Physics2DShapeQueryParameters` object. The method will return an array with two floats between 0 and 1, both representing a fraction of ``motion``. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be 1, 1. +Checks how far the shape can travel toward a point. Note that both the shape and the motion are supplied through a :ref:`Physics2DShapeQueryParameters` object. The method will return an array with two floats between 0 and 1, both representing a fraction of ``motion``. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be ``[1, 1]``. If the shape can not move, the array will be empty. diff --git a/classes/class_physicsdirectspacestate.rst b/classes/class_physicsdirectspacestate.rst index 38556f0e5..a9db34ce2 100644 --- a/classes/class_physicsdirectspacestate.rst +++ b/classes/class_physicsdirectspacestate.rst @@ -48,9 +48,9 @@ Method Descriptions - :ref:`Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters` shape, :ref:`Vector3` motion **)** -Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of ``motion``. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be 1, 1. +Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of ``motion``. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be ``[1, 1]``. -If the shape can not move, the returned array will be 0, 0. +If the shape can not move, the returned array will be ``[0, 0]``. .. _class_PhysicsDirectSpaceState_collide_shape: diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index cb98368af..fd92ea614 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -1064,7 +1064,7 @@ Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT\* constants without the G6 - :ref:`int` **get_process_info** **(** :ref:`ProcessInfo` process_info **)** -Returns an Info defined by the ProcessInfo input given. +Returns an Info defined by the :ref:`ProcessInfo` input given. .. _class_PhysicsServer_hinge_joint_get_flag: diff --git a/classes/class_poolbytearray.rst b/classes/class_poolbytearray.rst index 66c60f022..ad3b8b153 100644 --- a/classes/class_poolbytearray.rst +++ b/classes/class_poolbytearray.rst @@ -12,7 +12,7 @@ PoolByteArray Brief Description ----------------- -Raw byte array. +A pooled :ref:`Array` of bytes. Methods ------- @@ -52,7 +52,7 @@ Methods Description ----------- -Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. Method Descriptions ------------------- @@ -61,7 +61,7 @@ Method Descriptions - :ref:`PoolByteArray` **PoolByteArray** **(** :ref:`Array` from **)** -Create from a generic array. +Construct a new ``PoolByteArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolByteArray_append: @@ -79,31 +79,31 @@ Append a ``PoolByteArray`` at the end of this array. - :ref:`PoolByteArray` **compress** **(** :ref:`int` compression_mode=0 **)** -Returns a new ``PoolByteArray`` with the data compressed. Set the compression mode using one of :ref:`File`'s COMPRESS\_\* constants. +Returns a new ``PoolByteArray`` with the data compressed. Set the compression mode using one of :ref:`CompressionMode`'s constants. .. _class_PoolByteArray_decompress: - :ref:`PoolByteArray` **decompress** **(** :ref:`int` buffer_size, :ref:`int` compression_mode=0 **)** -Returns a new ``PoolByteArray`` with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of :ref:`File`'s COMPRESS\_\* constants. +Returns a new ``PoolByteArray`` with the data decompressed. Set ``buffer_size`` to the size of the uncompressed data. Set the compression mode using one of :ref:`CompressionMode`'s constants. .. _class_PoolByteArray_get_string_from_ascii: - :ref:`String` **get_string_from_ascii** **(** **)** -Returns a copy of the array's contents as :ref:`String`. Fast alternative to :ref:`PoolByteArray.get_string_from_utf8` if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use :ref:`PoolByteArray.get_string_from_utf8`. +Returns a copy of the array's contents as :ref:`String`. Fast alternative to :ref:`get_string_from_utf8` if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use :ref:`get_string_from_utf8`. .. _class_PoolByteArray_get_string_from_utf8: - :ref:`String` **get_string_from_utf8** **(** **)** -Returns a copy of the array's contents as :ref:`String`. Slower than :ref:`PoolByteArray.get_string_from_ascii` but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. +Returns a copy of the array's contents as :ref:`String`. Slower than :ref:`get_string_from_ascii` but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. .. _class_PoolByteArray_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`int` byte **)** -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()). +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolByteArray_invert: diff --git a/classes/class_poolcolorarray.rst b/classes/class_poolcolorarray.rst index 055479e19..21690d3e2 100644 --- a/classes/class_poolcolorarray.rst +++ b/classes/class_poolcolorarray.rst @@ -12,7 +12,7 @@ PoolColorArray Brief Description ----------------- -Array of Colors +A pooled :ref:`Array` of :ref:`Color`. Methods ------- @@ -42,7 +42,7 @@ Methods Description ----------- -Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold :ref:`Color`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,7 +51,7 @@ Method Descriptions - :ref:`PoolColorArray` **PoolColorArray** **(** :ref:`Array` from **)** -Create from a generic array. +Construct a new ``PoolColorArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolColorArray_append: @@ -69,7 +69,7 @@ Append a ``PoolColorArray`` at the end of this array. - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Color` color **)** -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()). +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolColorArray_invert: diff --git a/classes/class_poolintarray.rst b/classes/class_poolintarray.rst index 7b1f3e522..402a58836 100644 --- a/classes/class_poolintarray.rst +++ b/classes/class_poolintarray.rst @@ -12,7 +12,7 @@ PoolIntArray Brief Description ----------------- -Integer Array. +A pooled :ref:`Array` of integers (:ref:`int`). Methods ------- @@ -42,7 +42,7 @@ Methods Description ----------- -Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold integer values (:ref:`int`). Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,7 +51,7 @@ Method Descriptions - :ref:`PoolIntArray` **PoolIntArray** **(** :ref:`Array` from **)** -Create from a generic array. +Construct a new ``PoolIntArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolIntArray_append: @@ -63,13 +63,13 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append an ``PoolIntArray`` at the end of this array. +Append a ``PoolIntArray`` at the end of this array. .. _class_PoolIntArray_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`int` integer **)** -Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()). +Insert a new int at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolIntArray_invert: diff --git a/classes/class_poolrealarray.rst b/classes/class_poolrealarray.rst index 67de258f5..139403ded 100644 --- a/classes/class_poolrealarray.rst +++ b/classes/class_poolrealarray.rst @@ -12,7 +12,7 @@ PoolRealArray Brief Description ----------------- -Real Array. +A pooled :ref:`Array` of reals (:ref:`float`). Methods ------- @@ -42,7 +42,7 @@ Methods Description ----------- -Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold floating point values (:ref:`float`). Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,7 +51,7 @@ Method Descriptions - :ref:`PoolRealArray` **PoolRealArray** **(** :ref:`Array` from **)** -Create from a generic array. +Construct a new ``PoolRealArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolRealArray_append: @@ -63,13 +63,13 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append an RealArray at the end of this array. +Append a ``PoolRealArray`` at the end of this array. .. _class_PoolRealArray_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`float` 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()). +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolRealArray_invert: diff --git a/classes/class_poolstringarray.rst b/classes/class_poolstringarray.rst index f9cf76154..8aac77c58 100644 --- a/classes/class_poolstringarray.rst +++ b/classes/class_poolstringarray.rst @@ -12,7 +12,7 @@ PoolStringArray Brief Description ----------------- -String Array. +A pooled :ref:`Array` of :ref:`String`. Methods ------- @@ -44,7 +44,7 @@ Methods Description ----------- -String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold :ref:`String`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. Method Descriptions ------------------- @@ -53,7 +53,7 @@ Method Descriptions - :ref:`PoolStringArray` **PoolStringArray** **(** :ref:`Array` from **)** -Create from a generic array. +Construct a new ``PoolStringArray``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolStringArray_append: @@ -65,13 +65,13 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append an StringArray at the end of this array. +Append a ``PoolStringArray`` at the end of this array. .. _class_PoolStringArray_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`String` string **)** -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()). +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolStringArray_invert: @@ -83,7 +83,7 @@ Reverse the order of the elements in the array. - :ref:`String` **join** **(** :ref:`String` delimiter **)** -Returns a :ref:`String` with each element of the array joined with the delimiter. +Returns a :ref:`String` with each element of the array joined with the given ``delimiter``. .. _class_PoolStringArray_push_back: diff --git a/classes/class_poolvector2array.rst b/classes/class_poolvector2array.rst index 36239cb35..8053ca8d4 100644 --- a/classes/class_poolvector2array.rst +++ b/classes/class_poolvector2array.rst @@ -12,7 +12,7 @@ PoolVector2Array Brief Description ----------------- -An Array of Vector2. +A pooled :ref:`Array` of :ref:`Vector2`. Methods ------- @@ -42,7 +42,7 @@ Methods Description ----------- -An Array specifically designed to hold Vector2. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold :ref:`Vector2`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,7 +51,7 @@ Method Descriptions - :ref:`PoolVector2Array` **PoolVector2Array** **(** :ref:`Array` from **)** -Construct a new ``PoolVector2Array``. Optionally, you can pass in an Array that will be converted. +Construct a new ``PoolVector2Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolVector2Array_append: @@ -63,13 +63,13 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append an ``PoolVector2Array`` at the end of this array. +Append a ``PoolVector2Array`` at the end of this array. .. _class_PoolVector2Array_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** -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()). +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolVector2Array_invert: diff --git a/classes/class_poolvector3array.rst b/classes/class_poolvector3array.rst index 245c1ef85..716dd8040 100644 --- a/classes/class_poolvector3array.rst +++ b/classes/class_poolvector3array.rst @@ -12,7 +12,7 @@ PoolVector3Array Brief Description ----------------- -An Array of Vector3. +A pooled :ref:`Array` of :ref:`Vector3`. Methods ------- @@ -42,7 +42,7 @@ Methods Description ----------- -An Array specifically designed to hold Vector3. Note that this type is passed by value and not by reference. +An :ref:`Array` specifically designed to hold :ref:`Vector3`. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. Method Descriptions ------------------- @@ -51,7 +51,7 @@ Method Descriptions - :ref:`PoolVector3Array` **PoolVector3Array** **(** :ref:`Array` from **)** -Construct a new PoolVector3Array. Optionally, you can pass in an Array that will be converted. +Construct a new ``PoolVector3Array``. Optionally, you can pass in a generic :ref:`Array` that will be converted. .. _class_PoolVector3Array_append: @@ -63,13 +63,13 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append an ``PoolVector3Array`` at the end of this array. +Append a ``PoolVector3Array`` at the end of this array. .. _class_PoolVector3Array_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** -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()). +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). .. _class_PoolVector3Array_invert: diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index e3fdaa560..d07224314 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -150,7 +150,7 @@ Returns a copy of the ``Rect2`` grown a given amount of units towards each direc - :ref:`Rect2` **grow_margin** **(** :ref:`int` margin, :ref:`float` by **)** -Returns a copy of the ``Rect2`` grown a given amount of units towards the Margin direction. +Returns a copy of the ``Rect2`` grown a given amount of units towards the :ref:`Margin` direction. .. _class_Rect2_has_no_area: diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 77f724fc7..8f04efc37 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -9,7 +9,7 @@ Resource **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Inherited By:** :ref:`Animation`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BakedLightmapData`, :ref:`BitMap`, :ref:`ButtonGroup`, :ref:`CubeMap`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`DynamicFontData`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`GDNativeLibrary`, :ref:`GIProbeData`, :ref:`Gradient`, :ref:`Image`, :ref:`InputEvent`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`OccluderPolygon2D`, :ref:`OpenSimplexNoise`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`Script`, :ref:`Shader`, :ref:`Shape`, :ref:`Shape2D`, :ref:`ShortCut`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`TextFile`, :ref:`Texture`, :ref:`TextureLayered`, :ref:`Theme`, :ref:`TileSet`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualScriptNode`, :ref:`VisualShaderNode`, :ref:`World`, :ref:`World2D` +**Inherited By:** :ref:`Animation`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BakedLightmapData`, :ref:`BitMap`, :ref:`ButtonGroup`, :ref:`CubeMap`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`DynamicFontData`, :ref:`EditorSettings`, :ref:`EditorSpatialGizmoPlugin`, :ref:`Environment`, :ref:`Font`, :ref:`GDNativeLibrary`, :ref:`GIProbeData`, :ref:`Gradient`, :ref:`Image`, :ref:`InputEvent`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`OccluderPolygon2D`, :ref:`OpenSimplexNoise`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`Script`, :ref:`Shader`, :ref:`Shape`, :ref:`Shape2D`, :ref:`ShortCut`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`TextFile`, :ref:`Texture`, :ref:`TextureLayered`, :ref:`Theme`, :ref:`TileSet`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualScriptNode`, :ref:`VisualShaderNode`, :ref:`World`, :ref:`World2D` **Category:** Core diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 71f9f425f..9027dc5d6 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -144,7 +144,7 @@ Signals - **meta_clicked** **(** :ref:`Nil` meta **)** -Triggered when the user clicks on content between url tags. If the meta is defined in text, e.g. ``[url={"data"="hi"}]hi[/url]``, then the parameter for this signal will be a :ref:`String` type. If a particular type or an object is desired, the :ref:`push_meta` method must be used to manually insert the data into the tag stack. +Triggered when the user clicks on content between ``[url]`` tags. If the meta is defined in text, e.g. ``[url={"data"="hi"}]hi[/url]``, then the parameter for this signal will be a :ref:`String` type. If a particular type or an object is desired, the :ref:`push_meta` method must be used to manually insert the data into the tag stack. .. _class_RichTextLabel_meta_hover_ended: @@ -262,7 +262,7 @@ The label's text in BBCode format. Is not representative of manual modifications | *Getter* | is_meta_underlined() | +----------+---------------------------+ -If ``true``, the label underlines meta tags such as url{text}. Default value: ``true``. +If ``true``, the label underlines meta tags such as ``[url]{text}[/url]``. Default value: ``true``. .. _class_RichTextLabel_override_selected_font_color: @@ -447,7 +447,7 @@ Adds an alignment tag based on the given ``align`` value. See :ref:`Align` for details. +Adds a ``[cell]`` tag to the tag stack. Must be inside a ``[table]`` tag. See :ref:`push_table` for details. .. _class_RichTextLabel_push_color: diff --git a/classes/class_rigidbody.rst b/classes/class_rigidbody.rst index 9336a2816..81d429dc3 100644 --- a/classes/class_rigidbody.rst +++ b/classes/class_rigidbody.rst @@ -446,7 +446,7 @@ Method Descriptions - void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState` state **)** virtual -Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but :ref:`set_use_custom_integrator` allows you to disable the default behavior and do fully custom force integration for a body. +Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the :ref:`custom_integrator` property allows you to disable the default behavior and do fully custom force integration for a body. .. _class_RigidBody_add_central_force: @@ -492,7 +492,7 @@ Applies a torque impulse which will be affected by the body mass and shape. This - :ref:`Array` **get_colliding_bodies** **(** **)** const -Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see :ref:`set_max_contacts_reported` to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. +Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the :ref:`contacts_reported` property to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. .. _class_RigidBody_set_axis_velocity: diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index 6e0f3f6fa..85b917947 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -405,7 +405,7 @@ Method Descriptions - void **_integrate_forces** **(** :ref:`Physics2DDirectBodyState` state **)** virtual -Allows you to read and safely modify the simulation state for the object. Use this instead of Node._physics_process if you need to directly change the body's ``position`` or other physics properties. By default, it works in addition to the usual physics behavior, but :ref:`custom_integrator` allows you to disable the default behavior and write custom force integration for a body. +Allows you to read and safely modify the simulation state for the object. Use this instead of :ref:`Node._physics_process` if you need to directly change the body's ``position`` or other physics properties. By default, it works in addition to the usual physics behavior, but :ref:`custom_integrator` allows you to disable the default behavior and write custom force integration for a body. .. _class_RigidBody2D_add_central_force: diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 0785c9c35..eb62c36b0 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -315,7 +315,7 @@ When ``false`` you need to manually call :ref:`MultiplayerAPI.poll`) and will set root node's network mode to master (see NETWORK_MODE\_\* constants in :ref:`Node`), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. +The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with :ref:`is_network_server`) and will set root node's network mode to master (see NETWORK_MODE\_\* constants in :ref:`Node`), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. .. _class_SceneTree_paused: diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 90515d3b8..1cac5fd0d 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -67,7 +67,7 @@ Emitted whenever scrolling is started. Description ----------- -A ScrollContainer node with a :ref:`Control` child and scrollbar child (HScrollbar, :ref:`VScrollBar`, or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). +A ScrollContainer node with a :ref:`Control` child and scrollbar child (:ref:`HScrollBar`, :ref:`VScrollBar`, or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). Property Descriptions --------------------- diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index fa8b5eb19..e09c7d399 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -37,11 +37,11 @@ Method Descriptions - :ref:`Error` **post** **(** **)** -Lowers the ``Semaphore``, allowing one more thread in. Returns OK on success, ERR_BUSY otherwise. +Lowers the ``Semaphore``, allowing one more thread in. Returns ``OK`` on success, ``ERR_BUSY`` otherwise. .. _class_Semaphore_wait: - :ref:`Error` **wait** **(** **)** -Tries to wait for the ``Semaphore``, if its value is zero, blocks until non-zero. Returns OK on success, ERR_BUSY otherwise. +Tries to wait for the ``Semaphore``, if its value is zero, blocks until non-zero. Returns ``OK`` on success, ``ERR_BUSY`` otherwise. diff --git a/classes/class_sliderjoint.rst b/classes/class_sliderjoint.rst index d1f8ac73e..62d354ec8 100644 --- a/classes/class_sliderjoint.rst +++ b/classes/class_sliderjoint.rst @@ -121,7 +121,7 @@ enum **Param**: Description ----------- -Slides across the x-axis of the Pivot object. +Slides across the x-axis of the pivot object. Property Descriptions --------------------- diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index 53d21ef00..97915febf 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -124,7 +124,7 @@ Constants - **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Spatial nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. -In order for NOTIFICATION_TRANSFORM_CHANGED to work user first needs to ask for it, with set_notify_transform(true). +In order for ``NOTIFICATION_TRANSFORM_CHANGED`` to work, users first need to ask for it, with :ref:`set_notify_transform`. - **NOTIFICATION_ENTER_WORLD** = **41** --- Spatial nodes receives this notification when they are registered to new :ref:`World` resource. @@ -135,9 +135,9 @@ In order for NOTIFICATION_TRANSFORM_CHANGED to work user first needs to ask for Description ----------- -Most basic 3D game object, with a 3D :ref:`Transform` and visibility settings. All other 3D game objects inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project. +Most basic 3D game object, with a 3D :ref:`Transform` and visibility settings. All other 3D game objects inherit from Spatial. Use ``Spatial`` as a parent node to move, scale, rotate and show/hide children in a 3D project. -Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the Spatial object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the Spatial's transform. The word local below refers to this coordinate system. The coordinate system that is attached to the Spatial object itself is referred to as object-local coordinate system. +Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the ``Spatial`` object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the ``Spatial``'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the ``Spatial`` object itself is referred to as object-local coordinate system. Tutorials --------- @@ -157,7 +157,7 @@ Property Descriptions | *Getter* | get_gizmo() | +----------+------------------+ -The SpatialGizmo for this node. Used for example in :ref:`EditorSpatialGizmo` as custom visualization and editing handles in Editor. +The :ref:`SpatialGizmo` for this node. Used for example in :ref:`EditorSpatialGizmo` as custom visualization and editing handles in Editor. .. _class_Spatial_global_transform: @@ -262,7 +262,7 @@ Returns the parent ``Spatial``, or an empty :ref:`Object` if no pa - :ref:`World` **get_world** **(** **)** const -Returns the current :ref:`World` resource this Spatial node is registered to. +Returns the current :ref:`World` resource this ``Spatial`` node is registered to. .. _class_Spatial_global_rotate: @@ -284,13 +284,13 @@ Moves the global (world) transformation by :ref:`Vector3` offset. - void **hide** **(** **)** -Disables rendering of this node. Change Spatial Visible property to false. +Disables rendering of this node. Changes :ref:`visible` to ``false``. .. _class_Spatial_is_local_transform_notification_enabled: - :ref:`bool` **is_local_transform_notification_enabled** **(** **)** const -Returns whether node notifies about its local transformation changes. Spatial will not propagate this by default. +Returns whether node notifies about its local transformation changes. ``Spatial`` will not propagate this by default. .. _class_Spatial_is_scale_disabled: @@ -306,7 +306,7 @@ Returns whether this node is set as Toplevel, that is whether it ignores its par - :ref:`bool` **is_transform_notification_enabled** **(** **)** const -Returns whether the node notifies about its global and local transformation changes. Spatial will not propagate this by default. +Returns whether the node notifies about its global and local transformation changes. ``Spatial`` will not propagate this by default. .. _class_Spatial_is_visible_in_tree: @@ -334,7 +334,7 @@ Moves the node to the specified ``position``, and then rotates itself to point t - void **orthonormalize** **(** **)** -Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's Transform3D. +Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's :ref:`Transform`. .. _class_Spatial_rotate: @@ -386,7 +386,7 @@ Makes the node ignore its parents transformations. Node transformations are only - void **set_identity** **(** **)** -Reset all transformations for this node. Set its Transform3D to identity matrix. +Reset all transformations for this node. Set its :ref:`Transform` to identity matrix. .. _class_Spatial_set_ignore_transform_notification: @@ -398,19 +398,19 @@ Set whether the node ignores notification that its transformation (global or loc - void **set_notify_local_transform** **(** :ref:`bool` enable **)** -Set whether the node notifies about its local transformation changes. Spatial will not propagate this by default. +Set whether the node notifies about its local transformation changes. ``Spatial`` will not propagate this by default. .. _class_Spatial_set_notify_transform: - void **set_notify_transform** **(** :ref:`bool` enable **)** -Set whether the node notifies about its global and local transformation changes. Spatial will not propagate this by default. +Set whether the node notifies about its global and local transformation changes. ``Spatial`` will not propagate this by default. .. _class_Spatial_show: - void **show** **(** **)** -Enables rendering of this node. Change Spatial Visible property to "True". +Enables rendering of this node. Changes :ref:`visible` to ``true``. .. _class_Spatial_to_global: diff --git a/classes/class_staticbody.rst b/classes/class_staticbody.rst index 2c9b68214..cdae67f8f 100644 --- a/classes/class_staticbody.rst +++ b/classes/class_staticbody.rst @@ -14,7 +14,7 @@ StaticBody Brief Description ----------------- -Static body for 3D Physics. +Static body for 3D physics. Properties ---------- @@ -34,7 +34,7 @@ Properties Description ----------- -Static body for 3D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a RigidBody3D so they are great for scenario collision. +Static body for 3D physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a :ref:`RigidBody` so they are great for scenario collision. A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index 09c75f9c1..1b1777d13 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -62,7 +62,7 @@ Method Descriptions - :ref:`Error` **connect_to_host** **(** :ref:`String` host, :ref:`int` port **)** -Connect to the specified host:port pair. A hostname will be resolved if valid. Returns OK on success or FAILED on failure. +Connect to the specified host:port pair. A hostname will be resolved if valid. Returns ``OK`` on success or ``FAILED`` on failure. .. _class_StreamPeerTCP_disconnect_from_host: @@ -86,7 +86,7 @@ Return the port of this peer. - :ref:`Status` **get_status** **(** **)** -Return the status of the connection, one of STATUS\_\* enum. +Return the status of the connection, see :ref:`Status`. .. _class_StreamPeerTCP_is_connected_to_host: diff --git a/classes/class_string.rst b/classes/class_string.rst index ca26c650c..97ae78097 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -531,7 +531,7 @@ Returns ``true`` if this string contains a valid color in HTML notation. - :ref:`bool` **is_valid_identifier** **(** **)** -Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (\_) and the first character may not be a digit. +Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (``_``) and the first character may not be a digit. .. _class_String_is_valid_integer: @@ -573,13 +573,13 @@ Returns a copy of the string with characters removed from the left. - :ref:`bool` **match** **(** :ref:`String` expr **)** -Does a simple expression match, where '\*' matches zero or more arbitrary characters and '?' matches any single character except '.'. +Does a simple expression match, where ``*`` matches zero or more arbitrary characters and ``?`` matches any single character except '.'. .. _class_String_matchn: - :ref:`bool` **matchn** **(** :ref:`String` expr **)** -Does a simple case insensitive expression match, using ? and \* wildcards (see :ref:`match`). +Does a simple case insensitive expression match, using ``?`` and ``*`` wildcards (see :ref:`match`). .. _class_String_md5_buffer: @@ -671,7 +671,7 @@ Returns the right side of the string from a given position. Splits the string by a ``divisor`` string and returns an array of the substrings, starting from right. -**Example:** "One,Two,Three" will return "One","Two","Three" if split by ",". +**Example:** ``"One,Two,Three"`` will return ``["One","Two","Three"]`` if split by ``","``. If ``maxsplit`` is specified, then it is number of splits to do, default is 0 which splits all the items. @@ -705,7 +705,7 @@ Returns the similarity index of the text compared to this string. 1 means totall Splits the string by a divisor string and returns an array of the substrings. -**Example:** "One,Two,Three" will return "One","Two","Three" if split by ",". +**Example:** ``"One,Two,Three"`` will return ``["One","Two","Three"]`` if split by ``","``. If ``maxsplit`` is given, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements) @@ -715,7 +715,7 @@ If ``maxsplit`` is given, at most maxsplit number of splits occur, and the remai Splits the string in floats by using a divisor string and returns an array of the substrings. -**Example:** "1,2.5,3" will return 1,2.5,3 if split by ",". +**Example:** ``"1,2.5,3"`` will return ``[1,2.5,3]`` if split by ``","``. .. _class_String_strip_edges: @@ -733,7 +733,7 @@ Returns part of the string from the position ``from`` with length ``len``. - :ref:`PoolByteArray` **to_ascii** **(** **)** -Converts the String (which is a character array) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is sped up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. +Converts the String (which is a character array) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is sped up in comparison to :ref:`to_utf8` with the assumption that all the characters the String contains are only ASCII characters. .. _class_String_to_float: @@ -763,7 +763,7 @@ Returns the string converted to uppercase. - :ref:`PoolByteArray` **to_utf8** **(** **)** -Converts the String (which is an array of characters) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). +Converts the String (which is an array of characters) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is a bit slower than :ref:`to_ascii`, but supports all UTF-8 characters. Therefore, you should prefer this function over :ref:`to_ascii`. .. _class_String_trim_prefix: diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index b316a9f13..3e8686876 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -229,11 +229,11 @@ Border width for the top border. | *Getter* | get_corner_detail() | +----------+--------------------------+ -This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius (:ref:`set_corner_radius`) into account. +This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius (:ref:`set_corner_radius_all`) into account. -For corner radius smaller than 10: 4-5 should be enough +For corner radius smaller than 10, 4-5 should be enough. -For corner radius smaller than 30: 8-12 should be enough +For corner radius smaller than 30, 8-12 should be enough. .. _class_StyleBoxFlat_corner_radius_bottom_left: diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index e47fc8f96..161a46213 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -102,7 +102,7 @@ Controls the texture's behavior when you resize the node's bounding rectangle, * | *Getter* | get_click_mask() | +----------+-----------------------+ -Pure black and white Bitmap image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. +Pure black and white :ref:`BitMap` image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. .. _class_TextureButton_texture_disabled: diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index 4f3e81b6e..c79081eb2 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -24,14 +24,44 @@ Methods +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_tile_bound` **(** :ref:`int` drawn_id, :ref:`int` neighbor_id **)** virtual | +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`autotile_clear_bitmask_map` **(** :ref:`int` id **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`autotile_get_bitmask` **(** :ref:`int` id, :ref:`Vector2` coord **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`BitmaskMode` | :ref:`autotile_get_bitmask_mode` **(** :ref:`int` id **)** const | +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`autotile_get_icon_coordinate` **(** :ref:`int` id **)** const | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`OccluderPolygon2D` | :ref:`autotile_get_light_occluder` **(** :ref:`int` id, :ref:`Vector2` coord **)** const | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NavigationPolygon` | :ref:`autotile_get_navigation_polygon` **(** :ref:`int` id, :ref:`Vector2` coord **)** const | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`autotile_get_size` **(** :ref:`int` id **)** const | +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`autotile_get_spacing` **(** :ref:`int` id **)** const | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`autotile_get_subtile_priority` **(** :ref:`int` id, :ref:`Vector2` coord **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`autotile_get_z_index` **(** :ref:`int` id, :ref:`Vector2` coord **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`autotile_set_bitmask` **(** :ref:`int` id, :ref:`Vector2` bitmask, :ref:`int` flag **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`autotile_set_bitmask_mode` **(** :ref:`int` id, :ref:`BitmaskMode` mode **)** | +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`autotile_set_icon_coordinate` **(** :ref:`int` id, :ref:`Vector2` coord **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`autotile_set_light_occluder` **(** :ref:`int` id, :ref:`OccluderPolygon2D` light_occluder, :ref:`Vector2` coord **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`autotile_set_navigation_polygon` **(** :ref:`int` id, :ref:`NavigationPolygon` navigation_polygon, :ref:`Vector2` coord **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`autotile_set_size` **(** :ref:`int` id, :ref:`Vector2` size **)** | +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`autotile_set_spacing` **(** :ref:`int` id, :ref:`int` spacing **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`autotile_set_subtile_priority` **(** :ref:`int` id, :ref:`Vector2` coord, :ref:`int` priority **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`autotile_set_z_index` **(** :ref:`int` id, :ref:`Vector2` coord, :ref:`int` z_index **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`create_tile` **(** :ref:`int` id **)** | @@ -182,22 +212,132 @@ Method Descriptions - :ref:`bool` **_is_tile_bound** **(** :ref:`int` drawn_id, :ref:`int` neighbor_id **)** virtual +.. _class_TileSet_autotile_clear_bitmask_map: + +- void **autotile_clear_bitmask_map** **(** :ref:`int` id **)** + +Clears all bitmask info of the autotile. + +.. _class_TileSet_autotile_get_bitmask: + +- :ref:`int` **autotile_get_bitmask** **(** :ref:`int` id, :ref:`Vector2` coord **)** + +Returns the bitmask of the subtile from an autotile given its coordinates. + +The value is the sum of the values in :ref:`AutotileBindings` present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right). + .. _class_TileSet_autotile_get_bitmask_mode: - :ref:`BitmaskMode` **autotile_get_bitmask_mode** **(** :ref:`int` id **)** const +Returns the :ref:`BitmaskMode` of the autotile. + +.. _class_TileSet_autotile_get_icon_coordinate: + +- :ref:`Vector2` **autotile_get_icon_coordinate** **(** :ref:`int` id **)** const + +Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates. + +The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask info is incomplete. It will also be used to represent it in the TileSet editor. + +.. _class_TileSet_autotile_get_light_occluder: + +- :ref:`OccluderPolygon2D` **autotile_get_light_occluder** **(** :ref:`int` id, :ref:`Vector2` coord **)** const + +Returns the light occluder of the subtile from an atlas/autotile given its coordinates. + +.. _class_TileSet_autotile_get_navigation_polygon: + +- :ref:`NavigationPolygon` **autotile_get_navigation_polygon** **(** :ref:`int` id, :ref:`Vector2` coord **)** const + +Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates. + .. _class_TileSet_autotile_get_size: - :ref:`Vector2` **autotile_get_size** **(** :ref:`int` id **)** const +Returns the size of the subtiles in an atlas/autotile. + +.. _class_TileSet_autotile_get_spacing: + +- :ref:`int` **autotile_get_spacing** **(** :ref:`int` id **)** const + +Returns the spacing between subtiles of the atlas/autotile. + +.. _class_TileSet_autotile_get_subtile_priority: + +- :ref:`int` **autotile_get_subtile_priority** **(** :ref:`int` id, :ref:`Vector2` coord **)** + +Returns the priority of the subtile from an autotile given its coordinates. + +When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked. + +.. _class_TileSet_autotile_get_z_index: + +- :ref:`int` **autotile_get_z_index** **(** :ref:`int` id, :ref:`Vector2` coord **)** + +Returns the drawing index of the subtile from an atlas/autotile given its coordinates. + +.. _class_TileSet_autotile_set_bitmask: + +- void **autotile_set_bitmask** **(** :ref:`int` id, :ref:`Vector2` bitmask, :ref:`int` flag **)** + +Sets the bitmask of the subtile from an autotile given its coordinates. + +The value is the sum of the values in :ref:`AutotileBindings` present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right). + .. _class_TileSet_autotile_set_bitmask_mode: - void **autotile_set_bitmask_mode** **(** :ref:`int` id, :ref:`BitmaskMode` mode **)** +Sets the :ref:`BitmaskMode` of the autotile. + +.. _class_TileSet_autotile_set_icon_coordinate: + +- void **autotile_set_icon_coordinate** **(** :ref:`int` id, :ref:`Vector2` coord **)** + +Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates. + +The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask info is incomplete. It will also be used to represent it in the TileSet editor. + +.. _class_TileSet_autotile_set_light_occluder: + +- void **autotile_set_light_occluder** **(** :ref:`int` id, :ref:`OccluderPolygon2D` light_occluder, :ref:`Vector2` coord **)** + +Sets the light occluder of the subtile from an atlas/autotile given its coordinates. + +.. _class_TileSet_autotile_set_navigation_polygon: + +- void **autotile_set_navigation_polygon** **(** :ref:`int` id, :ref:`NavigationPolygon` navigation_polygon, :ref:`Vector2` coord **)** + +Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates. + .. _class_TileSet_autotile_set_size: - void **autotile_set_size** **(** :ref:`int` id, :ref:`Vector2` size **)** +Sets the size of the subtiles in an atlas/autotile. + +.. _class_TileSet_autotile_set_spacing: + +- void **autotile_set_spacing** **(** :ref:`int` id, :ref:`int` spacing **)** + +Sets the spacing between subtiles of the atlas/autotile. + +.. _class_TileSet_autotile_set_subtile_priority: + +- void **autotile_set_subtile_priority** **(** :ref:`int` id, :ref:`Vector2` coord, :ref:`int` priority **)** + +Sets the priority of the subtile from an autotile given its coordinates. + +When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked. + +.. _class_TileSet_autotile_set_z_index: + +- void **autotile_set_z_index** **(** :ref:`int` id, :ref:`Vector2` coord, :ref:`int` z_index **)** + +Sets the drawing index of the subtile from an atlas/autotile given its coordinates. + .. _class_TileSet_clear: - void **clear** **(** **)** @@ -346,7 +486,7 @@ Returns the texture offset of the tile. - :ref:`TileMode` **tile_get_tile_mode** **(** :ref:`int` id **)** const -Returns the tile's :ref:`TileMode`. +Returns the tile's :ref:`TileMode`. .. _class_TileSet_tile_get_z_index: @@ -454,7 +594,7 @@ Sets the tile's texture offset. - void **tile_set_tile_mode** **(** :ref:`int` id, :ref:`TileMode` tilemode **)** -Sets the tile's :ref:`TileMode`. +Sets the tile's :ref:`TileMode`. .. _class_TileSet_tile_set_z_index: diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 90a930c0c..64eb05018 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -157,9 +157,9 @@ Returns ``true`` if the timer is stopped. - void **start** **(** :ref:`float` time_sec=-1 **)** -Starts the timer. Sets ``wait_time`` to ``time_sec`` if ``time_sec`` > 0. This also resets the remaining time to ``wait_time``. +Starts the timer. Sets ``wait_time`` to ``time_sec`` if ``time_sec > 0``. This also resets the remaining time to ``wait_time``. -Note: this method will not resume a paused timer. See :ref:`set_paused`. +Note: this method will not resume a paused timer. See :ref:`paused`. .. _class_Timer_stop: diff --git a/classes/class_visualscriptbasictypeconstant.rst b/classes/class_visualscriptbasictypeconstant.rst index 89fa9fd37..5651e6fd2 100644 --- a/classes/class_visualscriptbasictypeconstant.rst +++ b/classes/class_visualscriptbasictypeconstant.rst @@ -28,7 +28,7 @@ Properties Description ----------- -A Visual Script node representing a constant from base types, such as Vector3.AXIS_X. +A Visual Script node representing a constant from base types, such as constant Vector3.AXIS_X. Property Descriptions --------------------- diff --git a/classes/class_visualscriptbuiltinfunc.rst b/classes/class_visualscriptbuiltinfunc.rst index 9c85f75ab..529b600f7 100644 --- a/classes/class_visualscriptbuiltinfunc.rst +++ b/classes/class_visualscriptbuiltinfunc.rst @@ -148,11 +148,11 @@ enum **BuiltinFunc**: - **VAR_TO_STR** = **58** --- Serialize a :ref:`Variant` to a string. -- **STR_TO_VAR** = **59** --- Deserialize a :ref:`Variant` from a string serialized using VAR_TO_STR. +- **STR_TO_VAR** = **59** --- Deserialize a :ref:`Variant` from a string serialized using ``VAR_TO_STR``. - **VAR_TO_BYTES** = **60** --- Serialize a :ref:`Variant` to a :ref:`PoolByteArray`. -- **BYTES_TO_VAR** = **61** --- Deserialize a :ref:`Variant` from a :ref:`PoolByteArray` serialized using VAR_TO_BYTES. +- **BYTES_TO_VAR** = **61** --- Deserialize a :ref:`Variant` from a :ref:`PoolByteArray` serialized using ``VAR_TO_BYTES``. - **COLORN** = **62** --- Return the :ref:`Color` with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc. diff --git a/classes/class_visualscriptclassconstant.rst b/classes/class_visualscriptclassconstant.rst index dfeffc28f..b767115f8 100644 --- a/classes/class_visualscriptclassconstant.rst +++ b/classes/class_visualscriptclassconstant.rst @@ -28,7 +28,7 @@ Properties Description ----------- -This node returns a constant from a given class, such as @GlobalScope.TYPE_INT. See the given class' documentation for available constants. +This node returns a constant from a given class, such as constant @GlobalScope.TYPE_INT. See the given class' documentation for available constants. **Input Ports:** diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index d89a8d985..586abcdb3 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -1005,7 +1005,7 @@ enum **ViewportClearMode**: - **VIEWPORT_CLEAR_NEVER** = **1** --- The viewport is never cleared before drawing. -- **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = **2** --- The viewport is cleared once, then the clear mode is set to VIEWPORT_CLEAR_NEVER. +- **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = **2** --- The viewport is cleared once, then the clear mode is set to ``VIEWPORT_CLEAR_NEVER``. .. _enum_VisualServer_ViewportMSAA: @@ -2986,13 +2986,13 @@ Sets the transformation of a viewport's canvas. - void **viewport_set_clear_mode** **(** :ref:`RID` viewport, :ref:`ViewportClearMode` clear_mode **)** -Sets the clear mode of a viewport. See VIEWPORT_CLEAR_MODE\_\* constants for options. +Sets the clear mode of a viewport. See :ref:`ViewportClearMode` for options. .. _class_VisualServer_viewport_set_debug_draw: - void **viewport_set_debug_draw** **(** :ref:`RID` viewport, :ref:`ViewportDebugDraw` draw **)** -Sets the debug draw mode of a viewport. See VIEWPORT_DEBUG_DRAW\_\* constants for options. +Sets the debug draw mode of a viewport. See :ref:`ViewportDebugDraw` for options. .. _class_VisualServer_viewport_set_disable_3d: diff --git a/classes/class_websocketpeer.rst b/classes/class_websocketpeer.rst index f88f46663..6b1e20efc 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -60,7 +60,7 @@ Method Descriptions - void **close** **(** :ref:`int` code=1000, :ref:`String` reason="" **)** -Close this WebSocket connection. ``code`` is the status code for the closure (see RFC6455 section 7.4 for a list of valid status codes). reason is the human readable reason for closing the connection (can be any UTF8 string, must be less than 123 bytes). +Close this WebSocket connection. ``code`` is the status code for the closure (see RFC6455 section 7.4 for a list of valid status codes). ``reason`` is the human readable reason for closing the connection (can be any UTF8 string, must be less than 123 bytes). Note: To achieve a clean close, you will need to keep polling until either :ref:`WebSocketClient.connection_closed` or :ref:`WebSocketServer.client_disconnected` is received.