diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 3e24fdaa0..d44c3fc07 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -31,6 +31,10 @@ Member Functions +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringArray` | :ref:`get_animation_list` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`animation_set_next` **(** :ref:`String` anim_from, :ref:`String` anim_to **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`animation_get_next` **(** :ref:`String` anim_from **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_blend_time` **(** :ref:`String` anim_from, :ref:`String` anim_to, :ref:`float` sec **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_blend_time` **(** :ref:`String` anim_from, :ref:`String` anim_to **)** const | @@ -148,6 +152,14 @@ Get an :ref:`Animation` resource by requesting a name. Get the list of names of the animations stored in the player. +.. _class_AnimationPlayer_animation_set_next: + +- void **animation_set_next** **(** :ref:`String` anim_from, :ref:`String` anim_to **)** + +.. _class_AnimationPlayer_animation_get_next: + +- :ref:`String` **animation_get_next** **(** :ref:`String` anim_from **)** const + .. _class_AnimationPlayer_set_blend_time: - void **set_blend_time** **(** :ref:`String` anim_from, :ref:`String` anim_to, :ref:`float` sec **)** @@ -182,10 +194,14 @@ Play a given animation by the animation name. Custom speed and blend times can b - void **play_backwards** **(** :ref:`String` name="", :ref:`float` custom_blend=-1 **)** +Play a given animation by the animation name in reverse. + .. _class_AnimationPlayer_stop: - void **stop** **(** :ref:`bool` reset=true **)** +Stop the currently playing animation. + .. _class_AnimationPlayer_stop_all: - void **stop_all** **(** **)** @@ -324,4 +340,6 @@ Get the length (in seconds) of the currently being played animation. - void **advance** **(** :ref:`float` delta **)** +Used to skip ahead or skip back in an animation. Delta is the time in seconds to skip. + diff --git a/classes/class_area.rst b/classes/class_area.rst index a603cb6cf..29afb49d4 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -18,55 +18,55 @@ Brief Description Member Functions ---------------- -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_space_override_mode` **(** :ref:`int` enable **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_space_override_mode` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_is_point` **(** :ref:`bool` enable **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_gravity_a_point` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_distance_scale` **(** :ref:`float` distance_scale **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_gravity_distance_scale` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_vector` **(** :ref:`Vector3` vector **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_gravity_vector` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_gravity` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_priority` **(** :ref:`float` priority **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_priority` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_monitorable` **(** :ref:`bool` enable **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_monitorable` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_enable_monitoring` **(** :ref:`bool` enable **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_monitoring_enabled` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_overlapping_bodies` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_overlapping_areas` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsBody` | :ref:`overlaps_body` **(** :ref:`Object` body **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Area` | :ref:`overlaps_area` **(** :ref:`Object` area **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_space_override_mode` **(** :ref:`int` enable **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_space_override_mode` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_is_point` **(** :ref:`bool` enable **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_gravity_a_point` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_distance_scale` **(** :ref:`float` distance_scale **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity_distance_scale` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_vector` **(** :ref:`Vector3` vector **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_gravity_vector` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_priority` **(** :ref:`float` priority **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_priority` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_monitorable` **(** :ref:`bool` enable **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitorable` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_monitoring` **(** :ref:`bool` enable **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitoring_enabled` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_bodies` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_areas` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`overlaps_body` **(** :ref:`Object` body **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`overlaps_area` **(** :ref:`Object` area **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -185,10 +185,10 @@ AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calcula .. _class_Area_overlaps_body: -- :ref:`PhysicsBody` **overlaps_body** **(** :ref:`Object` body **)** const +- :ref:`bool` **overlaps_body** **(** :ref:`Object` body **)** const .. _class_Area_overlaps_area: -- :ref:`Area` **overlaps_area** **(** :ref:`Object` area **)** const +- :ref:`bool` **overlaps_area** **(** :ref:`Object` area **)** const diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 104e5fba9..181e50483 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -18,71 +18,71 @@ General purpose area detection and influence for 2D physics. Member Functions ---------------- -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_space_override_mode` **(** :ref:`int` enable **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_space_override_mode` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_is_point` **(** :ref:`bool` enable **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_gravity_a_point` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_distance_scale` **(** :ref:`float` distance_scale **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_gravity_distance_scale` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_vector` **(** :ref:`Vector2` vector **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_gravity_vector` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_gravity` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_priority` **(** :ref:`float` priority **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_priority` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask` **(** :ref:`int` collision_mask **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_mask` **(** :ref:`int` layer_mask **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_layer_mask_bit` **(** :ref:`int` bit **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_enable_monitoring` **(** :ref:`bool` enable **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_monitoring_enabled` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_monitorable` **(** :ref:`bool` enable **)** | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_monitorable` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_overlapping_bodies` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_overlapping_areas` **(** **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsBody2D` | :ref:`overlaps_body` **(** :ref:`Object` body **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Area2D` | :ref:`overlaps_area` **(** :ref:`Object` area **)** const | -+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_space_override_mode` **(** :ref:`int` enable **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_space_override_mode` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_is_point` **(** :ref:`bool` enable **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_gravity_a_point` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_distance_scale` **(** :ref:`float` distance_scale **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity_distance_scale` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_vector` **(** :ref:`Vector2` vector **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_gravity_vector` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_priority` **(** :ref:`float` priority **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_priority` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask` **(** :ref:`int` collision_mask **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` layer_mask **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_layer_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_monitoring` **(** :ref:`bool` enable **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitoring_enabled` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_monitorable` **(** :ref:`bool` enable **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitorable` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_bodies` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_areas` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`overlaps_body` **(** :ref:`Object` body **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`overlaps_area` **(** :ref:`Object` area **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -310,13 +310,13 @@ Return a list of the areas that are totally or partially inside this area. .. _class_Area2D_overlaps_body: -- :ref:`PhysicsBody2D` **overlaps_body** **(** :ref:`Object` body **)** const +- :ref:`bool` **overlaps_body** **(** :ref:`Object` body **)** const Return whether the body passed is totally or partially inside this area. .. _class_Area2D_overlaps_area: -- :ref:`Area2D` **overlaps_area** **(** :ref:`Object` area **)** const +- :ref:`bool` **overlaps_area** **(** :ref:`Object` area **)** const Return whether the area passed is totally or partially inside this area. diff --git a/classes/class_bool.rst b/classes/class_bool.rst index 06192f940..e57afd7ed 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -36,12 +36,18 @@ Member Function Description - :ref:`bool` **bool** **(** :ref:`int` from **)** +Cast an :ref:`int` value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case. + .. _class_bool_bool: - :ref:`bool` **bool** **(** :ref:`float` from **)** +Cast a :ref:`float` value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case. + .. _class_bool_bool: - :ref:`bool` **bool** **(** :ref:`String` from **)** +Cast a :ref:`String` value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: ``bool('False')`` returns true, ``bool('')``. returns false + diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index ff7523302..8be333952 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -20,113 +20,113 @@ Base class of anything 2D. Member Functions ---------------- -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_draw` **(** **)** virtual | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit_set_state` **(** var state **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit_get` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit_set_rect` **(** :ref:`Rect2` rect **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit_rotate` **(** :ref:`float` degrees **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_item_rect` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_canvas_item` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_visible` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_hidden` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`show` **(** **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hide` **(** **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update` **(** **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_as_toplevel` **(** :ref:`bool` enable **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_set_as_toplevel` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_blend_mode` **(** :ref:`int` blend_mode **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_blend_mode` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_light_mask` **(** :ref:`int` light_mask **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_light_mask` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_opacity` **(** :ref:`float` opacity **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_opacity` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_self_opacity` **(** :ref:`float` self_opacity **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_self_opacity` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_draw_behind_parent` **(** :ref:`bool` enable **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_draw_behind_parent_enabled` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1 **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_rect` **(** :ref:`Rect2` rect, :ref:`Color` color **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_circle` **(** :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_texture` **(** :ref:`Texture` texture, :ref:`Vector2` pos, :ref:`Color` modulate=Color(1,1,1,1) **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_texture_rect` **(** :ref:`Texture` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_texture_rect_region` **(** :ref:`Texture` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_primitive` **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object(), :ref:`float` width=1 **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_polygon` **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object() **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_colored_polygon` **(** :ref:`Vector2Array` points, :ref:`Color` color, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object() **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`draw_char` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`String` next, :ref:`Color` modulate=Color(1,1,1,1) **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_set_transform` **(** :ref:`Vector2` pos, :ref:`float` rot, :ref:`Vector2` scale **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Matrix32` | :ref:`get_transform` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Matrix32` | :ref:`get_global_transform` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Matrix32` | :ref:`get_global_transform_with_canvas` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Matrix32` | :ref:`get_viewport_transform` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_viewport_rect` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Matrix32` | :ref:`get_canvas_transform` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_local_mouse_pos` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_global_mouse_pos` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_canvas` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_world_2d` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_material` **(** :ref:`CanvasItemMaterial` material **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CanvasItemMaterial` | :ref:`get_material` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_parent_material` **(** :ref:`bool` enable **)** | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_use_parent_material` **(** **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** const | -+------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_draw` **(** **)** virtual | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_set_state` **(** var state **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_get` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_set_rect` **(** :ref:`Rect2` rect **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_rotate` **(** :ref:`float` degrees **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_item_rect` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_canvas_item` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_visible` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_hidden` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`show` **(** **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hide` **(** **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update` **(** **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_toplevel` **(** :ref:`bool` enable **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_set_as_toplevel` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_blend_mode` **(** :ref:`int` blend_mode **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_blend_mode` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_light_mask` **(** :ref:`int` light_mask **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_light_mask` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_opacity` **(** :ref:`float` opacity **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_opacity` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_self_opacity` **(** :ref:`float` self_opacity **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_self_opacity` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_behind_parent` **(** :ref:`bool` enable **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_draw_behind_parent_enabled` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1 **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_rect` **(** :ref:`Rect2` rect, :ref:`Color` color **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_circle` **(** :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_texture` **(** :ref:`Texture` texture, :ref:`Vector2` pos, :ref:`Color` modulate=Color(1,1,1,1) **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_texture_rect` **(** :ref:`Texture` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_texture_rect_region` **(** :ref:`Texture` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_primitive` **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs, :ref:`Texture` texture=NULL, :ref:`float` width=1 **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_polygon` **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Vector2Array(), :ref:`Texture` texture=NULL **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_colored_polygon` **(** :ref:`Vector2Array` points, :ref:`Color` color, :ref:`Vector2Array` uvs=Vector2Array(), :ref:`Texture` texture=NULL **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`draw_char` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`String` next, :ref:`Color` modulate=Color(1,1,1,1) **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_set_transform` **(** :ref:`Vector2` pos, :ref:`float` rot, :ref:`Vector2` scale **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_transform` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_global_transform` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_global_transform_with_canvas` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_viewport_transform` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_viewport_rect` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_canvas_transform` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_local_mouse_pos` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_global_mouse_pos` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_canvas` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_world_2d` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_material` **(** :ref:`CanvasItemMaterial` material **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`CanvasItemMaterial` | :ref:`get_material` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_parent_material` **(** :ref:`bool` enable **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_use_parent_material` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -350,19 +350,19 @@ Draw a styled rectangle. .. _class_CanvasItem_draw_primitive: -- void **draw_primitive** **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object(), :ref:`float` width=1 **)** +- void **draw_primitive** **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs, :ref:`Texture` texture=NULL, :ref:`float` width=1 **)** Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad. .. _class_CanvasItem_draw_polygon: -- void **draw_polygon** **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object() **)** +- void **draw_polygon** **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Vector2Array(), :ref:`Texture` texture=NULL **)** Draw a polygon of any amount of points, convex or concave. .. _class_CanvasItem_draw_colored_polygon: -- void **draw_colored_polygon** **(** :ref:`Vector2Array` points, :ref:`Color` color, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object() **)** +- void **draw_colored_polygon** **(** :ref:`Vector2Array` points, :ref:`Color` color, :ref:`Vector2Array` uvs=Vector2Array(), :ref:`Texture` texture=NULL **)** Draw a colored polygon of any amount of points, convex or concave. diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index a1ee61a80..75c3ee1f0 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -33,15 +33,19 @@ Member Functions +----------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_offset` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_rotation` **(** :ref:`float` rotation **)** | +| void | :ref:`set_rotation` **(** :ref:`float` radians **)** | +----------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_rotation` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotationd` **(** :ref:`float` degrees **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_rotationd` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | +----------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_scale` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------+ -| Canvas | :ref:`get_world_2d` **(** **)** const | +| :ref:`World2D` | :ref:`get_world_2d` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_viewport` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------+ @@ -92,7 +96,7 @@ Return the base offset for this layer (helper). .. _class_CanvasLayer_set_rotation: -- void **set_rotation** **(** :ref:`float` rotation **)** +- void **set_rotation** **(** :ref:`float` radians **)** Set the base rotation for this layer (helper). @@ -102,6 +106,14 @@ Set the base rotation for this layer (helper). Return the base rotation for this layer (helper). +.. _class_CanvasLayer_set_rotationd: + +- void **set_rotationd** **(** :ref:`float` degrees **)** + +.. _class_CanvasLayer_get_rotationd: + +- :ref:`float` **get_rotationd** **(** **)** const + .. _class_CanvasLayer_set_scale: - void **set_scale** **(** :ref:`Vector2` scale **)** @@ -116,7 +128,7 @@ Return the base scale for this layer (helper). .. _class_CanvasLayer_get_world_2d: -- Canvas **get_world_2d** **(** **)** const +- :ref:`World2D` **get_world_2d** **(** **)** const Return the :ref:`World2D` used by this layer. diff --git a/classes/class_colorramp.rst b/classes/class_colorramp.rst index 9961df2d4..5d60913df 100644 --- a/classes/class_colorramp.rst +++ b/classes/class_colorramp.rst @@ -13,7 +13,7 @@ ColorRamp Brief Description ----------------- - +Color interpolator node Member Functions ---------------- @@ -44,6 +44,11 @@ Member Functions | :ref:`ColorArray` | :ref:`get_colors` **(** **)** const | +--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1. + Member Function Description --------------------------- @@ -51,48 +56,72 @@ Member Function Description - void **add_point** **(** :ref:`float` offset, :ref:`Color` color **)** +Adds the specified color to the end of the ramp, with the specified offset + .. _class_ColorRamp_remove_point: - void **remove_point** **(** :ref:`int` offset **)** +Removes the color at the index *offset* + .. _class_ColorRamp_set_offset: - void **set_offset** **(** :ref:`int` point, :ref:`float` offset **)** +Sets the offset for the ramp color at index *point* + .. _class_ColorRamp_get_offset: - :ref:`float` **get_offset** **(** :ref:`int` point **)** const +Returns the offset of the ramp color at index *point* + .. _class_ColorRamp_set_color: - void **set_color** **(** :ref:`int` point, :ref:`Color` color **)** +Sets the color of the ramp color at index *point* + .. _class_ColorRamp_get_color: - :ref:`Color` **get_color** **(** :ref:`int` point **)** const +Returns the color of the ramp color at index *point* + .. _class_ColorRamp_interpolate: - :ref:`Color` **interpolate** **(** :ref:`float` offset **)** +Returns the interpolated color specified by *offset* + .. _class_ColorRamp_get_point_count: - :ref:`int` **get_point_count** **(** **)** const +Returns the number of colors in the ramp + .. _class_ColorRamp_set_offsets: - void **set_offsets** **(** :ref:`RealArray` offsets **)** +Sets the offset for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accomodate the new elements, all new colors will be black by default. + .. _class_ColorRamp_get_offsets: - :ref:`RealArray` **get_offsets** **(** **)** const +Returns the offsets for the colors in this ramp + .. _class_ColorRamp_set_colors: - void **set_colors** **(** :ref:`ColorArray` colors **)** +Sets the colors for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accomodate the new elements. + .. _class_ColorRamp_get_colors: - :ref:`ColorArray` **get_colors** **(** **)** const +Returns the colors in the ramp + diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 89b1aa970..c6f00a61b 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -13,7 +13,7 @@ ConfigFile Brief Description ----------------- - +Helper class to handle INI-style files. Member Functions ---------------- @@ -21,7 +21,7 @@ Member Functions +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_value` **(** :ref:`String` section, :ref:`String` key, var value **)** | +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get_value` **(** :ref:`String` section, :ref:`String` key, var default=NULL **)** const | +| Variant | :ref:`get_value` **(** :ref:`String` section, :ref:`String` key, var default=NULL **)** const | +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_section` **(** :ref:`String` section **)** const | +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -36,6 +36,26 @@ Member Functions | Error | :ref:`save` **(** :ref:`String` path **)** | +----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +This helper class can be used to store :ref:`Variant` values on the filesystem using an INI-style formatting. The stored values as referenced by a section and a key. The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly with accessing the filesystem. + +The following example shows how to parse a INI-style file from the system, read its contents and store new values in it: + +:: + + var config = ConfigFile.new() + var err = config.load("user://settings.cfg") + if err == OK: # if not, something went wrong with the file loading + # Look for the display/width pair, and default to 1024 if missing + var screen_width = get_value("display", "width", 1024) + # Store a variable if and only it hasn't been defined yet + if not config.has_section_key("audio", "mute"): + config.set_value("audio", "mute", false) + # Save the changes by overwriting the previous file + config.save("user://settings.cfg") + Member Function Description --------------------------- @@ -43,32 +63,50 @@ Member Function Description - void **set_value** **(** :ref:`String` section, :ref:`String` key, var value **)** +Assign a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a ``NULL`` value deletes the specified key if it exists (and deletes the section if it ends up empty once the key has been removed). + .. _class_ConfigFile_get_value: -- void **get_value** **(** :ref:`String` section, :ref:`String` key, var default=NULL **)** const +- Variant **get_value** **(** :ref:`String` section, :ref:`String` key, var default=NULL **)** const + +Return the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional *default* argument (and thus ``NULL`` if not specified). .. _class_ConfigFile_has_section: - :ref:`bool` **has_section** **(** :ref:`String` section **)** const +Check if the specified section exists. + .. _class_ConfigFile_has_section_key: - :ref:`bool` **has_section_key** **(** :ref:`String` section, :ref:`String` key **)** const +Check if the specified section-key pair exists. + .. _class_ConfigFile_get_sections: - :ref:`StringArray` **get_sections** **(** **)** const +Return an array of all defined section identifiers. + .. _class_ConfigFile_get_section_keys: - :ref:`StringArray` **get_section_keys** **(** :ref:`String` section **)** const +Return an array of all defined key identifiers in the specified section. + .. _class_ConfigFile_load: - Error **load** **(** :ref:`String` path **)** +Load the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object from which the method was called. The return value is one of the OK, FAILED or ERR\_\* constants listed in :ref:`@Global Scope` (if the load was successful, it returns OK). + .. _class_ConfigFile_save: - Error **save** **(** :ref:`String` path **)** +Save the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. + +The return value is one of the OK, FAILED or ERR\_\* constants listed in :ref:`@Global Scope` (if the save was successful, it returns OK). + diff --git a/classes/class_control.rst b/classes/class_control.rst index 931ee88de..de837962a 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -57,7 +57,9 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_pos` **(** :ref:`Vector2` pos **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_rotation` **(** :ref:`float` rotation **)** | +| void | :ref:`set_rotation` **(** :ref:`float` radians **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotation_deg` **(** :ref:`float` degrees **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -73,6 +75,8 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_rotation` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_rotation_deg` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_scale` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_custom_minimum_size` **(** **)** const | @@ -341,7 +345,11 @@ Move the Control to a new position, relative to the top-left corner of the *wind .. _class_Control_set_rotation: -- void **set_rotation** **(** :ref:`float` rotation **)** +- void **set_rotation** **(** :ref:`float` radians **)** + +.. _class_Control_set_rotation_deg: + +- void **set_rotation_deg** **(** :ref:`float` degrees **)** .. _class_Control_set_scale: @@ -379,6 +387,10 @@ Returns the size of the Control, computed from all margins, however the size ret - :ref:`float` **get_rotation** **(** **)** const +.. _class_Control_get_rotation_deg: + +- :ref:`float` **get_rotation_deg** **(** **)** const + .. _class_Control_get_scale: - :ref:`Vector2` **get_scale** **(** **)** const diff --git a/classes/class_directory.rst b/classes/class_directory.rst index 8e5cebafd..371809570 100644 --- a/classes/class_directory.rst +++ b/classes/class_directory.rst @@ -37,13 +37,13 @@ Member Functions +------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_current_dir` **(** **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ -| Error | :ref:`make_dir` **(** :ref:`String` name **)** | +| Error | :ref:`make_dir` **(** :ref:`String` path **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ -| Error | :ref:`make_dir_recursive` **(** :ref:`String` name **)** | +| Error | :ref:`make_dir_recursive` **(** :ref:`String` path **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`file_exists` **(** :ref:`String` name **)** | +| :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`dir_exists` **(** :ref:`String` name **)** | +| :ref:`bool` | :ref:`dir_exists` **(** :ref:`String` path **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_space_left` **(** **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ @@ -51,31 +51,31 @@ Member Functions +------------------------------+----------------------------------------------------------------------------------------------------------------------+ | Error | :ref:`rename` **(** :ref:`String` from, :ref:`String` to **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ -| Error | :ref:`remove` **(** :ref:`String` file **)** | +| Error | :ref:`remove` **(** :ref:`String` path **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ Description ----------- -Directory type. Is used to manage directories and their content (not restricted to the project folder). +Directory type. It is used to manage directories and their content (not restricted to the project folder). -Example for how to iterate through the files of a directory: +Here is an example on how to iterate through the files of a directory: :: - func dir(path): - var d = Directory.new() - if d.open( path )==0: - d.list_dir_begin() - var file_name = d.get_next() - while(file_name!=""): - if d.current_is_dir(): + func dir_contents(path): + var dir = Directory.new() + if dir.open(path) == OK: + dir.list_dir_begin() + var file_name = dir.get_next() + while (file_name != ""): + if dir.current_is_dir(): print("Found directory: " + file_name) else: - print("Found file:" + file_name) - file_name = d.get_next() + print("Found file: " + file_name) + file_name = dir.get_next() else: - print("Some open Error, maybe directory not found?") + print("An error occurred when trying to access the path.") Member Function Description --------------------------- @@ -84,86 +84,118 @@ Member Function Description - Error **open** **(** :ref:`String` path **)** -Opens a directory to work with. Needs a path, example "res://folder" +Open an existing directory of the filesystem. The *path* argument can be within the project tree (``res://folder``), the user directory (``user://folder``) or an absolute path of the user filesystem (e.g. ``/tmp/folder`` or ``C:\tmp\folder``). + +The method returns one of the error code constants defined in :ref:`@Global Scope` (OK or ERR\_\*). .. _class_Directory_list_dir_begin: - :ref:`bool` **list_dir_begin** **(** **)** -Loads all file names of the current directory (prepares the get_next() function). +Initialise the stream used to list all files and directories using the :ref:`get_next` function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with :ref:`list_dir_end`. + +Return false if the stream could not be initialised. .. _class_Directory_get_next: - :ref:`String` **get_next** **(** **)** -Is used to iterate through the files of the current directory. Returns the name(no path) of the current file/directory, it also contains "." and ".." . - -Returns an empty String "" at the end of the list. +Return the next element (file or directory) in the current directory (including ``.`` and ``..``). The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. :ref:`list_dir_end` would not be mandatory in such a case). .. _class_Directory_current_is_dir: - :ref:`bool` **current_is_dir** **(** **)** const -Returns true if the current file you are looking at with get_next() is a directory or "." or ".." otherwise false. +Return whether the current item processed with the last :ref:`get_next` call is a directory (``.`` and ``..`` are considered directories). .. _class_Directory_list_dir_end: - void **list_dir_end** **(** **)** -Run this to empty the list of remaining files in get_next(). You can use it to end the iteration, as soon as your goal is reached. +Close the current stream opened with :ref:`list_dir_begin` (whether it has been fully processed with :ref:`get_next` or not does not matter). .. _class_Directory_get_drive_count: - :ref:`int` **get_drive_count** **(** **)** +On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0. + .. _class_Directory_get_drive: - :ref:`String` **get_drive** **(** :ref:`int` idx **)** +On Windows, return the name of the drive (partition) passed as an argument (e.g. ``C:``). On other platforms, or if the requested drive does not existed, the method returns an empty String. + .. _class_Directory_change_dir: - Error **change_dir** **(** :ref:`String` todir **)** -Needs a path or name to the next directory. When the target directory is in the current directory you can use "newfolder" otherwise you need the full path "res://currentfolder/newfolder" +Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. ``newdir`` or ``../newdir``), or an absolute path (e.g. ``/tmp/newdir`` or ``res://somedir/newdir``). + +The method returns one of the error code constants defined in :ref:`@Global Scope` (OK or ERR\_\*). .. _class_Directory_get_current_dir: - :ref:`String` **get_current_dir** **(** **)** -Returns a path to the current directory, example: "res://folder" +Return the absolute path to the currently opened directory (e.g. ``res://folder`` or ``C:\tmp\folder``). .. _class_Directory_make_dir: -- Error **make_dir** **(** :ref:`String` name **)** +- Error **make_dir** **(** :ref:`String` path **)** + +Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see :ref:`make_dir_recursive`). + +The method returns one of the error code constants defined in :ref:`@Global Scope` (OK, FAILED or ERR\_\*). .. _class_Directory_make_dir_recursive: -- Error **make_dir_recursive** **(** :ref:`String` name **)** +- Error **make_dir_recursive** **(** :ref:`String` path **)** + +Create a target directory and all necessary intermediate directories in its path, by calling :ref:`make_dir` recursively. The argument can be relative to the current directory, or an absolute path. + +Returns one of the error code constants defined in :ref:`@Global Scope` (OK, FAILED or ERR\_\*). .. _class_Directory_file_exists: -- :ref:`bool` **file_exists** **(** :ref:`String` name **)** +- :ref:`bool` **file_exists** **(** :ref:`String` path **)** + +Return whether the target file exists. The argument can be relative to the current directory, or an absolute path. .. _class_Directory_dir_exists: -- :ref:`bool` **dir_exists** **(** :ref:`String` name **)** +- :ref:`bool` **dir_exists** **(** :ref:`String` path **)** -Returns true if directory exists otherwise false. Needs a path, example: "res://folder" +Return whether the target directory exists. The argument can be relative to the current directory, or an absolute path. .. _class_Directory_get_space_left: - :ref:`int` **get_space_left** **(** **)** +On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. + .. _class_Directory_copy: - Error **copy** **(** :ref:`String` from, :ref:`String` to **)** +Copy the *from* file to the *to* destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + +Returns one of the error code constants defined in :ref:`@Global Scope` (OK, FAILED or ERR\_\*). + .. _class_Directory_rename: - Error **rename** **(** :ref:`String` from, :ref:`String` to **)** +Rename (move) the *from* file to the *to* destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + +Returns one of the error code constants defined in :ref:`@Global Scope` (OK or FAILED). + .. _class_Directory_remove: -- Error **remove** **(** :ref:`String` file **)** +- Error **remove** **(** :ref:`String` path **)** + +Delete the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. + +Returns one of the error code constants defined in :ref:`@Global Scope` (OK or FAILED). diff --git a/classes/class_float.rst b/classes/class_float.rst index 9479733f9..ad3834a79 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -11,7 +11,7 @@ float Brief Description ----------------- - +Float built-in type Member Functions ---------------- @@ -24,6 +24,11 @@ Member Functions | :ref:`float` | :ref:`float` **(** :ref:`String` from **)** | +----------------------------+--------------------------------------------------------------------------------+ +Description +----------- + +Float built-in type. + Member Function Description --------------------------- @@ -31,12 +36,18 @@ Member Function Description - :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. + .. _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. + .. _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. + diff --git a/classes/class_image.rst b/classes/class_image.rst index 6ba7939f8..a508df99d 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -31,6 +31,8 @@ Member Functions +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`empty` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fix_alpha_edges` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RawArray` | :ref:`get_data` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_format` **(** **)** | @@ -123,6 +125,10 @@ Member Function Description - :ref:`bool` **empty** **(** **)** +.. _class_Image_fix_alpha_edges: + +- void **fix_alpha_edges** **(** **)** + .. _class_Image_get_data: - :ref:`RawArray` **get_data** **(** **)** diff --git a/classes/class_input.rst b/classes/class_input.rst index 59d21e9ba..0ad18045e 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -15,7 +15,7 @@ Input Brief Description ----------------- - +A Singleton that deals with inputs. Member Functions ---------------- @@ -68,9 +68,14 @@ Signals Numeric Constants ----------------- -- **MOUSE_MODE_VISIBLE** = **0** -- **MOUSE_MODE_HIDDEN** = **1** -- **MOUSE_MODE_CAPTURED** = **2** +- **MOUSE_MODE_VISIBLE** = **0** --- Makes the mouse cursor visible if it is hidden. +- **MOUSE_MODE_HIDDEN** = **1** --- Makes the mouse cursor hidden if it is visible. +- **MOUSE_MODE_CAPTURED** = **2** --- Captures the mouse. The mouse will be hidden and unable to leave the game window. But it will still register movement and mouse button presses. + +Description +----------- + +A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joysticks, and input actions. Member Function Description --------------------------- @@ -79,6 +84,8 @@ Member Function Description - :ref:`bool` **is_key_pressed** **(** :ref:`int` scancode **)** +Returns true or false depending on whether the key is pressed or not. You can pass KEY\_\*, which are pre-defined constants listed in :ref:`@Global Scope`. + .. _class_Input_is_mouse_button_pressed: - :ref:`bool` **is_mouse_button_pressed** **(** :ref:`int` button **)** @@ -95,6 +102,8 @@ Returns if the joystick button at the given index is currently pressed. (see JOY - :ref:`bool` **is_action_pressed** **(** :ref:`String` action **)** +Returns true or false depending on whether the action event is pressed. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with :ref:`InputMap`. + .. _class_Input_add_joy_mapping: - void **add_joy_mapping** **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** @@ -135,36 +144,54 @@ Returns a SDL2 compatible device guid on platforms that use gamepad remapping. R - :ref:`Vector3` **get_accelerometer** **(** **)** +If the device has an accelerometer, this will return the movement. + .. _class_Input_get_mouse_speed: - :ref:`Vector2` **get_mouse_speed** **(** **)** const +Returns the mouse speed. + .. _class_Input_get_mouse_button_mask: - :ref:`int` **get_mouse_button_mask** **(** **)** const +Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together. + .. _class_Input_set_mouse_mode: - void **set_mouse_mode** **(** :ref:`int` mode **)** +Set the mouse mode. See the constants for more information. + .. _class_Input_get_mouse_mode: - :ref:`int` **get_mouse_mode** **(** **)** const +Return the mouse mode. See the constants for more information. + .. _class_Input_warp_mouse_pos: - void **warp_mouse_pos** **(** :ref:`Vector2` to **)** +Sets the mouse position to the specified vector. + .. _class_Input_action_press: - void **action_press** **(** :ref:`String` action **)** +This will simulate pressing the specificed action. + .. _class_Input_action_release: - void **action_release** **(** :ref:`String` action **)** +If the specified action is already pressed, this will release it. + .. _class_Input_set_custom_mouse_cursor: - void **set_custom_mouse_cursor** **(** :ref:`Texture` image, :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. + diff --git a/classes/class_int.rst b/classes/class_int.rst index 3b27bfb50..6fea70f36 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -36,12 +36,18 @@ Member Function Description - :ref:`int` **int** **(** :ref:`bool` from **)** +Cast a :ref:`bool` value to an integer value, ``int(true)`` will be equals to 1 and ``int(false)`` will be equals to 0. + .. _class_int_int: - :ref:`int` **int** **(** :ref:`float` from **)** +Cast a float value to an integer value, this method simply removes the number fractions, so for example ``int(2.7)`` will be equals to 2, ``int(.1)`` will be equals to 0 and ``int(-2.7)`` will be equals to -2. + .. _class_int_int: - :ref:`int` **int** **(** :ref:`String` from **)** +Cast a :ref:`String` value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like ``'1.7'``. This method will ignore all non-number characters, so calling ``int('1e3')`` will return 13. + diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index d1c63ed0b..a3b81c476 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -18,79 +18,79 @@ Brief Description Member Functions ---------------- -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_item` **(** :ref:`String` text, :ref:`Texture` icon=Object(), :ref:`bool` selectable=true **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_item` **(** :ref:`Texture` icon, :ref:`bool` selectable=true **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` icon **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_selectable` **(** :ref:`int` idx, :ref:`bool` selectable **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_selectable` **(** :ref:`int` idx **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_custom_bg_color` **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` idx, :ref:`bool` single=true **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unselect` **(** :ref:`int` idx **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_count` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` idx **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort_items_by_text` **(** **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fixed_column_width` **(** :ref:`int` width **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_fixed_column_width` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_max_text_lines` **(** :ref:`int` lines **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_text_lines` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_max_columns` **(** :ref:`int` amount **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_columns` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_select_mode` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon_mode` **(** :ref:`int` mode **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_icon_mode` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_min_icon_size` **(** :ref:`Vector2` size **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_min_icon_size` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ensure_current_is_visible` **(** **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_item` **(** :ref:`String` text, :ref:`Texture` icon=NULL, :ref:`bool` selectable=true **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_item` **(** :ref:`Texture` icon, :ref:`bool` selectable=true **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` icon **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_selectable` **(** :ref:`int` idx, :ref:`bool` selectable **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_selectable` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_custom_bg_color` **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` idx, :ref:`bool` single=true **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unselect` **(** :ref:`int` idx **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_count` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` idx **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sort_items_by_text` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fixed_column_width` **(** :ref:`int` width **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_fixed_column_width` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_text_lines` **(** :ref:`int` lines **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_text_lines` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_columns` **(** :ref:`int` amount **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_columns` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_select_mode` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_mode` **(** :ref:`int` mode **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_icon_mode` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_min_icon_size` **(** :ref:`Vector2` size **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_min_icon_size` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`ensure_current_is_visible` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -112,7 +112,7 @@ Member Function Description .. _class_ItemList_add_item: -- void **add_item** **(** :ref:`String` text, :ref:`Texture` icon=Object(), :ref:`bool` selectable=true **)** +- void **add_item** **(** :ref:`String` text, :ref:`Texture` icon=NULL, :ref:`bool` selectable=true **)** .. _class_ItemList_add_icon_item: diff --git a/classes/class_node.rst b/classes/class_node.rst index cbdeb4dbe..0ff383d65 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -55,7 +55,7 @@ Member Functions +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Parent | :ref:`get_parent` **(** **)** const | +| :ref:`Node` | :ref:`get_parent` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`find_node` **(** :ref:`String` mask, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -329,7 +329,7 @@ Note: fetching absolute paths only works when the node is inside the scene tree .. _class_Node_get_parent: -- Parent **get_parent** **(** **)** const +- :ref:`Node` **get_parent** **(** **)** const Return the parent :ref:`Node` of the current :ref:`Node`, or an empty Object if the node lacks a parent. diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index 09cba6796..f7e3701bd 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -23,7 +23,9 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_pos` **(** :ref:`Vector2` pos **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_rot` **(** :ref:`float` rot **)** | +| void | :ref:`set_rot` **(** :ref:`float` radians **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotd` **(** :ref:`float` degrees **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ @@ -31,6 +33,8 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_rot` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_rotd` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_scale` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`rotate` **(** :ref:`float` radians **)** | @@ -86,10 +90,14 @@ Set the position of the 2D node. .. _class_Node2D_set_rot: -- void **set_rot** **(** :ref:`float` rot **)** +- void **set_rot** **(** :ref:`float` radians **)** Set the rotation of the 2D node. +.. _class_Node2D_set_rotd: + +- void **set_rotd** **(** :ref:`float` degrees **)** + .. _class_Node2D_set_scale: - void **set_scale** **(** :ref:`Vector2` scale **)** @@ -108,6 +116,10 @@ Return the position of the 2D node. Return the rotation of the 2D node. +.. _class_Node2D_get_rotd: + +- :ref:`float` **get_rotd** **(** **)** const + .. _class_Node2D_get_scale: - :ref:`Vector2` **get_scale** **(** **)** const diff --git a/classes/class_os.rst b/classes/class_os.rst index fd2170c5a..e8b67a954 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -314,10 +314,14 @@ Return the list of fullscreen modes. - :ref:`int` **get_screen_count** **(** **)** const +Returns the number of displays attached to the host machine + .. _class_OS_get_current_screen: - :ref:`int` **get_current_screen** **(** **)** const +Returns the current screen index (0 padded). + .. _class_OS_set_current_screen: - void **set_current_screen** **(** :ref:`int` screen **)** @@ -330,38 +334,56 @@ Return the list of fullscreen modes. - :ref:`Vector2` **get_screen_size** **(** :ref:`int` screen=0 **)** const +Returns the dimensions in pixels of the specified screen. + .. _class_OS_get_window_position: - :ref:`Vector2` **get_window_position** **(** **)** const +Returns the window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. + .. _class_OS_set_window_position: - void **set_window_position** **(** :ref:`Vector2` position **)** +Sets the position of the window to the specified position (this function could be restricted by the window manager, meaning that there could be some unreachable areas of the screen). + .. _class_OS_get_window_size: - :ref:`Vector2` **get_window_size** **(** **)** const +Returns the size of the window (without counting window manager decorations). + .. _class_OS_set_window_size: - void **set_window_size** **(** :ref:`Vector2` size **)** +Sets the window size to the specified size. + .. _class_OS_set_window_fullscreen: - void **set_window_fullscreen** **(** :ref:`bool` enabled **)** +Sets window fullscreen mode to the *enabled* argument, *enabled* is a toggle for the fullscreen mode, calling the function with *enabled* true when the screen is not on fullscreen mode will cause the screen to go to fullscreen mode, calling the function with *enabled* false when the screen is in fullscreen mode will cause the window to exit the fullscreen mode. + .. _class_OS_is_window_fullscreen: - :ref:`bool` **is_window_fullscreen** **(** **)** const +Returns whether the window is in fullscreen mode or not. + .. _class_OS_set_window_resizable: - void **set_window_resizable** **(** :ref:`bool` enabled **)** +Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings. + .. _class_OS_is_window_resizable: - :ref:`bool` **is_window_resizable** **(** **)** const +Returns whether the window is resizable or not. + .. _class_OS_set_window_minimized: - void **set_window_minimized** **(** :ref:`bool` enabled **)** @@ -382,10 +404,14 @@ Return the list of fullscreen modes. - void **set_screen_orientation** **(** :ref:`int` orientation **)** +Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class. + .. _class_OS_get_screen_orientation: - :ref:`int` **get_screen_orientation** **(** **)** const +Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class. + .. _class_OS_set_keep_screen_on: - void **set_keep_screen_on** **(** :ref:`bool` enabled **)** @@ -396,6 +422,8 @@ Set keep screen on if true, or goes to sleep by device setting if false. (for An - :ref:`bool` **is_keep_screen_on** **(** **)** const +Returns whether the screen is being kept on or not. + .. _class_OS_set_iterations_per_second: - void **set_iterations_per_second** **(** :ref:`int` iterations_per_second **)** @@ -434,6 +462,8 @@ Speeds up or slows down the physics by changing the delta variable. (delta \* ti - void **set_window_title** **(** :ref:`String` title **)** +Sets the window title to the specified string. + .. _class_OS_set_low_processor_usage_mode: - void **set_low_processor_usage_mode** **(** :ref:`bool` enable **)** @@ -450,6 +480,8 @@ Return true if low cpu usage mode is enabled. - :ref:`int` **get_processor_count** **(** **)** const +Returns the number of cores available in the host machine. + .. _class_OS_get_executable_path: - :ref:`String` **get_executable_path** **(** **)** const @@ -466,7 +498,7 @@ Execute the binary file in given path, optionally blocking until it returns. A p - :ref:`int` **kill** **(** :ref:`int` pid **)** -Kill a process ID. +Kill a process ID (this method can be used to kill processes that were not spawned by the game). .. _class_OS_shell_open: @@ -476,6 +508,8 @@ Kill a process ID. - :ref:`int` **get_process_ID** **(** **)** const +Returns the game process ID + .. _class_OS_get_environment: - :ref:`String` **get_environment** **(** :ref:`String` environment **)** const @@ -644,6 +678,8 @@ Return the total amount of dynamic memory used (only works in debug). - :ref:`float` **get_frames_per_second** **(** **)** const +Returns the frames per second of the running game. + .. _class_OS_print_all_textures_by_size: - void **print_all_textures_by_size** **(** **)** diff --git a/classes/class_particles2d.rst b/classes/class_particles2d.rst index e716dd537..f1f287c02 100644 --- a/classes/class_particles2d.rst +++ b/classes/class_particles2d.rst @@ -13,7 +13,7 @@ Particles2D Brief Description ----------------- - +2D Particle emitter Member Functions ---------------- @@ -123,25 +123,30 @@ Member Functions Numeric Constants ----------------- -- **PARAM_DIRECTION** = **0** +- **PARAM_DIRECTION** = **0** --- Direction in degrees at which the particles will be launched, Notice that when the direction is set to 0 the particles will be launched to the negative - **PARAM_SPREAD** = **1** -- **PARAM_LINEAR_VELOCITY** = **2** -- **PARAM_SPIN_VELOCITY** = **3** -- **PARAM_ORBIT_VELOCITY** = **4** -- **PARAM_GRAVITY_DIRECTION** = **5** -- **PARAM_GRAVITY_STRENGTH** = **6** +- **PARAM_LINEAR_VELOCITY** = **2** --- Velocity at which the particles will be launched. +- **PARAM_SPIN_VELOCITY** = **3** --- The speed at which particles will spin around its own center. +- **PARAM_ORBIT_VELOCITY** = **4** --- Velocity at which the particles will orbit around the emitter center +- **PARAM_GRAVITY_DIRECTION** = **5** --- Direction in degrees at which the particles will be attracted +- **PARAM_GRAVITY_STRENGTH** = **6** --- Strength of the gravitation attraction for each particle - **PARAM_RADIAL_ACCEL** = **7** - **PARAM_TANGENTIAL_ACCEL** = **8** -- **PARAM_DAMPING** = **9** -- **PARAM_INITIAL_ANGLE** = **10** -- **PARAM_INITIAL_SIZE** = **11** -- **PARAM_FINAL_SIZE** = **12** +- **PARAM_DAMPING** = **9** --- Amount of damping for each particle +- **PARAM_INITIAL_ANGLE** = **10** --- Initial angle at which each particle will be spawned +- **PARAM_INITIAL_SIZE** = **11** --- Initial size of each particle +- **PARAM_FINAL_SIZE** = **12** --- Final size of each particle, the particle size will interpolate to this value during its lifetime. - **PARAM_HUE_VARIATION** = **13** - **PARAM_ANIM_SPEED_SCALE** = **14** - **PARAM_ANIM_INITIAL_POS** = **15** - **PARAM_MAX** = **16** - **MAX_COLOR_PHASES** = **4** +Description +----------- + +Particles2D is a particle system 2D :ref:`Node` that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist). + Member Function Description --------------------------- @@ -149,34 +154,50 @@ Member Function Description - void **set_emitting** **(** :ref:`bool` active **)** +If this is set to true then the particle emitter will emit particles, if its false it will not. + .. _class_Particles2D_is_emitting: - :ref:`bool` **is_emitting** **(** **)** const +Returns whether this emitter is currently emitting or not + .. _class_Particles2D_set_amount: - void **set_amount** **(** :ref:`int` amount **)** +Sets the amount of particles spawned at each emission + .. _class_Particles2D_get_amount: - :ref:`int` **get_amount** **(** **)** const +Returns the amount of particles spawned at each emission + .. _class_Particles2D_set_lifetime: - void **set_lifetime** **(** :ref:`float` lifetime **)** +Sets the amount of seconds that each particle will be visible. + .. _class_Particles2D_get_lifetime: - :ref:`float` **get_lifetime** **(** **)** const +Gets the amount of seconds that each particle will be visible. + .. _class_Particles2D_set_time_scale: - void **set_time_scale** **(** :ref:`float` time_scale **)** +Sets the increment or decrement for the particle lifetime. for example: if the time scale is set to 2, the particles will die and move twice as fast. + .. _class_Particles2D_get_time_scale: - :ref:`float` **get_time_scale** **(** **)** const +Returns the emitter time scale + .. _class_Particles2D_set_pre_process_time: - void **set_pre_process_time** **(** :ref:`float` time **)** @@ -189,58 +210,86 @@ Member Function Description - void **set_emit_timeout** **(** :ref:`float` value **)** +Sets the amount of seconds during which the emitter will spawn particles, after the specified seconds the emitter state will be set to non emitting, so calling :ref:`is_emitting` will return false. If the timeout is 0 the emitter will spawn forever. + .. _class_Particles2D_get_emit_timeout: - :ref:`float` **get_emit_timeout** **(** **)** const +Returns the amount of seconds during which the emitter will spawn particles + .. _class_Particles2D_set_param: - void **set_param** **(** :ref:`int` param, :ref:`float` value **)** +Sets the value of the specified emitter parameter (see the constants secction for the list of parameters) + .. _class_Particles2D_get_param: - :ref:`float` **get_param** **(** :ref:`int` param **)** const +Returns the value of the specified emitter parameter + .. _class_Particles2D_set_randomness: - void **set_randomness** **(** :ref:`int` param, :ref:`float` value **)** +Sets the randomness value of the specified emitter parameter (see the constants secction for the list of parameters), 0 means no randomness, so every particle will have the parameters specified, 1 means that the parameter will be choosen at random, the closer the randomness value gets to 0 the more conservative the variation of the parameter will be. + .. _class_Particles2D_get_randomness: - :ref:`float` **get_randomness** **(** :ref:`int` param **)** const +Returns the randomness value of the specified emitter parameter + .. _class_Particles2D_set_texture: - :ref:`Texture` **set_texture** **(** :ref:`Object` texture **)** +Sets the texture for each particle + .. _class_Particles2D_get_texture: - :ref:`Texture` **get_texture** **(** **)** const +Returns the texture for emitted particles + .. _class_Particles2D_set_color: - void **set_color** **(** :ref:`Color` color **)** +Set the tint color for each particle. + .. _class_Particles2D_get_color: - :ref:`Color` **get_color** **(** **)** const +Returns the tint color for each particle. + .. _class_Particles2D_set_color_ramp: - :ref:`ColorRamp` **set_color_ramp** **(** :ref:`Object` color_ramp **)** +Sets the :ref:`ColorRamp` used to tint each particle. Particle will be tinted according to their lifetimes. + .. _class_Particles2D_get_color_ramp: - :ref:`ColorRamp` **get_color_ramp** **(** **)** const +Returns the :ref:`ColorRamp` used to tint each particle + .. _class_Particles2D_set_emissor_offset: - void **set_emissor_offset** **(** :ref:`Vector2` offset **)** +Sets the particle spawn origin position relative to the emitter center. for example if this value is set to (50, 50), the particle will spawn 50 units to the right and 50 units to the bottom of the emitter center. + .. _class_Particles2D_get_emissor_offset: - :ref:`Vector2` **get_emissor_offset** **(** **)** const +Returns the particle spawn origin position relative to the emitter. + .. _class_Particles2D_set_flip_h: - void **set_flip_h** **(** :ref:`bool` enable **)** @@ -277,10 +326,14 @@ Member Function Description - void **set_emission_half_extents** **(** :ref:`Vector2` extents **)** +Sets the half extents of the emission box, particles will be spawned at random inside this box. + .. _class_Particles2D_get_emission_half_extents: - :ref:`Vector2` **get_emission_half_extents** **(** **)** const +Returns the half extents of the emission box. + .. _class_Particles2D_set_color_phases: - void **set_color_phases** **(** :ref:`int` phases **)** diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst index 37fac8dd9..8c56c5179 100644 --- a/classes/class_physics2dserver.rst +++ b/classes/class_physics2dserver.rst @@ -181,7 +181,7 @@ Member Functions +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`damped_spring_joint_create` **(** :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b=RID() **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`damped_string_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value=RID() **)** | +| void | :ref:`damped_string_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`damped_string_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -579,7 +579,7 @@ Member Function Description .. _class_Physics2DServer_damped_string_joint_set_param: -- void **damped_string_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value=RID() **)** +- void **damped_string_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** .. _class_Physics2DServer_damped_string_joint_get_param: diff --git a/classes/class_popup.rst b/classes/class_popup.rst index 02edeb45e..bf7e077f0 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -43,8 +43,8 @@ Signals Numeric Constants ----------------- -- **NOTIFICATION_POST_POPUP** = **80** -- **NOTIFICATION_POPUP_HIDE** = **81** +- **NOTIFICATION_POST_POPUP** = **80** --- Notification sent right after the popup is shown. +- **NOTIFICATION_POPUP_HIDE** = **81** --- Notification sent right after the popup is hidden. Description ----------- @@ -70,6 +70,8 @@ Popup (show the control in modal form) in the center of the screen, scaled at a - void **popup_centered_minsize** **(** :ref:`Vector2` minsize=Vector2(0,0) **)** +Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than ``minsize``. + .. _class_Popup_popup: - void **popup** **(** **)** @@ -80,8 +82,12 @@ Popup (show the control in modal form). - void **set_exclusive** **(** :ref:`bool` enable **)** +Make the popup hide other popups when shown on the screen. + .. _class_Popup_is_exclusive: - :ref:`bool` **is_exclusive** **(** **)** const +Returns whether the popup will hide other popups when shown on the screen. + diff --git a/classes/class_popupdialog.rst b/classes/class_popupdialog.rst index b1847994b..ba21eefb9 100644 --- a/classes/class_popupdialog.rst +++ b/classes/class_popupdialog.rst @@ -15,3 +15,8 @@ Brief Description Base class for Popup Dialogs. +Description +----------- + +PopupDialog is a base class for popup dialogs, along with :ref:`WindowDialog`. + diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 96c155fac..b78ea4f06 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -97,19 +97,19 @@ Member Function Description - void **add_icon_item** **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. +Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. .. _class_PopupMenu_add_item: - void **add_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -Add a new item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. +Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. .. _class_PopupMenu_add_icon_check_item: - void **add_icon_check_item** **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -Add a new check able item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. +Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. .. _class_PopupMenu_add_check_item: @@ -121,6 +121,8 @@ Add a new checkable item with text "label". An id can optionally be provided, as - void **add_submenu_item** **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** +Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index. + .. _class_PopupMenu_set_item_text: - void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** @@ -143,6 +145,8 @@ Set the accelerator of the item at index "idx". Accelerators are special combina - void **set_item_metadata** **(** :ref:`int` idx, var metadata **)** +Sets the metadata of an item, which might be of any type. You can later get it with :ref:`get_item_metadata`, which provides a simple way of assigning context data to items. + .. _class_PopupMenu_set_item_checked: - void **set_item_checked** **(** :ref:`int` idx, :ref:`bool` checked **)** @@ -153,18 +157,26 @@ Set the checkstate status of the item at index "idx". - void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** +Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked. + .. _class_PopupMenu_set_item_submenu: - void **set_item_submenu** **(** :ref:`int` idx, :ref:`String` submenu **)** +Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. + .. _class_PopupMenu_set_item_as_separator: - void **set_item_as_separator** **(** :ref:`int` idx, :ref:`bool` enable **)** +Mark the item at index "idx" as a seperator, which means that it would be displayed as a mere line. + .. _class_PopupMenu_set_item_as_checkable: - void **set_item_as_checkable** **(** :ref:`int` idx, :ref:`bool` enable **)** +Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + .. _class_PopupMenu_set_item_ID: - void **set_item_ID** **(** :ref:`int` idx, :ref:`int` id **)** @@ -187,6 +199,8 @@ Return the icon of the item at index "idx". - void **get_item_metadata** **(** :ref:`int` idx **)** const +Return the metadata of an item, which might be of any type. You can set it with :ref:`set_item_metadata`, which provides a simple way of assigning context data to items. + .. _class_PopupMenu_get_item_accelerator: - :ref:`int` **get_item_accelerator** **(** :ref:`int` idx **)** const @@ -197,14 +211,20 @@ Return the accelerator of the item at index "idx". Accelerators are special comb - :ref:`String` **get_item_submenu** **(** :ref:`int` idx **)** const +Return the submenu name of the item at index "idx". + .. _class_PopupMenu_is_item_separator: - :ref:`bool` **is_item_separator** **(** :ref:`int` idx **)** const +Return whether the item is a seperator. If it is, it would be displayed as a line. + .. _class_PopupMenu_is_item_checkable: - :ref:`bool` **is_item_checkable** **(** :ref:`int` idx **)** const +Return whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + .. _class_PopupMenu_is_item_checked: - :ref:`bool` **is_item_checked** **(** :ref:`int` idx **)** const @@ -215,6 +235,8 @@ Return the checkstate status of the item at index "idx". - :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const +Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked. + .. _class_PopupMenu_get_item_ID: - :ref:`int` **get_item_ID** **(** :ref:`int` idx **)** const @@ -243,10 +265,12 @@ Add a separator between items. Separators also occupy an index. - void **remove_item** **(** :ref:`int` idx **)** +Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one. + .. _class_PopupMenu_clear: - void **clear** **(** **)** -Clear the popup menu. +Clear the popup menu, in effect removing all items. diff --git a/classes/class_popuppanel.rst b/classes/class_popuppanel.rst index b89fb0a68..270b19363 100644 --- a/classes/class_popuppanel.rst +++ b/classes/class_popuppanel.rst @@ -13,5 +13,10 @@ PopupPanel Brief Description ----------------- -Base class for Popup Panels +Class for displaying popups with a panel background. + +Description +----------- + +Class for displaying popups with a panel background. In some cases it might be simpler to use than :ref:`Popup`, since it provides a configurable background. If you are making windows, better check :ref:`WindowDialog`. diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index 6265ed859..e934ffde2 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -29,10 +29,14 @@ Member Functions +------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_translation` **(** **)** const | +------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_rotation` **(** :ref:`Vector3` rotation **)** | +| void | :ref:`set_rotation` **(** :ref:`Vector3` rotation_rad **)** | +------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_rotation` **(** **)** const | +------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotation_deg` **(** :ref:`Vector3` rotation_deg **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_rotation_deg` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scale` **(** :ref:`Vector3` scale **)** | +------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_scale` **(** **)** const | @@ -137,12 +141,20 @@ Return the local transform, relative to the bone parent. .. _class_Spatial_set_rotation: -- void **set_rotation** **(** :ref:`Vector3` rotation **)** +- void **set_rotation** **(** :ref:`Vector3` rotation_rad **)** .. _class_Spatial_get_rotation: - :ref:`Vector3` **get_rotation** **(** **)** const +.. _class_Spatial_set_rotation_deg: + +- void **set_rotation_deg** **(** :ref:`Vector3` rotation_deg **)** + +.. _class_Spatial_get_rotation_deg: + +- :ref:`Vector3` **get_rotation_deg** **(** **)** const + .. _class_Spatial_set_scale: - void **set_scale** **(** :ref:`Vector3` scale **)** diff --git a/classes/class_spatialstreamplayer.rst b/classes/class_spatialstreamplayer.rst index 2d816f8a8..53bbbe82e 100644 --- a/classes/class_spatialstreamplayer.rst +++ b/classes/class_spatialstreamplayer.rst @@ -18,66 +18,66 @@ Brief Description Member Functions ---------------- -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_stream` **(** Stream stream **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| Stream | :ref:`get_stream` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** :ref:`float` offset=0 **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_playing` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_paused` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_loop` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_volume` **(** :ref:`float` volume **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_volume` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_volume_db` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_loop_restart_time` **(** :ref:`float` secs **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_loop_restart_time` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_stream_name` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_loop_count` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_pos` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`seek_pos` **(** :ref:`float` time **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_length` **(** **)** const | -+------------------------------+----------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream` **(** :ref:`AudioStream` stream **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AudioStream` | :ref:`get_stream` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** :ref:`float` offset=0 **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume` **(** :ref:`float` volume **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume_db` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop_restart_time` **(** :ref:`float` secs **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_loop_restart_time` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_stream_name` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_count` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pos` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek_pos` **(** :ref:`float` time **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- .. _class_SpatialStreamPlayer_set_stream: -- void **set_stream** **(** Stream stream **)** +- void **set_stream** **(** :ref:`AudioStream` stream **)** .. _class_SpatialStreamPlayer_get_stream: -- Stream **get_stream** **(** **)** const +- :ref:`AudioStream` **get_stream** **(** **)** const .. _class_SpatialStreamPlayer_play: diff --git a/classes/class_string.rst b/classes/class_string.rst index a60545515..cc5970d19 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -105,7 +105,7 @@ Member Functions +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RealArray` | :ref:`split_floats` **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`strip_edges` **(** **)** | +| :ref:`String` | :ref:`strip_edges` **(** :ref:`bool` left=True, :ref:`bool` right=True **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`substr` **(** :ref:`int` from, :ref:`int` len **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ @@ -378,9 +378,9 @@ Split the string in floats by using a divisor string, return an array of the sub .. _class_String_strip_edges: -- :ref:`String` **strip_edges** **(** **)** +- :ref:`String` **strip_edges** **(** :ref:`bool` left=True, :ref:`bool` right=True **)** -Return a copy of the string stripped of any non-printable character at the beginning and the end. +Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. .. _class_String_substr: diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 2d8c13df3..cb8ac6930 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -47,7 +47,7 @@ Member Functions +--------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`generate_normals` **(** **)** | +--------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`commit` **(** :ref:`Mesh` existing=Object() **)** | +| :ref:`Mesh` | :ref:`commit` **(** :ref:`Mesh` existing=NULL **)** | +--------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +--------------------------+------------------------------------------------------------------------------------------------------------+ @@ -118,7 +118,7 @@ Member Function Description .. _class_SurfaceTool_commit: -- :ref:`Mesh` **commit** **(** :ref:`Mesh` existing=Object() **)** +- :ref:`Mesh` **commit** **(** :ref:`Mesh` existing=NULL **)** .. _class_SurfaceTool_clear: diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 097e93a0e..8b258204e 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -37,6 +37,14 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`cursor_get_line` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_blink_enabled` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`cursor_get_blink_enabled` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_blink_speed` **(** :ref:`float` blink_speed **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cursor_get_blink_speed` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_readonly` **(** :ref:`bool` enable **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_wrap` **(** :ref:`bool` enable **)** | @@ -162,6 +170,30 @@ Return the column the editing cursor is at. Return the line the editing cursor is at. +.. _class_TextEdit_cursor_set_blink_enabled: + +- void **cursor_set_blink_enabled** **(** :ref:`bool` enable **)** + +Set the text editor caret to blink. + +.. _class_TextEdit_cursor_get_blink_enabled: + +- :ref:`bool` **cursor_get_blink_enabled** **(** **)** const + +Gets whether the text editor caret is blinking. + +.. _class_TextEdit_cursor_set_blink_speed: + +- void **cursor_set_blink_speed** **(** :ref:`float` blink_speed **)** + +Set the text editor caret blink speed. Cannot be less then or equal to 0. + +.. _class_TextEdit_cursor_get_blink_speed: + +- :ref:`float` **cursor_get_blink_speed** **(** **)** const + +Gets the text editor caret blink speed. + .. _class_TextEdit_set_readonly: - void **set_readonly** **(** :ref:`bool` enable **)** diff --git a/classes/class_tree.rst b/classes/class_tree.rst index a6ffddd79..38b28fa31 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -21,7 +21,7 @@ Member Functions +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=Object() **)** | +| :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=NULL **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeItem` | :ref:`get_root` **(** **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -100,7 +100,7 @@ Member Function Description .. _class_Tree_create_item: -- :ref:`TreeItem` **create_item** **(** :ref:`TreeItem` parent=Object() **)** +- :ref:`TreeItem` **create_item** **(** :ref:`TreeItem` parent=NULL **)** .. _class_Tree_get_root: diff --git a/classes/class_videoplayer.rst b/classes/class_videoplayer.rst index d7bd054d0..4b23d42bc 100644 --- a/classes/class_videoplayer.rst +++ b/classes/class_videoplayer.rst @@ -18,62 +18,62 @@ Brief Description Member Functions ---------------- -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_stream` **(** Stream stream **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| Stream | :ref:`get_stream` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_playing` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_paused` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_volume` **(** :ref:`float` volume **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_volume` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_volume_db` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_audio_track` **(** :ref:`int` track **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_audio_track` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_stream_name` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_stream_pos` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_expand` **(** :ref:`bool` enable **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_expand` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`get_video_texture` **(** **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------+ ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream` **(** :ref:`VideoStream` stream **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`VideoStream` | :ref:`get_stream` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume` **(** :ref:`float` volume **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume_db` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_audio_track` **(** :ref:`int` track **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_audio_track` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_stream_name` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_stream_pos` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_expand` **(** :ref:`bool` enable **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_expand` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_video_texture` **(** **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- .. _class_VideoPlayer_set_stream: -- void **set_stream** **(** Stream stream **)** +- void **set_stream** **(** :ref:`VideoStream` stream **)** .. _class_VideoPlayer_get_stream: -- Stream **get_stream** **(** **)** const +- :ref:`VideoStream` **get_stream** **(** **)** const .. _class_VideoPlayer_play: diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index afdddcd0a..f6e9e8e83 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -31,6 +31,8 @@ Member Functions +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`texture_get_height` **(** :ref:`RID` arg0 **)** const | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_shrink_all_x2_on_set_data` **(** :ref:`bool` shrink **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`shader_create` **(** :ref:`int` mode=0 **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shader_set_mode` **(** :ref:`RID` shader, :ref:`int` mode **)** | @@ -492,6 +494,10 @@ Member Function Description - :ref:`int` **texture_get_height** **(** :ref:`RID` arg0 **)** const +.. _class_VisualServer_texture_set_shrink_all_x2_on_set_data: + +- void **texture_set_shrink_all_x2_on_set_data** **(** :ref:`bool` shrink **)** + .. _class_VisualServer_shader_create: - :ref:`RID` **shader_create** **(** :ref:`int` mode=0 **)** diff --git a/classes/class_ysort.rst b/classes/class_ysort.rst index cbbd092c5..892f38146 100644 --- a/classes/class_ysort.rst +++ b/classes/class_ysort.rst @@ -13,7 +13,7 @@ YSort Brief Description ----------------- - +Sort all child nodes based on their Y positions. Member Functions ---------------- @@ -24,6 +24,11 @@ Member Functions | :ref:`bool` | :ref:`is_sort_enabled` **(** **)** const | +--------------------------+-----------------------------------------------------------------------------------------------------+ +Description +----------- + +Sort all child nodes based on their Y positions. The child node must inherit from :ref:`CanvasItem` for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position. + Member Function Description --------------------------- @@ -31,8 +36,12 @@ Member Function Description - void **set_sort_enabled** **(** :ref:`bool` enabled **)** +Set whether the children nodes are sorted or not. (default true) + .. _class_YSort_is_sort_enabled: - :ref:`bool` **is_sort_enabled** **(** **)** const +Returns true if the children nodes are being sorted. +