diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 922eb696b..dc612f314 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -178,7 +178,7 @@ enum **BlendMode**: Constants --------- -- **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Canvas item transform has changed. Only received if requested. +- **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Canvas item transform has changed. Notification is only received if enabled by :ref:`set_notify_transform` or :ref:`set_notify_local_transform`. - **NOTIFICATION_DRAW** = **30** --- CanvasItem is requested to draw. - **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- Canvas item visibility has changed. - **NOTIFICATION_ENTER_CANVAS** = **32** --- Canvas item has entered the canvas. diff --git a/classes/class_input.rst b/classes/class_input.rst index 21dc0d83b..31a6878a8 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -334,7 +334,7 @@ Removes all mappings from the internal db that match the given uid. - void **set_custom_mouse_cursor** **(** :ref:`Resource` image, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2( 0, 0 ) **)** -Set a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing ``null`` to the image parameter resets to the system cursor. See enum ``CURSOR_*`` for the list of shapes. +Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing ``null`` to the image parameter resets to the system cursor. See enum ``CURSOR_*`` for the list of shapes. ``image``'s size must be lower than 256x256. @@ -344,6 +344,10 @@ Set a custom mouse cursor image, which is only visible inside the game window. T - void **set_default_cursor_shape** **(** :ref:`CursorShape` shape=0 **)** +Sets the default cursor shape to be used in the viewport instead of ``CURSOR_ARROW``. + +Note that if you want to change the default cursor shape for :ref:`Control`'s nodes, use :ref:`Control.mouse_default_cursor_shape` instead. + .. _class_Input_set_mouse_mode: - void **set_mouse_mode** **(** :ref:`MouseMode` mode **)** diff --git a/classes/class_physicsbody.rst b/classes/class_physicsbody.rst index b18cbabd5..1a337f750 100644 --- a/classes/class_physicsbody.rst +++ b/classes/class_physicsbody.rst @@ -82,7 +82,7 @@ A contact is detected if object A is in any of the layers that object B scans, o | *Getter* | get_collision_mask() | +----------+---------------------------+ -The physics layers this area can scan for collisions. +The physics layers this area scans for collisions. Method Descriptions ------------------- @@ -97,10 +97,14 @@ Adds a body to the list of bodies that this body can't collide with. - :ref:`bool` **get_collision_layer_bit** **(** :ref:`int` bit **)** const +Returns an individual bit on the collision mask. + .. _class_PhysicsBody_get_collision_mask_bit: - :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const +Returns an individual bit on the collision mask. + .. _class_PhysicsBody_remove_collision_exception_with: - void **remove_collision_exception_with** **(** :ref:`Node` body **)** @@ -111,7 +115,11 @@ Removes a body from the list of bodies that this body can't collide with. - void **set_collision_layer_bit** **(** :ref:`int` bit, :ref:`bool` value **)** +Sets individual bits on the layer mask. Use this if you only need to change one layer's value. + .. _class_PhysicsBody_set_collision_mask_bit: - void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** +Sets individual bits on the collision mask. Use this if you only need to change one layer's value. + diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index aa1fe8b96..f788efd88 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -84,13 +84,13 @@ A contact is detected if object A is in any of the layers that object B scans, o | *Getter* | get_collision_mask() | +----------+---------------------------+ -The physics layers this area can scan for collisions. +The physics layers this area scans for collisions. .. _class_PhysicsBody2D_layers: - :ref:`int` **layers** -Both collision_layer and collision_mask. Returns collision_layer when accessed. Updates collision_layers and collision_mask when modified. +Both :ref:`collision_layer` and :ref:`collision_mask`. Returns :ref:`collision_layer` when accessed. Updates :ref:`collision_layer` and :ref:`collision_mask` when modified. Method Descriptions ------------------- @@ -105,13 +105,13 @@ Adds a body to the list of bodies that this body can't collide with. - :ref:`bool` **get_collision_layer_bit** **(** :ref:`int` bit **)** const -Return an individual bit on the collision mask. +Returns an individual bit on the collision mask. .. _class_PhysicsBody2D_get_collision_mask_bit: - :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const -Return an individual bit on the collision mask. +Returns an individual bit on the collision mask. .. _class_PhysicsBody2D_remove_collision_exception_with: @@ -123,11 +123,11 @@ Removes a body from the list of bodies that this body can't collide with. - void **set_collision_layer_bit** **(** :ref:`int` bit, :ref:`bool` value **)** -Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier. +Sets individual bits on the layer mask. Use this if you only need to change one layer's value. .. _class_PhysicsBody2D_set_collision_mask_bit: - void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** -Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. +Sets individual bits on the collision mask. Use this if you only need to change one layer's value. diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst index 7fbca0a19..657e6f63d 100644 --- a/classes/class_scenestate.rst +++ b/classes/class_scenestate.rst @@ -75,7 +75,7 @@ enum **GenEditState**: Description ----------- -Maintains a list of resources, nodes, exported and overridden properties, and built-in scripts associated with a scene. +Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene. Method Descriptions ------------------- diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst index 3188f7169..db5468a6b 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -67,7 +67,7 @@ Method Descriptions - :ref:`bool` **collide** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** -Return whether this shape is colliding with another. +Returns ``true`` if this shape is colliding with another. This method needs the transformation matrix for this shape (``local_xform``), the shape to check collisions with (``with_shape``), and the transformation matrix of that shape (``shape_xform``). @@ -75,7 +75,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th - :ref:`Variant` **collide_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** -Return a list of the points where this shape touches another. If there are no collisions, the list is empty. +Returns a list of the points where this shape touches another. If there are no collisions the list is empty. This method needs the transformation matrix for this shape (``local_xform``), the shape to check collisions with (``with_shape``), and the transformation matrix of that shape (``shape_xform``). @@ -91,7 +91,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th - :ref:`Variant` **collide_with_motion_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** -Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty. +Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty. This method needs the transformation matrix for this shape (``local_xform``), the movement to test on this shape (``local_motion``), the shape to check collisions with (``with_shape``), the transformation matrix of that shape (``shape_xform``), and the movement to test onto the other object (``shape_motion``). diff --git a/classes/class_shortcut.rst b/classes/class_shortcut.rst index 433b20f42..1eb078a01 100644 --- a/classes/class_shortcut.rst +++ b/classes/class_shortcut.rst @@ -54,7 +54,7 @@ Property Descriptions | *Getter* | get_shortcut() | +----------+---------------------+ -The Shortcut's :ref:`InputEvent`. +The shortcut's :ref:`InputEvent`. Generally the :ref:`InputEvent` is a keyboard key, though it can be any :ref:`InputEvent`. @@ -65,17 +65,17 @@ Method Descriptions - :ref:`String` **get_as_text** **(** **)** const -Returns the Shortcut's :ref:`InputEvent` as a :ref:`String`. +Returns the shortcut's :ref:`InputEvent` as a :ref:`String`. .. _class_ShortCut_is_shortcut: - :ref:`bool` **is_shortcut** **(** :ref:`InputEvent` event **)** const -Returns ``true`` if the Shortcut's :ref:`InputEvent` equals ``event``. +Returns ``true`` if the shortcut's :ref:`InputEvent` equals ``event``. .. _class_ShortCut_is_valid: - :ref:`bool` **is_valid** **(** **)** const -If ``true`` this Shortcut is valid. +If ``true`` this shortcut is valid. diff --git a/classes/class_softbody.rst b/classes/class_softbody.rst index 1f07827c0..61218e40d 100644 --- a/classes/class_softbody.rst +++ b/classes/class_softbody.rst @@ -14,7 +14,7 @@ SoftBody Brief Description ----------------- - +A soft mesh physics body. Properties ---------- @@ -66,6 +66,11 @@ Methods | void | :ref:`set_ray_pickable` **(** :ref:`bool` ray_pickable **)** | +--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. + Property Descriptions --------------------- @@ -89,6 +94,12 @@ Property Descriptions | *Getter* | get_collision_layer() | +----------+----------------------------+ +The physics layers this area is in. + +Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. + +A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + .. _class_SoftBody_collision_mask: - :ref:`int` **collision_mask** @@ -99,6 +110,8 @@ Property Descriptions | *Getter* | get_collision_mask() | +----------+---------------------------+ +The physics layers this area scans for collisions. + .. _class_SoftBody_damping_coefficient: - :ref:`float` **damping_coefficient** @@ -169,6 +182,8 @@ Property Descriptions | *Getter* | get_simulation_precision() | +----------+---------------------------------+ +Increasing this value will improve the resulting simulation, but can affect performance. Use with care. + .. _class_SoftBody_total_mass: - :ref:`float` **total_mass** @@ -196,14 +211,20 @@ Method Descriptions - void **add_collision_exception_with** **(** :ref:`Node` body **)** +Adds a body to the list of bodies that this body can't collide with. + .. _class_SoftBody_get_collision_layer_bit: - :ref:`bool` **get_collision_layer_bit** **(** :ref:`int` bit **)** const +Returns an individual bit on the collision mask. + .. _class_SoftBody_get_collision_mask_bit: - :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const +Returns an individual bit on the collision mask. + .. _class_SoftBody_is_ray_pickable: - :ref:`bool` **is_ray_pickable** **(** **)** const @@ -212,14 +233,20 @@ Method Descriptions - void **remove_collision_exception_with** **(** :ref:`Node` body **)** +Removes a body from the list of bodies that this body can't collide with. + .. _class_SoftBody_set_collision_layer_bit: - void **set_collision_layer_bit** **(** :ref:`int` bit, :ref:`bool` value **)** +Sets individual bits on the layer mask. Use this if you only need to change one layer's value. + .. _class_SoftBody_set_collision_mask_bit: - void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** +Sets individual bits on the collision mask. Use this if you only need to change one layer's value. + .. _class_SoftBody_set_ray_pickable: - void **set_ray_pickable** **(** :ref:`bool` ray_pickable **)** diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 238fef8b7..a9e7a07ed 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -51,7 +51,7 @@ Signals - **timeout** **(** **)** -Emitted when the Timer reaches 0. +Emitted when the timer reaches 0. Enumerations ------------ @@ -60,8 +60,8 @@ Enumerations enum **TimerProcessMode**: -- **TIMER_PROCESS_PHYSICS** = **0** --- Update the Timer during the physics step at each frame (fixed framerate processing). -- **TIMER_PROCESS_IDLE** = **1** --- Update the Timer during the idle time at each frame. +- **TIMER_PROCESS_PHYSICS** = **0** --- Update the timer during the physics step at each frame (fixed framerate processing). +- **TIMER_PROCESS_IDLE** = **1** --- Update the timer during the idle time at each frame. Description ----------- @@ -81,7 +81,7 @@ Property Descriptions | *Getter* | has_autostart() | +----------+----------------------+ -If ``true``, Timer will automatically start when entering the scene tree. Default value: ``false``. +If ``true`` the timer will automatically start when entering the scene tree. Default value: ``false``. .. _class_Timer_one_shot: @@ -93,7 +93,7 @@ If ``true``, Timer will automatically start when entering the scene tree. Defaul | *Getter* | is_one_shot() | +----------+---------------------+ -If ``true``, Timer will stop when reaching 0. If ``false``, it will restart. Default value: ``false``. +If ``true`` the timer will stop when reaching 0. If ``false`` it will restart. Default value: ``false``. .. _class_Timer_paused: @@ -105,7 +105,7 @@ If ``true``, Timer will stop when reaching 0. If ``false``, it will restart. Def | *Getter* | is_paused() | +----------+-------------------+ -If ``true``, the timer is paused and will not process until it is unpaused again, even if :ref:`start` is called. +If ``true`` the timer is paused and will not process until it is unpaused again, even if :ref:`start` is called. .. _class_Timer_process_mode: @@ -117,7 +117,7 @@ If ``true``, the timer is paused and will not process until it is unpaused again | *Getter* | get_timer_process_mode() | +----------+-------------------------------+ -Processing mode. Uses TIMER_PROCESS\_\* constants as value. +Processing mode. See :ref:`TimerProcessMode`. .. _class_Timer_time_left: @@ -129,6 +129,8 @@ Processing mode. Uses TIMER_PROCESS\_\* constants as value. The timer's remaining time in seconds. Returns 0 if the timer is inactive. +Note: You cannot set this value. To change the timer's remaining time, use :ref:`wait_time`. + .. _class_Timer_wait_time: - :ref:`float` **wait_time** @@ -162,5 +164,5 @@ Note: this method will not resume a paused timer. See :ref:`set_paused