From f629e839e5c5df88ddee330639be78e9931978df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 10 Aug 2016 21:33:38 +0200 Subject: [PATCH] Sync classref with 2.1 source, goodbye 2.0! --- classes/class_@gdscript.rst | 320 ++++++++-------- classes/class_@global scope.rst | 14 + classes/class_animatedsprite.rst | 40 ++ classes/class_animatedsprite3d.rst | 68 +++- classes/class_animation.rst | 49 ++- classes/class_animationplayer.rst | 5 +- classes/class_animationtreeplayer.rst | 6 + classes/class_area.rst | 166 +++++--- classes/class_array.rst | 40 +- classes/class_atlastexture.rst | 5 + classes/class_bakedlight.rst | 36 ++ classes/class_basebutton.rst | 80 ++-- classes/class_bitmapfont.rst | 126 ++++++ classes/class_camera2d.rst | 18 + classes/class_canvasitem.rst | 28 +- classes/class_canvasitemmaterial.rst | 28 +- classes/class_collisionobject2d.rst | 4 +- classes/class_colorarray.rst | 62 ++- classes/class_colorpicker.rst | 4 +- classes/class_configfile.rst | 44 +-- classes/class_control.rst | 108 +++++- classes/class_curve2d.rst | 72 ++-- classes/class_curve3d.rst | 84 ++-- classes/class_dictionary.rst | 12 +- classes/class_directory.rst | 6 +- classes/class_dynamicfont.rst | 124 ++++++ classes/class_dynamicfontdata.rst | 38 ++ classes/class_editorexportplugin.rst | 45 +++ classes/class_editorfiledialog.rst | 89 +++-- classes/class_editorimportplugin.rst | 89 ++++- classes/class_editorplugin.rst | 243 ++++++++++-- classes/class_editorscenepostimport.rst | 11 +- classes/class_editorscript.rst | 7 +- classes/class_editorselection.rst | 68 ++++ classes/class_editorsettings.rst | 104 +++++ classes/class_editorspatialgizmo.rst | 139 +++++++ classes/class_environment.rst | 38 +- classes/class_file.rst | 28 +- classes/class_filedialog.rst | 15 +- classes/class_fixedmaterial.rst | 60 +-- classes/class_font.rst | 102 +---- classes/class_funcref.rst | 31 +- classes/class_gdfunctionstate.rst | 27 +- classes/class_geometryinstance.rst | 66 ++-- classes/class_httpclient.rst | 100 +++-- classes/class_httprequest.rst | 162 ++++++++ classes/class_immediategeometry.rst | 28 +- classes/class_input.rst | 138 +++++-- classes/class_instanceplaceholder.rst | 13 +- classes/class_intarray.rst | 62 ++- classes/class_inversekinematics.rst | 86 +++++ classes/class_itemlist.rst | 223 +++++++---- classes/class_kinematicbody2d.rst | 4 +- classes/class_label.rst | 6 + classes/class_lineedit.rst | 141 +++++-- classes/class_linkbutton.rst | 69 ++++ classes/class_listener.rst | 50 +++ classes/class_mainloop.rst | 56 +-- classes/class_marshalls.rst | 8 +- classes/class_meshdatatool.rst | 12 +- classes/class_meshlibrary.rst | 58 +-- classes/class_node.rst | 142 ++++--- classes/class_object.rst | 178 ++++----- classes/class_optionbutton.rst | 4 +- classes/class_os.rst | 214 +++++++++-- classes/class_packeddatacontainer.rst | 12 +- classes/class_packetpeer.rst | 8 +- classes/class_parallaxlayer.rst | 30 +- classes/class_patch9frame.rst | 17 + classes/class_physics2ddirectbodystate.rst | 4 +- classes/class_physics2dserver.rst | 45 ++- classes/class_physicsbody.rst | 54 ++- classes/class_physicsserver.rst | 426 +++++++++++---------- classes/class_polygon2d.rst | 100 +++-- classes/class_popup.rst | 30 +- classes/class_popupmenu.rst | 160 +++++--- classes/class_proximitygroup.rst | 24 +- classes/class_rawarray.rst | 68 +++- classes/class_raycast.rst | 28 ++ classes/class_realarray.rst | 62 ++- classes/class_reference.rst | 2 +- classes/class_regex.rst | 44 ++- classes/class_resource.rst | 2 +- classes/class_resourceimportmetadata.rst | 10 +- classes/class_resourceloader.rst | 6 + classes/class_richtextlabel.rst | 12 +- classes/class_rid.rst | 11 +- classes/class_rigidbody2d.rst | 46 ++- classes/class_sample.rst | 8 +- classes/class_samplelibrary.rst | 6 + classes/class_scenetree.rst | 120 +++--- classes/class_script.rst | 6 +- classes/class_scrollcontainer.rst | 8 +- classes/class_shadergraph.rst | 12 +- classes/class_shadermaterial.rst | 22 +- classes/class_shape2d.rst | 30 +- classes/class_shortcut.rst | 56 +++ classes/class_spatial.rst | 160 ++++---- classes/class_spatialgizmo.rst | 19 + classes/class_sprite.rst | 1 + classes/class_spriteframes.rst | 96 +++-- classes/class_streampeer.rst | 134 +++---- classes/class_string.rst | 62 +++ classes/class_stringarray.rst | 62 ++- classes/class_styleboxtexture.rst | 17 + classes/class_surfacetool.rst | 78 ++-- classes/class_textedit.rst | 226 +++++++---- classes/class_textureframe.rst | 49 ++- classes/class_theme.rst | 8 +- classes/class_thread.rst | 22 +- classes/class_tilemap.rst | 9 +- classes/class_timer.rst | 18 +- classes/class_tree.rst | 159 +++++--- classes/class_treeitem.rst | 19 +- classes/class_tween.rst | 132 +++---- classes/class_undoredo.rst | 91 +++-- classes/class_variant.rst | 15 + classes/class_vector2.rst | 6 + classes/class_vector2array.rst | 62 ++- classes/class_vector3array.rst | 62 ++- classes/class_vehiclebody.rst | 55 ++- classes/class_viewport.rst | 228 +++++------ classes/class_visibilityenabler2d.rst | 3 +- classes/class_visualserver.rst | 12 +- classes/class_world2d.rst | 8 + 125 files changed, 5464 insertions(+), 2321 deletions(-) create mode 100644 classes/class_bitmapfont.rst create mode 100644 classes/class_dynamicfont.rst create mode 100644 classes/class_dynamicfontdata.rst create mode 100644 classes/class_editorexportplugin.rst create mode 100644 classes/class_editorselection.rst create mode 100644 classes/class_editorsettings.rst create mode 100644 classes/class_editorspatialgizmo.rst create mode 100644 classes/class_httprequest.rst create mode 100644 classes/class_inversekinematics.rst create mode 100644 classes/class_linkbutton.rst create mode 100644 classes/class_listener.rst create mode 100644 classes/class_shortcut.rst create mode 100644 classes/class_spatialgizmo.rst create mode 100644 classes/class_variant.rst diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 25b333c6c..6abbeee4f 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -16,141 +16,143 @@ Built-in GDScript functions. Member Functions ---------------- -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`Color8` **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8 **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`abs` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`acos` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`asin` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`assert` **(** :ref:`bool` condition **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`atan` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`atan2` **(** :ref:`float` x, :ref:`float` y **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`bytes2var` **(** :ref:`RawArray` bytes **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`ceil` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`clamp` **(** :ref:`float` val, :ref:`float` min, :ref:`float` max **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`convert` **(** Variant what, :ref:`int` type **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cos` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cosh` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`db2linear` **(** :ref:`float` db **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`decimals` **(** :ref:`float` step **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`dectime` **(** :ref:`float` value, :ref:`float` amount, :ref:`float` step **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`deg2rad` **(** :ref:`float` deg **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`dict2inst` **(** :ref:`Dictionary` dict **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`ease` **(** :ref:`float` s, :ref:`float` curve **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`exp` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`floor` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`fmod` **(** :ref:`float` x, :ref:`float` y **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`fposmod` **(** :ref:`float` x, :ref:`float` y **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`FuncRef` | :ref:`funcref` **(** :ref:`Object` instance, :ref:`String` funcname **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hash` **(** Variant var:Variant **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`inst2dict` **(** :ref:`Object` inst **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`instance_from_id` **(** :ref:`int` instance_id **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`is_inf` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`is_nan` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`lerp` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`linear2db` **(** :ref:`float` nrg **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`load` **(** :ref:`String` path **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`log` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`max` **(** :ref:`float` a, :ref:`float` b **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`min` **(** :ref:`float` a, :ref:`float` b **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`nearest_po2` **(** :ref:`int` val **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`pow` **(** :ref:`float` x, :ref:`float` y **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Resource` | :ref:`preload` **(** :ref:`String` path **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`print` **(** Variant what, Variant ... **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`print_stack` **(** **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`printerr` **(** Variant what, Variant ... **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`printraw` **(** Variant what, Variant ... **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`prints` **(** Variant what, Variant ... **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`printt` **(** Variant what, Variant ... **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rad2deg` **(** :ref:`float` rad **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rand_range` **(** :ref:`float` from, :ref:`float` to **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`rand_seed` **(** :ref:`float` seed **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`randf` **(** **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`randi` **(** **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`randomize` **(** **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`range` **(** Variant ... **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`round` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`seed` **(** :ref:`float` seed **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`sign` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`sin` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`sinh` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`sqrt` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`stepify` **(** :ref:`float` s, :ref:`float` step **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`str` **(** Variant what, Variant ... **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`str2var` **(** :ref:`String` string **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`tan` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`tanh` **(** :ref:`float` s **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`typeof` **(** Variant what **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RawArray` | :ref:`var2bytes` **(** Variant var **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`var2str` **(** Variant var **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`WeakRef` | :ref:`weakref` **(** :ref:`Object` obj **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Nil` | :ref:`yield` **(** :ref:`Object` object, :ref:`String` signal **)** | -+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`Color8` **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8 **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`abs` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`acos` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`asin` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`assert` **(** :ref:`bool` condition **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`atan` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`atan2` **(** :ref:`float` x, :ref:`float` y **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`bytes2var` **(** :ref:`RawArray` bytes **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`ceil` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`clamp` **(** :ref:`float` val, :ref:`float` min, :ref:`float` max **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`convert` **(** :ref:`Variant` what, :ref:`int` type **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cos` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cosh` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`db2linear` **(** :ref:`float` db **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`decimals` **(** :ref:`float` step **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dectime` **(** :ref:`float` value, :ref:`float` amount, :ref:`float` step **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`deg2rad` **(** :ref:`float` deg **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`dict2inst` **(** :ref:`Dictionary` dict **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`ease` **(** :ref:`float` s, :ref:`float` curve **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`exp` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`floor` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`fmod` **(** :ref:`float` x, :ref:`float` y **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`fposmod` **(** :ref:`float` x, :ref:`float` y **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`FuncRef` | :ref:`funcref` **(** :ref:`Object` instance, :ref:`String` funcname **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** :ref:`Variant` var:Variant **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`inst2dict` **(** :ref:`Object` inst **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`instance_from_id` **(** :ref:`int` instance_id **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`is_inf` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`is_nan` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`lerp` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`linear2db` **(** :ref:`float` nrg **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Resource` | :ref:`load` **(** :ref:`String` path **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`log` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`max` **(** :ref:`float` a, :ref:`float` b **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`min` **(** :ref:`float` a, :ref:`float` b **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`nearest_po2` **(** :ref:`int` val **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`pow` **(** :ref:`float` x, :ref:`float` y **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Resource` | :ref:`preload` **(** :ref:`String` path **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`print` **(** :ref:`Variant` what, :ref:`Variant` ... **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`print_stack` **(** **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`printerr` **(** :ref:`Variant` what, :ref:`Variant` ... **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`printraw` **(** :ref:`Variant` what, :ref:`Variant` ... **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`prints` **(** :ref:`Variant` what, :ref:`Variant` ... **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`printt` **(** :ref:`Variant` what, :ref:`Variant` ... **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`rad2deg` **(** :ref:`float` rad **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`rand_range` **(** :ref:`float` from, :ref:`float` to **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`rand_seed` **(** :ref:`int` seed **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`randf` **(** **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`randi` **(** **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`randomize` **(** **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`range` **(** :ref:`Variant` ... **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`round` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`seed` **(** :ref:`int` seed **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sign` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sin` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sinh` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sqrt` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`stepify` **(** :ref:`float` s, :ref:`float` step **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`str` **(** :ref:`Variant` what, :ref:`Variant` ... **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`str2var` **(** :ref:`String` string **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tan` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tanh` **(** :ref:`float` s **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`type_exists` **(** :ref:`String` type **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`typeof` **(** :ref:`Variant` what **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`var2bytes` **(** :ref:`Variant` var **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`var2str` **(** :ref:`Variant` var **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`WeakRef` | :ref:`weakref` **(** :ref:`Object` obj **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GDFunctionState` | :ref:`yield` **(** :ref:`Object` object, :ref:`String` signal **)** | ++------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -209,7 +211,7 @@ Arc-tangent that takes a 2D vector as argument, returns the full -pi to +pi rang .. _class_@GDScript_bytes2var: -- Variant **bytes2var** **(** :ref:`RawArray` bytes **)** +- :ref:`Variant` **bytes2var** **(** :ref:`RawArray` bytes **)** Decode a byte array back to a value. @@ -227,7 +229,7 @@ Clamp both values to a range. .. _class_@GDScript_convert: -- :ref:`Object` **convert** **(** Variant what, :ref:`int` type **)** +- :ref:`Object` **convert** **(** :ref:`Variant` what, :ref:`int` type **)** Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE\_\* in :ref:`@Global Scope`. @@ -311,7 +313,7 @@ Return a reference to the specified function. .. _class_@GDScript_hash: -- :ref:`int` **hash** **(** Variant var:Variant **)** +- :ref:`int` **hash** **(** :ref:`Variant` var:Variant **)** Hash the variable passed and return an integer. @@ -331,14 +333,10 @@ Get an object by its ID. - :ref:`float` **is_inf** **(** :ref:`float` s **)** -Return true if the float is infinite. - .. _class_@GDScript_is_nan: - :ref:`float` **is_nan** **(** :ref:`float` s **)** -Return true if the float is not a number. - .. _class_@GDScript_lerp: - :ref:`float` **lerp** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** @@ -395,7 +393,7 @@ Preload a resource from the filesystem. The resource is loaded during script par .. _class_@GDScript_print: -- :ref:`Nil` **print** **(** Variant what, Variant ... **)** +- :ref:`Nil` **print** **(** :ref:`Variant` what, :ref:`Variant` ... **)** Print one or more arguments to strings in the best way possible to a console line. @@ -407,25 +405,25 @@ Print a stack track at code location, only works when running with debugger turn .. _class_@GDScript_printerr: -- :ref:`Nil` **printerr** **(** Variant what, Variant ... **)** +- :ref:`Nil` **printerr** **(** :ref:`Variant` what, :ref:`Variant` ... **)** Print one or more arguments to strings in the best way possible to standard error line. .. _class_@GDScript_printraw: -- :ref:`Nil` **printraw** **(** Variant what, Variant ... **)** +- :ref:`Nil` **printraw** **(** :ref:`Variant` what, :ref:`Variant` ... **)** Print one or more arguments to strings in the best way possible to console. No newline is added at the end. .. _class_@GDScript_prints: -- :ref:`Nil` **prints** **(** Variant what, Variant ... **)** +- :ref:`Nil` **prints** **(** :ref:`Variant` what, :ref:`Variant` ... **)** Print one or more arguments to the console with a space between each argument. .. _class_@GDScript_printt: -- :ref:`Nil` **printt** **(** Variant what, Variant ... **)** +- :ref:`Nil` **printt** **(** :ref:`Variant` what, :ref:`Variant` ... **)** Print one or more arguments to the console with a tab between each argument. @@ -443,7 +441,7 @@ Random range, any floating point value between 'from' and 'to' .. _class_@GDScript_rand_seed: -- :ref:`Array` **rand_seed** **(** :ref:`float` seed **)** +- :ref:`Array` **rand_seed** **(** :ref:`int` seed **)** Random from seed, pass a seed and an array with both number and new seed is returned. @@ -467,7 +465,7 @@ Reset the seed of the random number generator with a new, different one. .. _class_@GDScript_range: -- :ref:`Array` **range** **(** Variant ... **)** +- :ref:`Array` **range** **(** :ref:`Variant` ... **)** Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment). @@ -479,7 +477,7 @@ Round to nearest integer. .. _class_@GDScript_seed: -- :ref:`Nil` **seed** **(** :ref:`float` seed **)** +- :ref:`Nil` **seed** **(** :ref:`int` seed **)** Set seed for the random number generator. @@ -515,13 +513,13 @@ Snap float value to a given step. .. _class_@GDScript_str: -- :ref:`String` **str** **(** Variant what, Variant ... **)** +- :ref:`String` **str** **(** :ref:`Variant` what, :ref:`Variant` ... **)** Convert one or more arguments to strings in the best way possible. .. _class_@GDScript_str2var: -- Variant **str2var** **(** :ref:`String` string **)** +- :ref:`Variant` **str2var** **(** :ref:`String` string **)** Convert a formatted string that was returned by :ref:`var2str` to the original value. @@ -537,21 +535,25 @@ Standard tangent function. Hyperbolic tangent. +.. _class_@GDScript_type_exists: + +- :ref:`bool` **type_exists** **(** :ref:`String` type **)** + .. _class_@GDScript_typeof: -- :ref:`int` **typeof** **(** Variant what **)** +- :ref:`int` **typeof** **(** :ref:`Variant` what **)** Return the internal type of the given Variant object, using the TYPE\_\* enum in :ref:`@Global Scope`. .. _class_@GDScript_var2bytes: -- :ref:`RawArray` **var2bytes** **(** Variant var **)** +- :ref:`RawArray` **var2bytes** **(** :ref:`Variant` var **)** Encode a variable value to a byte array. .. _class_@GDScript_var2str: -- :ref:`String` **var2str** **(** Variant var **)** +- :ref:`String` **var2str** **(** :ref:`Variant` var **)** Convert a value to a formatted string that can later be parsed using :ref:`str2var`. @@ -563,12 +565,10 @@ Return a weak reference to an object. .. _class_@GDScript_yield: -- :ref:`Nil` **yield** **(** :ref:`Object` object, :ref:`String` signal **)** +- :ref:`GDFunctionState` **yield** **(** :ref:`Object` object, :ref:`String` signal **)** -Stop the function execution and return the current state. Call resume on the state to resume execution. This makes the state invalid. +Stop the function execution and return the current state. Call :ref:`GDFunctionState.resume` on the state to resume execution. This invalidates the state. -Returns anything that was passed to the resume function call. - -If passed an object and a signal, the execution is resumed when the object's signal is emmited. +Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emmited. diff --git a/classes/class_@global scope.rst b/classes/class_@global scope.rst index 39337c842..9dffc0c90 100644 --- a/classes/class_@global scope.rst +++ b/classes/class_@global scope.rst @@ -407,6 +407,7 @@ Numeric Constants - **ERR_FILE_EOF** = **18** - **ERR_CANT_OPEN** = **19** - **ERR_CANT_CREATE** = **20** +- **ERR_PARSE_ERROR** = **43** - **ERROR_QUERY_FAILED** = **21** - **ERR_ALREADY_IN_USE** = **22** - **ERR_LOCKED** = **23** @@ -448,7 +449,20 @@ Numeric Constants - **PROPERTY_USAGE_STORAGE** = **1** --- Property will be used as storage (default). - **PROPERTY_USAGE_EDITOR** = **2** --- Property will be visible in editor (default). - **PROPERTY_USAGE_NETWORK** = **4** +- **PROPERTY_USAGE_EDITOR_HELPER** = **8** +- **PROPERTY_USAGE_CHECKABLE** = **16** +- **PROPERTY_USAGE_CHECKED** = **32** +- **PROPERTY_USAGE_INTERNATIONALIZED** = **64** +- **PROPERTY_USAGE_BUNDLE** = **128** +- **PROPERTY_USAGE_CATEGORY** = **256** +- **PROPERTY_USAGE_STORE_IF_NONZERO** = **512** +- **PROPERTY_USAGE_STORE_IF_NONONE** = **1024** +- **PROPERTY_USAGE_NO_INSTANCE_STATE** = **2048** +- **PROPERTY_USAGE_RESTART_IF_CHANGED** = **4096** +- **PROPERTY_USAGE_SCRIPT_VARIABLE** = **8192** - **PROPERTY_USAGE_DEFAULT** = **7** --- Default usage (storage and editor). +- **PROPERTY_USAGE_DEFAULT_INTL** = **71** +- **PROPERTY_USAGE_NOEDITOR** = **5** - **METHOD_FLAG_NORMAL** = **1** - **METHOD_FLAG_EDITOR** = **2** - **METHOD_FLAG_NOSCRIPT** = **4** diff --git a/classes/class_animatedsprite.rst b/classes/class_animatedsprite.rst index dc9a3f5bd..adde3b432 100644 --- a/classes/class_animatedsprite.rst +++ b/classes/class_animatedsprite.rst @@ -18,6 +18,8 @@ Sprite node that can use multiple textures for animation. Member Functions ---------------- ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_animation` **(** **)** const | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_frame` **(** **)** const | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ @@ -33,6 +35,12 @@ Member Functions +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_flipped_v` **(** **)** const | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** :ref:`String` anim="" **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_animation` **(** :ref:`String` animation **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_centered` **(** :ref:`bool` centered **)** | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_flip_h` **(** :ref:`bool` flip_h **)** | @@ -47,6 +55,8 @@ Member Functions +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_sprite_frames` **(** :ref:`SpriteFrames` sprite_frames **)** | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -61,6 +71,12 @@ Sprite node that can use multiple textures for animation. Member Function Description --------------------------- +.. _class_AnimatedSprite_get_animation: + +- :ref:`String` **get_animation** **(** **)** const + +Return the name of the current animation set to the node. + .. _class_AnimatedSprite_get_frame: - :ref:`int` **get_frame** **(** **)** const @@ -103,6 +119,24 @@ Return true if sprite is flipped horizontally. Return true if sprite is flipped vertically. +.. _class_AnimatedSprite_is_playing: + +- :ref:`bool` **is_playing** **(** **)** const + +Return true if an animation if currently being played. + +.. _class_AnimatedSprite_play: + +- void **play** **(** :ref:`String` anim="" **)** + +Play the animation set in parameter. If no parameter is provided, the current animation is played. + +.. _class_AnimatedSprite_set_animation: + +- void **set_animation** **(** :ref:`String` animation **)** + +Set the current animation of the node and reinits the frame counter of the animation. + .. _class_AnimatedSprite_set_centered: - void **set_centered** **(** :ref:`bool` centered **)** @@ -145,4 +179,10 @@ Set the offset of the sprite in the node origin. Position varies depending on wh Set the :ref:`SpriteFrames` resource, which contains all frames. +.. _class_AnimatedSprite_stop: + +- void **stop** **(** **)** + +Stop the current animation (does not reset the frame counter). + diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 7c4719ae8..7e4106da1 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -18,15 +18,25 @@ Brief Description Member Functions ---------------- -+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_frame` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`get_sprite_frames` **(** **)** const | -+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_frame` **(** :ref:`int` frame **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_sprite_frames` **(** :ref:`SpriteFrames` sprite_frames **)** | -+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_animation` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SpriteFrames` | :ref:`get_sprite_frames` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** :ref:`String` anim="" **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_animation` **(** :ref:`String` animation **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_frame` **(** :ref:`int` frame **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sprite_frames` **(** :ref:`SpriteFrames` sprite_frames **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -36,20 +46,58 @@ Signals Member Function Description --------------------------- +.. _class_AnimatedSprite3D_get_animation: + +- :ref:`String` **get_animation** **(** **)** const + +Return the name of the current animation set to the node. + .. _class_AnimatedSprite3D_get_frame: - :ref:`int` **get_frame** **(** **)** const +Return the visible frame index. + .. _class_AnimatedSprite3D_get_sprite_frames: -- :ref:`Texture` **get_sprite_frames** **(** **)** const +- :ref:`SpriteFrames` **get_sprite_frames** **(** **)** const + +Get the :ref:`SpriteFrames` resource, which contains all frames. + +.. _class_AnimatedSprite3D_is_playing: + +- :ref:`bool` **is_playing** **(** **)** const + +Return true if an animation if currently being played. + +.. _class_AnimatedSprite3D_play: + +- void **play** **(** :ref:`String` anim="" **)** + +Play the animation set in parameter. If no parameter is provided, the current animation is played. + +.. _class_AnimatedSprite3D_set_animation: + +- void **set_animation** **(** :ref:`String` animation **)** + +Set the current animation of the node and reinits the frame counter of the animation. .. _class_AnimatedSprite3D_set_frame: - void **set_frame** **(** :ref:`int` frame **)** +Set the visible sprite frame index (from the list of frames inside the :ref:`SpriteFrames` resource). + .. _class_AnimatedSprite3D_set_sprite_frames: - void **set_sprite_frames** **(** :ref:`SpriteFrames` sprite_frames **)** +Set the :ref:`SpriteFrames` resource, which contains all frames. + +.. _class_AnimatedSprite3D_stop: + +- void **stop** **(** **)** + +Stop the current animation (does not reset the frame counter). + diff --git a/classes/class_animation.rst b/classes/class_animation.rst index a95fc800c..6e6ca7c89 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -63,7 +63,9 @@ Member Functions +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`track_get_type` **(** :ref:`int` idx **)** const | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_insert_key` **(** :ref:`int` idx, :ref:`float` time, var key, :ref:`float` transition=1 **)** | +| void | :ref:`track_insert_key` **(** :ref:`int` idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`track_is_imported` **(** :ref:`int` idx **)** const | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`track_move_down` **(** :ref:`int` idx **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -73,11 +75,13 @@ Member Functions +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`track_remove_key_at_pos` **(** :ref:`int` idx, :ref:`float` pos **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_imported` **(** :ref:`int` idx, :ref:`bool` imported **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`track_set_interpolation_type` **(** :ref:`int` idx, :ref:`int` interpolation **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`track_set_key_transition` **(** :ref:`int` idx, :ref:`int` key_idx, :ref:`float` transition **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`track_set_key_value` **(** :ref:`int` idx, :ref:`int` key, var value **)** | +| void | :ref:`track_set_key_value` **(** :ref:`int` idx, :ref:`int` key, :ref:`Variant` value **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`track_set_path` **(** :ref:`int` idx, :ref:`NodePath` path **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -87,9 +91,9 @@ Member Functions +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`IntArray` | :ref:`value_track_get_key_indices` **(** :ref:`int` idx, :ref:`float` time_sec, :ref:`float` delta **)** const | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`value_track_is_continuous` **(** :ref:`int` idx **)** const | +| :ref:`int` | :ref:`value_track_get_update_mode` **(** :ref:`int` idx **)** const | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`value_track_set_continuous` **(** :ref:`int` idx, :ref:`bool` continuous **)** | +| void | :ref:`value_track_set_update_mode` **(** :ref:`int` idx, :ref:`int` mode **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants @@ -101,6 +105,9 @@ Numeric Constants - **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value). - **INTERPOLATION_LINEAR** = **1** --- Linear interpolation. - **INTERPOLATION_CUBIC** = **2** --- Cubic interpolation. +- **UPDATE_CONTINUOUS** = **0** +- **UPDATE_DISCRETE** = **1** +- **UPDATE_TRIGGER** = **2** Description ----------- @@ -128,6 +135,8 @@ Clear the animation (clear all tracks and reset all). - :ref:`int` **find_track** **(** :ref:`NodePath` path **)** const +Return the index of the specified track. If the track is not found, return -1. + .. _class_Animation_get_length: - :ref:`float` **get_length** **(** **)** const @@ -138,6 +147,8 @@ Return the total length of the animation (in seconds). - :ref:`float` **get_step** **(** **)** const +Get the animation step value. + .. _class_Animation_get_track_count: - :ref:`int` **get_track_count** **(** **)** const @@ -190,6 +201,8 @@ Set a flag indicating that the animation must loop. This is uses for correct int - void **set_step** **(** :ref:`float` size_sec **)** +Set the animation step value. + .. _class_Animation_track_find_key: - :ref:`int` **track_find_key** **(** :ref:`int` idx, :ref:`float` time, :ref:`bool` exact=false **)** const @@ -240,10 +253,16 @@ Get the type of a track. .. _class_Animation_track_insert_key: -- void **track_insert_key** **(** :ref:`int` idx, :ref:`float` time, var key, :ref:`float` transition=1 **)** +- void **track_insert_key** **(** :ref:`int` idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** Insert a generic key in a given track. +.. _class_Animation_track_is_imported: + +- :ref:`bool` **track_is_imported** **(** :ref:`int` idx **)** const + +Return true if the given track is imported. Else, return false. + .. _class_Animation_track_move_down: - void **track_move_down** **(** :ref:`int` idx **)** @@ -268,6 +287,12 @@ Remove a key by index in a given track. Remove a key by position (seconds) in a given track. +.. _class_Animation_track_set_imported: + +- void **track_set_imported** **(** :ref:`int` idx, :ref:`bool` imported **)** + +Set the given track as imported or not. + .. _class_Animation_track_set_interpolation_type: - void **track_set_interpolation_type** **(** :ref:`int` idx, :ref:`int` interpolation **)** @@ -282,7 +307,7 @@ Set the transition curve (easing) for a specific key (see built-in math function .. _class_Animation_track_set_key_value: -- void **track_set_key_value** **(** :ref:`int` idx, :ref:`int` key, var value **)** +- void **track_set_key_value** **(** :ref:`int` idx, :ref:`int` key, :ref:`Variant` value **)** Set the value of an existing key. @@ -310,16 +335,12 @@ Return the interpolated value of a transform track at a given time (in seconds). Return all the key indices of a value track, given a position and delta time. -.. _class_Animation_value_track_is_continuous: +.. _class_Animation_value_track_get_update_mode: -- :ref:`bool` **value_track_is_continuous** **(** :ref:`int` idx **)** const +- :ref:`int` **value_track_get_update_mode** **(** :ref:`int` idx **)** const -Return whether interpolation is enabled or disabled for a whole track. By default tracks are interpolated. +.. _class_Animation_value_track_set_update_mode: -.. _class_Animation_value_track_set_continuous: - -- void **value_track_set_continuous** **(** :ref:`int` idx, :ref:`bool` continuous **)** - -Enable or disable interpolation for a whole track. By default tracks are interpolated. +- void **value_track_set_update_mode** **(** :ref:`int` idx, :ref:`int` mode **)** diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 21493746e..8ef211cf0 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -100,6 +100,7 @@ Signals ------- - **animation_changed** **(** :ref:`String` old_name, :ref:`String` new_name **)** +- **animation_started** **(** :ref:`String` name **)** - **finished** **(** **)** Numeric Constants @@ -284,9 +285,7 @@ Seek the animation to a given position in time (in seconds). If 'update' is true - void **set_active** **(** :ref:`bool` active **)** -Set the player as active (playing). If false, it - -will do nothing. +Set the player as active (playing). If false, it will do nothing. .. _class_AnimationPlayer_set_animation_process_mode: diff --git a/classes/class_animationtreeplayer.rst b/classes/class_animationtreeplayer.rst index 99f54851d..a5c54b46b 100644 --- a/classes/class_animationtreeplayer.rst +++ b/classes/class_animationtreeplayer.rst @@ -29,6 +29,8 @@ Member Functions +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`animation_node_set_animation` **(** :ref:`String` id, :ref:`Animation` animation **)** | +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`animation_node_set_filter_path` **(** :ref:`String` id, :ref:`NodePath` path, :ref:`bool` enable **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`animation_node_set_master_animation` **(** :ref:`String` id, :ref:`String` source **)** | +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`blend2_node_get_amount` **(** :ref:`String` id **)** const | @@ -192,6 +194,10 @@ Add a node of a given type in the graph with given id. Set the animation for an animation node. +.. _class_AnimationTreePlayer_animation_node_set_filter_path: + +- void **animation_node_set_filter_path** **(** :ref:`String` id, :ref:`NodePath` path, :ref:`bool` enable **)** + .. _class_AnimationTreePlayer_animation_node_set_master_animation: - void **animation_node_set_master_animation** **(** :ref:`String` id, :ref:`String` source **)** diff --git a/classes/class_area.rst b/classes/class_area.rst index 176103676..e6756606f 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -18,55 +18,71 @@ General purpose area detection and influence for 3D physics. Member Functions ---------------- -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_gravity` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_gravity_distance_scale` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_gravity_vector` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_overlapping_areas` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_overlapping_bodies` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_priority` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_space_override_mode` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_gravity_a_point` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_monitorable` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_monitoring_enabled` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`overlaps_area` **(** :ref:`Object` area **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`overlaps_body` **(** :ref:`Object` body **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_enable_monitoring` **(** :ref:`bool` enable **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_distance_scale` **(** :ref:`float` distance_scale **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_is_point` **(** :ref:`bool` enable **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gravity_vector` **(** :ref:`Vector3` vector **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_monitorable` **(** :ref:`bool` enable **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_priority` **(** :ref:`float` priority **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_space_override_mode` **(** :ref:`int` enable **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity_distance_scale` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_gravity_vector` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_layer_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_areas` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_bodies` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_priority` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_space_override_mode` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_gravity_a_point` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitorable` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitoring_enabled` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`overlaps_area` **(** :ref:`Object` area **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`overlaps_body` **(** :ref:`Object` body **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask` **(** :ref:`int` collision_mask **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_monitoring` **(** :ref:`bool` enable **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_distance_scale` **(** :ref:`float` distance_scale **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_is_point` **(** :ref:`bool` enable **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_vector` **(** :ref:`Vector3` vector **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` layer_mask **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_monitorable` **(** :ref:`bool` enable **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_priority` **(** :ref:`float` priority **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_space_override_mode` **(** :ref:`int` enable **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -94,6 +110,18 @@ Member Function Description Return the angular damp rate. +.. _class_Area_get_collision_mask: + +- :ref:`int` **get_collision_mask** **(** **)** const + +Return the physics layers this area can scan for collisions. + +.. _class_Area_get_collision_mask_bit: + +- :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const + +Return an individual bit on the collision mask. + .. _class_Area_get_gravity: - :ref:`float` **get_gravity** **(** **)** const @@ -112,6 +140,18 @@ Return the falloff factor for point gravity. Return the gravity vector. If gravity is a point (see :ref:`is_gravity_a_point`), this will be the attraction center. +.. _class_Area_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + +Return the physics layer this area is in. + +.. _class_Area_get_layer_mask_bit: + +- :ref:`bool` **get_layer_mask_bit** **(** :ref:`int` bit **)** const + +Return an individual bit on the layer mask. + .. _class_Area_get_linear_damp: - :ref:`float` **get_linear_damp** **(** **)** const @@ -180,6 +220,18 @@ Set the rate at which objects stop spinning in this area, if there are not any o In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. +.. _class_Area_set_collision_mask: + +- void **set_collision_mask** **(** :ref:`int` collision_mask **)** + +Set the physics layers this area can scan for collisions. + +.. _class_Area_set_collision_mask_bit: + +- void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** + +Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. + .. _class_Area_set_enable_monitoring: - void **set_enable_monitoring** **(** :ref:`bool` enable **)** @@ -214,6 +266,22 @@ Set the gravity vector. This vector does not have to be normalized. If gravity is a point (see :ref:`is_gravity_a_point`), this will be the attraction center. +.. _class_Area_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` layer_mask **)** + +Set the physics layers this area is in. + +Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using :ref:`set_collision_mask`. + +A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + +.. _class_Area_set_layer_mask_bit: + +- void **set_layer_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** + +Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier. + .. _class_Area_set_linear_damp: - void **set_linear_damp** **(** :ref:`float` linear_damp **)** diff --git a/classes/class_array.rst b/classes/class_array.rst index 1ea19f6b0..b36c95302 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -35,11 +35,17 @@ Member Functions +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** var value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`empty` **(** **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`erase` **(** var value **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** var value **)** | +| :ref:`int` | :ref:`find` **(** var what, :ref:`int` from=0 **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find_last` **(** var value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has` **(** var value **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hash` **(** **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ @@ -61,6 +67,8 @@ Member Functions +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`resize` **(** :ref:`int` pos **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** var what, :ref:`int` from=-1 **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`sort` **(** **)** | @@ -71,7 +79,7 @@ Member Functions Description ----------- -Generic array, contains several elements of any type, accessible by numerical index starting at 0. Arrays are always passed by reference. +Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference. Member Function Description --------------------------- @@ -130,6 +138,12 @@ Append an element at the end of the array (alias of :ref:`push_back` **count** **(** var value **)** + +Return the amount of times an element is in the array. + .. _class_Array_empty: - :ref:`bool` **empty** **(** **)** @@ -144,9 +158,21 @@ Remove the first occurrence of a value from the array. .. _class_Array_find: -- :ref:`int` **find** **(** var value **)** +- :ref:`int` **find** **(** var what, :ref:`int` from=0 **)** -Searches the array for a value and returns its index or -1 if not found. +Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. + +.. _class_Array_find_last: + +- :ref:`int` **find_last** **(** var value **)** + +Searches the array in reverse order for a value and returns its index or -1 if not found. + +.. _class_Array_has: + +- :ref:`bool` **has** **(** var value **)** + +Return true if the array contains given value. ``:ref:` "inside", 7 `.has("inside") == true, :ref:` "inside", 7 `.has("outside") == false, :ref:` "inside", 7 `.has(7) == true, :ref:` "inside", 7 `.has("7") == false`` .. _class_Array_hash: @@ -208,6 +234,12 @@ Remove an element from the array by index. Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. +.. _class_Array_rfind: + +- :ref:`int` **rfind** **(** var what, :ref:`int` from=-1 **)** + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + .. _class_Array_size: - :ref:`int` **size** **(** **)** diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index e09565ec0..de6395a98 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -32,6 +32,11 @@ Member Functions | void | :ref:`set_region` **(** :ref:`Rect2` region **)** | +--------------------------------+--------------------------------------------------------------------------------------------------+ +Signals +------- + +- **atlas_changed** **(** **)** + Member Function Description --------------------------- diff --git a/classes/class_bakedlight.rst b/classes/class_bakedlight.rst index 525b1a808..aa221b755 100644 --- a/classes/class_bakedlight.rst +++ b/classes/class_bakedlight.rst @@ -57,6 +57,12 @@ Member Functions +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_plot_size` **(** **)** const | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_realtime_color` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_realtime_color_enabled` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_realtime_energy` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`IntArray` | :ref:`get_sampler_octree` **(** **)** const | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_saturation` **(** **)** const | @@ -97,6 +103,12 @@ Member Functions +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_plot_size` **(** :ref:`float` plot_size **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_realtime_color` **(** :ref:`Color` tint **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_realtime_color_enabled` **(** :ref:`bool` enabled **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_realtime_energy` **(** :ref:`float` energy **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_sampler_octree` **(** :ref:`IntArray` sampler_octree **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_saturation` **(** :ref:`float` saturation **)** | @@ -196,6 +208,18 @@ Member Function Description - :ref:`float` **get_plot_size** **(** **)** const +.. _class_BakedLight_get_realtime_color: + +- :ref:`Color` **get_realtime_color** **(** **)** const + +.. _class_BakedLight_get_realtime_color_enabled: + +- :ref:`bool` **get_realtime_color_enabled** **(** **)** const + +.. _class_BakedLight_get_realtime_energy: + +- :ref:`float` **get_realtime_energy** **(** **)** const + .. _class_BakedLight_get_sampler_octree: - :ref:`IntArray` **get_sampler_octree** **(** **)** const @@ -276,6 +300,18 @@ Member Function Description - void **set_plot_size** **(** :ref:`float` plot_size **)** +.. _class_BakedLight_set_realtime_color: + +- void **set_realtime_color** **(** :ref:`Color` tint **)** + +.. _class_BakedLight_set_realtime_color_enabled: + +- void **set_realtime_color_enabled** **(** :ref:`bool` enabled **)** + +.. _class_BakedLight_set_realtime_energy: + +- void **set_realtime_energy** **(** :ref:`float` energy **)** + .. _class_BakedLight_set_sampler_octree: - void **set_sampler_octree** **(** :ref:`IntArray` sampler_octree **)** diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index 45dbe4e01..e433b847e 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -8,7 +8,7 @@ BaseButton **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`TextureButton`, :ref:`Button` +**Inherited By:** :ref:`LinkButton`, :ref:`TextureButton`, :ref:`Button` **Category:** Core @@ -20,31 +20,39 @@ Provides a base class for different kinds of buttons. Member Functions ---------------- -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_pressed` **(** **)** virtual | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_toggled` **(** :ref:`bool` pressed **)** virtual | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_click_on_press` **(** **)** const | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_draw_mode` **(** **)** const | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_disabled` **(** **)** const | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_hovered` **(** **)** const | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_pressed` **(** **)** const | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_toggle_mode` **(** **)** const | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_click_on_press` **(** :ref:`bool` enable **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disabled` **(** :ref:`bool` disabled **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_pressed` **(** :ref:`bool` pressed **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_toggle_mode` **(** :ref:`bool` enabled **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------+ ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_pressed` **(** **)** virtual | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_toggled` **(** :ref:`bool` pressed **)** virtual | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_click_on_press` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_draw_mode` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_enabled_focus_mode` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_shortcut` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_disabled` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_hovered` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_toggle_mode` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_click_on_press` **(** :ref:`bool` enable **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disabled` **(** :ref:`bool` disabled **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled_focus_mode` **(** :ref:`int` mode **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pressed` **(** :ref:`bool` pressed **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shortcut` **(** :ref:`Object` shortcut **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_toggle_mode` **(** :ref:`bool` enabled **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -93,6 +101,16 @@ Return the state of the click_on_press property (see :ref:`set_click_on_press` **get_enabled_focus_mode** **(** **)** const + +Returns focus access mode used when switching between enabled/disabled (see :ref:`Control.set_focus_mode` and :ref:`set_disabled`). + +.. _class_BaseButton_get_shortcut: + +- :ref:`Object` **get_shortcut** **(** **)** const + .. _class_BaseButton_is_disabled: - :ref:`bool` **is_disabled** **(** **)** const @@ -129,12 +147,22 @@ Set the button click_on_press mode. This mode generates click events when a mous Set the button into disabled state. When a button is disabled, it can't be clicked or toggled. +.. _class_BaseButton_set_enabled_focus_mode: + +- void **set_enabled_focus_mode** **(** :ref:`int` mode **)** + +Sets the focus access mode to use when switching between enabled/disabled (see :ref:`Control.set_focus_mode` and :ref:`set_disabled`). + .. _class_BaseButton_set_pressed: - void **set_pressed** **(** :ref:`bool` pressed **)** Set the button to pressed state (only if toggle_mode is active). +.. _class_BaseButton_set_shortcut: + +- void **set_shortcut** **(** :ref:`Object` shortcut **)** + .. _class_BaseButton_set_toggle_mode: - void **set_toggle_mode** **(** :ref:`bool` enabled **)** diff --git a/classes/class_bitmapfont.rst b/classes/class_bitmapfont.rst new file mode 100644 index 000000000..54e1506f7 --- /dev/null +++ b/classes/class_bitmapfont.rst @@ -0,0 +1,126 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_BitmapFont: + +BitmapFont +========== + +**Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_char` **(** :ref:`int` character, :ref:`int` texture, :ref:`Rect2` rect, :ref:`Vector2` align=Vector2((0, 0)), :ref:`float` advance=-1 **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_kerning_pair` **(** :ref:`int` char_a, :ref:`int` char_b, :ref:`int` kerning **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`create_from_fnt` **(** :ref:`String` path **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` next=0 **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_fallback` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_kerning_pair` **(** :ref:`int` char_a, :ref:`int` char_b **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_texture` **(** :ref:`int` idx **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_texture_count` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ascent` **(** :ref:`float` px **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_distance_field_hint` **(** :ref:`bool` enable **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fallback` **(** :ref:`Object` fallback **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_height` **(** :ref:`float` px **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_BitmapFont_add_char: + +- void **add_char** **(** :ref:`int` character, :ref:`int` texture, :ref:`Rect2` rect, :ref:`Vector2` align=Vector2((0, 0)), :ref:`float` advance=-1 **)** + +Add a character to the font, where *character* is the unicode value, *texture* is the texture index, *rect* is the region in the texture (in pixels!), *align* is the (optional) alignment for the character and *advance* is the (optional) advance. + +.. _class_BitmapFont_add_kerning_pair: + +- void **add_kerning_pair** **(** :ref:`int` char_a, :ref:`int` char_b, :ref:`int` kerning **)** + +Add a kerning pair to the :ref:`BitmapFont` as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + +.. _class_BitmapFont_add_texture: + +- void **add_texture** **(** :ref:`Texture` texture **)** + +Add a texture to the :ref:`BitmapFont`. + +.. _class_BitmapFont_clear: + +- void **clear** **(** **)** + +Clear all the font data. + +.. _class_BitmapFont_create_from_fnt: + +- :ref:`int` **create_from_fnt** **(** :ref:`String` path **)** + +.. _class_BitmapFont_get_char_size: + +- :ref:`Vector2` **get_char_size** **(** :ref:`int` char, :ref:`int` next=0 **)** const + +Return the size of a character, optionally taking kerning into account if the next character is provided. + +.. _class_BitmapFont_get_fallback: + +- :ref:`Object` **get_fallback** **(** **)** const + +.. _class_BitmapFont_get_kerning_pair: + +- :ref:`int` **get_kerning_pair** **(** :ref:`int` char_a, :ref:`int` char_b **)** const + +Return a kerning pair as a difference. + +.. _class_BitmapFont_get_texture: + +- :ref:`Texture` **get_texture** **(** :ref:`int` idx **)** const + +.. _class_BitmapFont_get_texture_count: + +- :ref:`int` **get_texture_count** **(** **)** const + +.. _class_BitmapFont_set_ascent: + +- void **set_ascent** **(** :ref:`float` px **)** + +Set the font ascent (number of pixels above the baseline). + +.. _class_BitmapFont_set_distance_field_hint: + +- void **set_distance_field_hint** **(** :ref:`bool` enable **)** + +.. _class_BitmapFont_set_fallback: + +- void **set_fallback** **(** :ref:`Object` fallback **)** + +.. _class_BitmapFont_set_height: + +- void **set_height** **(** :ref:`float` px **)** + +Set the total font height (ascent plus descent) in pixels. + + diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 4645d0758..4c4f31c80 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -18,6 +18,8 @@ Camera node for 2D scenes. Member Functions ---------------- ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`align` **(** **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_current` **(** **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ @@ -55,6 +57,8 @@ Member Functions +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`make_current` **(** **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reset_smoothing` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_anchor_mode` **(** :ref:`int` anchor_mode **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_drag_margin` **(** :ref:`int` margin, :ref:`float` drag_margin **)** | @@ -96,6 +100,12 @@ This node is intended to be a simple helper get get things going quickly and it Member Function Description --------------------------- +.. _class_Camera2D_align: + +- void **align** **(** **)** + +Align the camera to the tracked node + .. _class_Camera2D_clear_current: - void **clear_current** **(** **)** @@ -182,6 +192,14 @@ Return true of this is the current camera (see :ref:`make_current` anchor_mode **)** diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 616bfca43..26d151c40 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -39,6 +39,8 @@ Member Functions +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_set_transform` **(** :ref:`Vector2` pos, :ref:`float` rot, :ref:`Vector2` scale **)** | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_set_transform_matrix` **(** :ref:`Matrix32` xform **)** | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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 **)** | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | @@ -49,13 +51,13 @@ Member Functions +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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 **)** | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`edit_get_state` **(** **)** const | +| :ref:`Variant` | :ref:`edit_get_state` **(** **)** const | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`edit_rotate` **(** :ref:`float` degrees **)** | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`edit_set_rect` **(** :ref:`Rect2` rect **)** | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit_set_state` **(** var state **)** | +| void | :ref:`edit_set_state` **(** :ref:`Variant` state **)** | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_blend_mode` **(** **)** const | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -71,6 +73,8 @@ Member Functions +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Matrix32` | :ref:`get_global_transform_with_canvas` **(** **)** const | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_item_and_children_rect` **(** **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_item_rect` **(** **)** const | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_light_mask` **(** **)** const | @@ -103,6 +107,8 @@ Member Functions +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_visible` **(** **)** const | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`make_canvas_pos_local` **(** :ref:`Vector2` screen_point **)** const | ++------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** const | +------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_as_toplevel` **(** :ref:`bool` enable **)** | @@ -220,6 +226,10 @@ Draw a colored rectangle. Set a custom transform for drawing. Anything drawn afterwards will be transformed by this. +.. _class_CanvasItem_draw_set_transform_matrix: + +- void **draw_set_transform_matrix** **(** :ref:`Matrix32` xform **)** + .. _class_CanvasItem_draw_string: - void **draw_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** @@ -252,7 +262,7 @@ Draw a textured rectangle region at a given position, optionally modulated by a .. _class_CanvasItem_edit_get_state: -- Variant **edit_get_state** **(** **)** const +- :ref:`Variant` **edit_get_state** **(** **)** const Used for editing, returns an opaque value representing the transform state. @@ -268,7 +278,7 @@ Used for editing, handle rotation. .. _class_CanvasItem_edit_set_state: -- void **edit_set_state** **(** var state **)** +- void **edit_set_state** **(** :ref:`Variant` state **)** Set the transform state of this CanvasItem. For :ref:`Node2D`, this is an :ref:`Array` with (in order) a :ref:`Vector2` for position, a float for rotation and another :ref:`Vector2` for scale. For :ref:`Control` this is a :ref:`Rect2` with the position and size. @@ -314,6 +324,12 @@ Get the global transform matrix of this item. Get the global transform matrix of this item in relation to the canvas. +.. _class_CanvasItem_get_item_and_children_rect: + +- :ref:`Rect2` **get_item_and_children_rect** **(** **)** const + +Get a :ref:`Rect2` with the boundaries of this item and its children. + .. _class_CanvasItem_get_item_rect: - :ref:`Rect2` **get_item_rect** **(** **)** const @@ -410,6 +426,10 @@ Return if set as toplevel. See :ref:`set_as_toplevel` **make_canvas_pos_local** **(** :ref:`Vector2` screen_point **)** const + .. _class_CanvasItem_make_input_local: - :ref:`InputEvent` **make_input_local** **(** :ref:`InputEvent` event **)** const diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index 669fd74b2..213d23cb8 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -18,19 +18,19 @@ Brief Description Member Functions ---------------- -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shader` | :ref:`get_shader` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get_shader_param` **(** :ref:`String` param **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_shading_mode` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_shader` **(** :ref:`Shader` shader **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_shader_param` **(** :ref:`String` param, var value **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_shading_mode` **(** :ref:`int` mode **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shader` | :ref:`get_shader` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_shader_param` **(** :ref:`String` param **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_shading_mode` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader` **(** :ref:`Shader` shader **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader_param` **(** :ref:`String` param, :ref:`Variant` value **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shading_mode` **(** :ref:`int` mode **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -60,7 +60,7 @@ Member Function Description .. _class_CanvasItemMaterial_set_shader_param: -- void **set_shader_param** **(** :ref:`String` param, var value **)** +- void **set_shader_param** **(** :ref:`String` param, :ref:`Variant` value **)** .. _class_CanvasItemMaterial_set_shading_mode: diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 33284fa82..378176523 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -23,7 +23,7 @@ Member Functions +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_input_event` **(** :ref:`Object` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** virtual | +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_shape` **(** :ref:`Shape2D` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** | +| void | :ref:`add_shape` **(** :ref:`Shape2D` shape, :ref:`Matrix32` transform=((1, 0), (0, 1), (0, 0)) **)** | +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_shapes` **(** **)** | +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -73,7 +73,7 @@ This method can be used to override normal input processing. The first parameter .. _class_CollisionObject2D_add_shape: -- void **add_shape** **(** :ref:`Shape2D` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** +- void **add_shape** **(** :ref:`Shape2D` shape, :ref:`Matrix32` transform=((1, 0), (0, 1), (0, 0)) **)** Add a :ref:`Shape2D` to the collision body, with a given custom transform. diff --git a/classes/class_colorarray.rst b/classes/class_colorarray.rst index 71884b59f..3f6f546af 100644 --- a/classes/class_colorarray.rst +++ b/classes/class_colorarray.rst @@ -16,17 +16,27 @@ Array of Colors Member Functions ---------------- -+--------------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`ColorArray` | :ref:`ColorArray` **(** :ref:`Array` from **)** | -+--------------------------------------+-----------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_back` **(** :ref:`Color` color **)** | -+--------------------------------------+-----------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` idx **)** | -+--------------------------------------+-----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` idx, :ref:`Color` color **)** | -+--------------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** | -+--------------------------------------+-----------------------------------------------------------------------------------------------------------+ ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`ColorArray` | :ref:`ColorArray` **(** :ref:`Array` from **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append` **(** :ref:`Color` color **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_array` **(** :ref:`ColorArray` array **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`Color` color **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invert` **(** **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`Color` color **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove` **(** :ref:`int` idx **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`Color` color **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -42,12 +52,42 @@ Member Function Description Create from a generic array. +.. _class_ColorArray_append: + +- void **append** **(** :ref:`Color` color **)** + +Append an element at the end of the array (alias of :ref:`push_back`). + +.. _class_ColorArray_append_array: + +- void **append_array** **(** :ref:`ColorArray` array **)** + +Append an :ref:`ColorArray` at the end of this array. + +.. _class_ColorArray_insert: + +- :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Color` color **)** + +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + +.. _class_ColorArray_invert: + +- void **invert** **(** **)** + +Reverse the order of the elements in the array (so first element will now be the last). + .. _class_ColorArray_push_back: - void **push_back** **(** :ref:`Color` color **)** Append a value to the array. +.. _class_ColorArray_remove: + +- void **remove** **(** :ref:`int` idx **)** + +Remove an element from the array by index. + .. _class_ColorArray_resize: - void **resize** **(** :ref:`int` idx **)** diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 3349c88e7..701812f5b 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -69,7 +69,7 @@ Returns whether the color has transparency or not. - :ref:`bool` **is_raw_mode** **(** **)** const -Returns whether this color picker is in raw mode or not +Returns whether this color picker is in raw mode or not, raw mode will allow the color R, G, B component values to go beyond 1, you have to consider that the max value for color components is 1, going beyond that value will not have effect in the color, but can be used for special operations that require it (like tinting without darkening or rendering sprites in HDR). .. _class_ColorPicker_set_color: @@ -87,6 +87,6 @@ Set true if you want the color to have an alpha channel (transparency), or false - void **set_raw_mode** **(** :ref:`bool` mode **)** -When set to true, every color channel will be represented as a value from 0 to 1, insetead of 0, 255. +Set whether this color picker is using raw mode or not, see :ref:`is_raw_mode`. diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 2d718d4c9..853c9e84e 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -18,23 +18,23 @@ Helper class to handle INI-style files. Member Functions ---------------- -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringArray` | :ref:`get_section_keys` **(** :ref:`String` section **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringArray` | :ref:`get_sections` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`get_value` **(** :ref:`String` section, :ref:`String` key, var default=NULL **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_section` **(** :ref:`String` section **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_section_key` **(** :ref:`String` section, :ref:`String` key **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Error | :ref:`load` **(** :ref:`String` path **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Error | :ref:`save` **(** :ref:`String` path **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_value` **(** :ref:`String` section, :ref:`String` key, var value **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_section_keys` **(** :ref:`String` section **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_sections` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_value` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=NULL **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_section` **(** :ref:`String` section **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_section_key` **(** :ref:`String` section, :ref:`String` key **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`load` **(** :ref:`String` path **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`save` **(** :ref:`String` path **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_value` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -51,10 +51,10 @@ The following example shows how to parse a INI-style file from the system, read # 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) + 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") + config.save("user://settings.cfg") Member Function Description --------------------------- @@ -73,7 +73,7 @@ Return an array of all defined section identifiers. .. _class_ConfigFile_get_value: -- Variant **get_value** **(** :ref:`String` section, :ref:`String` key, var default=NULL **)** const +- :ref:`Variant` **get_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` 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). @@ -105,7 +105,7 @@ The return value is one of the OK, FAILED or ERR\_\* constants listed in :ref:`@ .. _class_ConfigFile_set_value: -- void **set_value** **(** :ref:`String` section, :ref:`String` key, var value **)** +- void **set_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` 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). diff --git a/classes/class_control.rst b/classes/class_control.rst index b8d4100fb..ccaa55f3e 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -37,11 +37,11 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_style_override` **(** :ref:`String` name, :ref:`StyleBox` stylebox **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_drop_data` **(** :ref:`Vector2` pos, var data **)** virtual | +| :ref:`bool` | :ref:`can_drop_data` **(** :ref:`Vector2` pos, :ref:`Variant` data **)** virtual | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`drop_data` **(** :ref:`Vector2` pos, var data **)** virtual | +| void | :ref:`drop_data` **(** :ref:`Vector2` pos, :ref:`Variant` data **)** virtual | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_drag` **(** var data, :ref:`Object` preview **)** | +| void | :ref:`force_drag` **(** :ref:`Variant` data, :ref:`Object` preview **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_anchor` **(** :ref:`int` margin **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -53,7 +53,7 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_constant` **(** :ref:`String` name, :ref:`String` type="" **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cursor_shape` **(** :ref:`Vector2` pos=Vector2(0,0) **)** const | +| :ref:`int` | :ref:`get_cursor_shape` **(** :ref:`Vector2` pos=Vector2((0, 0)) **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_custom_minimum_size` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -63,6 +63,8 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_end` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_focus_mode` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`get_focus_neighbour` **(** :ref:`int` margin **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`get_focus_owner` **(** **)** const | @@ -105,7 +107,7 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Theme` | :ref:`get_theme` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tooltip` **(** :ref:`Vector2` atpos=Vector2(0,0) **)** const | +| :ref:`String` | :ref:`get_tooltip` **(** :ref:`Vector2` atpos=Vector2((0, 0)) **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_v_size_flags` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -113,15 +115,37 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`grab_focus` **(** **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_color` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_color_override` **(** :ref:`String` name **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_constant` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_constant_override` **(** :ref:`String` name **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_focus` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_font` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_font_override` **(** :ref:`String` name **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_icon` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_icon_override` **(** :ref:`String` name **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_stylebox` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_stylebox_override` **(** :ref:`String` name **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_ignoring_mouse` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_stopping_mouse` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`minimum_size_changed` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`release_focus` **(** **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_anchor` **(** :ref:`int` margin, :ref:`int` anchor_mode **)** | +| void | :ref:`set_anchor` **(** :ref:`int` margin, :ref:`int` anchor_mode, :ref:`bool` keep_margin=false **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_anchor_and_margin` **(** :ref:`int` margin, :ref:`int` anchor_mode, :ref:`float` offset **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -133,6 +157,8 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_default_cursor_shape` **(** :ref:`int` shape **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_drag_forwarding` **(** :ref:`Control` target **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_drag_preview` **(** :ref:`Control` control **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_end` **(** :ref:`Vector2` pos **)** | @@ -291,15 +317,15 @@ Override a single stylebox (:ref:`Stylebox`) in the theme of thi .. _class_Control_can_drop_data: -- :ref:`bool` **can_drop_data** **(** :ref:`Vector2` pos, var data **)** virtual +- :ref:`bool` **can_drop_data** **(** :ref:`Vector2` pos, :ref:`Variant` data **)** virtual .. _class_Control_drop_data: -- void **drop_data** **(** :ref:`Vector2` pos, var data **)** virtual +- void **drop_data** **(** :ref:`Vector2` pos, :ref:`Variant` data **)** virtual .. _class_Control_force_drag: -- void **force_drag** **(** var data, :ref:`Object` preview **)** +- void **force_drag** **(** :ref:`Variant` data, :ref:`Object` preview **)** .. _class_Control_get_anchor: @@ -325,7 +351,7 @@ Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given marg .. _class_Control_get_cursor_shape: -- :ref:`int` **get_cursor_shape** **(** :ref:`Vector2` pos=Vector2(0,0) **)** const +- :ref:`int` **get_cursor_shape** **(** :ref:`Vector2` pos=Vector2((0, 0)) **)** const Return the cursor shape at a certain position in the control. @@ -349,6 +375,12 @@ Return the default cursor shape for this control. See enum CURSOR\_\* for the li Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see :ref:`set_margin`). +.. _class_Control_get_focus_mode: + +- :ref:`int` **get_focus_mode** **(** **)** const + +Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see :ref:`set_focus_mode`). + .. _class_Control_get_focus_neighbour: - :ref:`NodePath` **get_focus_neighbour** **(** :ref:`int` margin **)** const @@ -461,7 +493,7 @@ Return a :ref:`Theme` override, if one exists (see :ref:`set_theme< .. _class_Control_get_tooltip: -- :ref:`String` **get_tooltip** **(** :ref:`Vector2` atpos=Vector2(0,0) **)** const +- :ref:`String` **get_tooltip** **(** :ref:`Vector2` atpos=Vector2((0, 0)) **)** const Return the tooltip, which will appear when the cursor is resting over this control. @@ -481,12 +513,52 @@ Hint for containers, return vertical positioning flags. Steal the focus from another control and become the focused control (see :ref:`set_focus_mode`). +.. _class_Control_has_color: + +- :ref:`bool` **has_color** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_has_color_override: + +- :ref:`bool` **has_color_override** **(** :ref:`String` name **)** const + +.. _class_Control_has_constant: + +- :ref:`bool` **has_constant** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_has_constant_override: + +- :ref:`bool` **has_constant_override** **(** :ref:`String` name **)** const + .. _class_Control_has_focus: - :ref:`bool` **has_focus** **(** **)** const Return whether the Control is the current focused control (see :ref:`set_focus_mode`). +.. _class_Control_has_font: + +- :ref:`bool` **has_font** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_has_font_override: + +- :ref:`bool` **has_font_override** **(** :ref:`String` name **)** const + +.. _class_Control_has_icon: + +- :ref:`bool` **has_icon** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_has_icon_override: + +- :ref:`bool` **has_icon_override** **(** :ref:`String` name **)** const + +.. _class_Control_has_stylebox: + +- :ref:`bool` **has_stylebox** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_has_stylebox_override: + +- :ref:`bool` **has_stylebox_override** **(** :ref:`String` name **)** const + .. _class_Control_is_ignoring_mouse: - :ref:`bool` **is_ignoring_mouse** **(** **)** const @@ -497,6 +569,10 @@ Return if the control is ignoring mouse events (even touchpad events send mouse - :ref:`bool` **is_stopping_mouse** **(** **)** const +.. _class_Control_minimum_size_changed: + +- void **minimum_size_changed** **(** **)** + .. _class_Control_release_focus: - void **release_focus** **(** **)** @@ -505,9 +581,11 @@ Give up the focus, no other control will be able to receive keyboard input. .. _class_Control_set_anchor: -- void **set_anchor** **(** :ref:`int` margin, :ref:`int` anchor_mode **)** +- void **set_anchor** **(** :ref:`int` margin, :ref:`int` anchor_mode, :ref:`bool` keep_margin=false **)** -Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previous anchor mode to the new one, so margin offsets (:ref:`set_margin`) must be done after setting anchors, or at the same time (:ref:`set_anchor_and_margin`). +Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previous anchor mode to the new one, so margin offsets (:ref:`set_margin`) must be done after setting anchors, or at the same time (:ref:`set_anchor_and_margin`) + +Additionally, ``keep_margin`` controls whether margins should be left the same, or changed to keep the same position and size on-screen. .. _class_Control_set_anchor_and_margin: @@ -537,6 +615,10 @@ Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see :ref:`se Set the default cursor shape for this control. See enum CURSOR\_\* for the list of shapes. +.. _class_Control_set_drag_forwarding: + +- void **set_drag_forwarding** **(** :ref:`Control` target **)** + .. _class_Control_set_drag_preview: - void **set_drag_preview** **(** :ref:`Control` control **)** diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 2335f7879..e28dcf3bc 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -18,41 +18,41 @@ Describes a Bezier curve in 2D space. Member Functions ---------------- -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`Vector2` pos, :ref:`Vector2` in=Vector2(0,0), :ref:`Vector2` out=Vector2(0,0), :ref:`int` atpos=-1 **)** | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_bake_interval` **(** **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_baked_length` **(** **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2Array` | :ref:`get_baked_points` **(** **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_in` **(** :ref:`int` idx **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_out` **(** :ref:`int` idx **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_pos` **(** :ref:`int` idx **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`interpolate` **(** :ref:`int` idx, :ref:`float` t **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`interpolate_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`interpolatef` **(** :ref:`float` fofs **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` idx **)** | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bake_interval` **(** :ref:`float` distance **)** | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_pos` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2Array` | :ref:`tesselate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const | -+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`Vector2` pos, :ref:`Vector2` in=Vector2((0, 0)), :ref:`Vector2` out=Vector2((0, 0)), :ref:`int` atpos=-1 **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bake_interval` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_baked_length` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_baked_points` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_in` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_out` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_pos` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`interpolate` **(** :ref:`int` idx, :ref:`float` t **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`interpolate_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`interpolatef` **(** :ref:`float` fofs **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` idx **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bake_interval` **(** :ref:`float` distance **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_pos` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`tesselate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -66,7 +66,7 @@ Member Function Description .. _class_Curve2D_add_point: -- void **add_point** **(** :ref:`Vector2` pos, :ref:`Vector2` in=Vector2(0,0), :ref:`Vector2` out=Vector2(0,0), :ref:`int` atpos=-1 **)** +- void **add_point** **(** :ref:`Vector2` pos, :ref:`Vector2` in=Vector2((0, 0)), :ref:`Vector2` out=Vector2((0, 0)), :ref:`int` atpos=-1 **)** Adds a point to a curve, at position "pos", with control points "in" and "out". diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index c137e89ec..d17661117 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -18,47 +18,47 @@ Describes a Bezier curve in 3D space. Member Functions ---------------- -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`Vector3` pos, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` atpos=-1 **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_bake_interval` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_baked_length` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3Array` | :ref:`get_baked_points` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RealArray` | :ref:`get_baked_tilts` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_in` **(** :ref:`int` idx **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_out` **(** :ref:`int` idx **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_pos` **(** :ref:`int` idx **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_point_tilt` **(** :ref:`int` idx **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`interpolate` **(** :ref:`int` idx, :ref:`float` t **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`interpolate_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`interpolatef` **(** :ref:`float` fofs **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` idx **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_bake_interval` **(** :ref:`float` distance **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_pos` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_tilt` **(** :ref:`int` idx, :ref:`float` tilt **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3Array` | :ref:`tesselate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`Vector3` pos, :ref:`Vector3` in=Vector3((0, 0, 0)), :ref:`Vector3` out=Vector3((0, 0, 0)), :ref:`int` atpos=-1 **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bake_interval` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_baked_length` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_baked_points` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RealArray` | :ref:`get_baked_tilts` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_in` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_out` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_pos` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_tilt` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`interpolate` **(** :ref:`int` idx, :ref:`float` t **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`interpolate_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`interpolatef` **(** :ref:`float` fofs **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` idx **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bake_interval` **(** :ref:`float` distance **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_pos` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_tilt` **(** :ref:`int` idx, :ref:`float` tilt **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`tesselate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -72,7 +72,7 @@ Member Function Description .. _class_Curve3D_add_point: -- void **add_point** **(** :ref:`Vector3` pos, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` atpos=-1 **)** +- void **add_point** **(** :ref:`Vector3` pos, :ref:`Vector3` in=Vector3((0, 0, 0)), :ref:`Vector3` out=Vector3((0, 0, 0)), :ref:`int` atpos=-1 **)** Adds a point to a curve, at position "pos", with control points "in" and "out". diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 713407f02..5f4bff6cb 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -37,6 +37,8 @@ Member Functions +------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`to_json` **(** **)** | +------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`values` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ Description ----------- @@ -74,6 +76,8 @@ Return true if the dictionary has a given key. - :ref:`bool` **has_all** **(** :ref:`Array` keys **)** +Return true if the dictionary has all of the keys in the given array. + .. _class_Dictionary_hash: - :ref:`int` **hash** **(** **)** @@ -84,7 +88,7 @@ Return a hashed integer value representing the dictionary contents. - :ref:`Array` **keys** **(** **)** -Return the list of keys in the dictionary. +Return the list of keys in the :ref:`Dictionary`. .. _class_Dictionary_parse_json: @@ -104,4 +108,10 @@ Return the size of the dictionary (in pairs). Return the dictionary as json text. +.. _class_Dictionary_values: + +- :ref:`Array` **values** **(** **)** + +Return the list of values in the :ref:`Dictionary`. + diff --git a/classes/class_directory.rst b/classes/class_directory.rst index 81fc2159f..9a362fb93 100644 --- a/classes/class_directory.rst +++ b/classes/class_directory.rst @@ -172,7 +172,7 @@ The method returns one of the error code constants defined in :ref:`@Global Scop 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\_\*). +Return one of the error code constants defined in :ref:`@Global Scope` (OK, FAILED or ERR\_\*). .. _class_Directory_open: @@ -188,7 +188,7 @@ The method returns one of the error code constants defined in :ref:`@Global Scop 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). +Return one of the error code constants defined in :ref:`@Global Scope` (OK or FAILED). .. _class_Directory_rename: @@ -196,6 +196,6 @@ Returns one of the error code constants defined in :ref:`@Global Scope` (OK or FAILED). +Return one of the error code constants defined in :ref:`@Global Scope` (OK or FAILED). diff --git a/classes/class_dynamicfont.rst b/classes/class_dynamicfont.rst new file mode 100644 index 000000000..b8ecb81fe --- /dev/null +++ b/classes/class_dynamicfont.rst @@ -0,0 +1,124 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_DynamicFont: + +DynamicFont +=========== + +**Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_fallback` **(** :ref:`DynamicFontData` data **)** | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`DynamicFontData` | :ref:`get_fallback` **(** :ref:`int` idx **)** const | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_fallback_count` **(** **)** const | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`DynamicFontData` | :ref:`get_font_data` **(** **)** const | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_size` **(** **)** const | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_spacing` **(** :ref:`int` type **)** const | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_use_filter` **(** **)** const | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_use_mipmaps` **(** **)** const | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_fallback` **(** :ref:`int` idx **)** | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fallback` **(** :ref:`int` idx, :ref:`DynamicFontData` data **)** | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_font_data` **(** :ref:`DynamicFontData` data **)** | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_size` **(** :ref:`int` data **)** | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_spacing` **(** :ref:`int` type, :ref:`int` value **)** | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_filter` **(** :ref:`bool` enable **)** | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_mipmaps` **(** :ref:`bool` enable **)** | ++------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **SPACING_TOP** = **0** +- **SPACING_BOTTOM** = **1** +- **SPACING_CHAR** = **2** +- **SPACING_SPACE** = **3** + +Member Function Description +--------------------------- + +.. _class_DynamicFont_add_fallback: + +- void **add_fallback** **(** :ref:`DynamicFontData` data **)** + +.. _class_DynamicFont_get_fallback: + +- :ref:`DynamicFontData` **get_fallback** **(** :ref:`int` idx **)** const + +.. _class_DynamicFont_get_fallback_count: + +- :ref:`int` **get_fallback_count** **(** **)** const + +.. _class_DynamicFont_get_font_data: + +- :ref:`DynamicFontData` **get_font_data** **(** **)** const + +.. _class_DynamicFont_get_size: + +- :ref:`int` **get_size** **(** **)** const + +.. _class_DynamicFont_get_spacing: + +- :ref:`int` **get_spacing** **(** :ref:`int` type **)** const + +.. _class_DynamicFont_get_use_filter: + +- :ref:`bool` **get_use_filter** **(** **)** const + +.. _class_DynamicFont_get_use_mipmaps: + +- :ref:`bool` **get_use_mipmaps** **(** **)** const + +.. _class_DynamicFont_remove_fallback: + +- void **remove_fallback** **(** :ref:`int` idx **)** + +.. _class_DynamicFont_set_fallback: + +- void **set_fallback** **(** :ref:`int` idx, :ref:`DynamicFontData` data **)** + +.. _class_DynamicFont_set_font_data: + +- void **set_font_data** **(** :ref:`DynamicFontData` data **)** + +.. _class_DynamicFont_set_size: + +- void **set_size** **(** :ref:`int` data **)** + +.. _class_DynamicFont_set_spacing: + +- void **set_spacing** **(** :ref:`int` type, :ref:`int` value **)** + +.. _class_DynamicFont_set_use_filter: + +- void **set_use_filter** **(** :ref:`bool` enable **)** + +.. _class_DynamicFont_set_use_mipmaps: + +- void **set_use_mipmaps** **(** :ref:`bool` enable **)** + + diff --git a/classes/class_dynamicfontdata.rst b/classes/class_dynamicfontdata.rst new file mode 100644 index 000000000..34fcdda23 --- /dev/null +++ b/classes/class_dynamicfontdata.rst @@ -0,0 +1,38 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_DynamicFontData: + +DynamicFontData +=============== + +**Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_font_path` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_font_path` **(** :ref:`String` path **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_DynamicFontData_get_font_path: + +- :ref:`String` **get_font_path** **(** **)** const + +.. _class_DynamicFontData_set_font_path: + +- void **set_font_path** **(** :ref:`String` path **)** + + diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst new file mode 100644 index 000000000..bae253756 --- /dev/null +++ b/classes/class_editorexportplugin.rst @@ -0,0 +1,45 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_EditorExportPlugin: + +EditorExportPlugin +================== + +**Inherits:** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +Editor plugin to control the export process. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`custom_export` **(** :ref:`String` name, EditorExportPlatform platform **)** virtual | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +This plugin is added into EditorImportExport and allows to modify the behavior of the export process for individual files. + +Member Function Description +--------------------------- + +.. _class_EditorExportPlugin_custom_export: + +- :ref:`Variant` **custom_export** **(** :ref:`String` name, EditorExportPlatform platform **)** virtual + +This function is called for each file exported and depending from the return value one of many things might happen. + +1) If returned value is null, the file is exported as is. + +2) If the returned value is a RawAray (array of bytes), the content of that array becomes the new file being exported. + +3) If the file must also change it's name when exported, then a :ref:`Dictionary` must be returned with two fields: 'name' with the new filename and 'data' with a :ref:`RawArray` containing the raw contents of the file. Even if the name is changed, the run-time will redirect the old file to the new file automatically when accessed. + + diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 2d3b36553..62549b5bb 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -18,43 +18,47 @@ Brief Description Member Functions ---------------- -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_filter` **(** :ref:`String` filter **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_filters` **(** **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_access` **(** **)** const | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_current_dir` **(** **)** const | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_current_file` **(** **)** const | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_current_path` **(** **)** const | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_display_mode` **(** **)** const | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_mode` **(** **)** const | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`invalidate` **(** **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_showing_hidden_files` **(** **)** const | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_access` **(** :ref:`int` access **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_current_dir` **(** :ref:`String` dir **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_current_file` **(** :ref:`String` file **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_current_path` **(** :ref:`String` path **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_display_mode` **(** :ref:`int` mode **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_mode` **(** :ref:`int` mode **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_show_hidden_files` **(** :ref:`bool` show **)** | -+--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_filter` **(** :ref:`String` filter **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_filters` **(** **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_access` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_dir` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_file` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_path` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_display_mode` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invalidate` **(** **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_overwrite_warning_disabled` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_showing_hidden_files` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_access` **(** :ref:`int` access **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_dir` **(** :ref:`String` dir **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_file` **(** :ref:`String` file **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_path` **(** :ref:`String` path **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disable_overwrite_warning` **(** :ref:`bool` disable **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_display_mode` **(** :ref:`int` mode **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mode` **(** :ref:`int` mode **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_show_hidden_files` **(** :ref:`bool` show **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -69,7 +73,8 @@ Numeric Constants - **MODE_OPEN_FILE** = **0** - **MODE_OPEN_FILES** = **1** - **MODE_OPEN_DIR** = **2** -- **MODE_SAVE_FILE** = **3** +- **MODE_OPEN_ANY** = **3** +- **MODE_SAVE_FILE** = **4** - **ACCESS_RESOURCES** = **0** - **ACCESS_USERDATA** = **1** - **ACCESS_FILESYSTEM** = **2** @@ -117,6 +122,10 @@ Member Function Description - void **invalidate** **(** **)** +.. _class_EditorFileDialog_is_overwrite_warning_disabled: + +- :ref:`bool` **is_overwrite_warning_disabled** **(** **)** const + .. _class_EditorFileDialog_is_showing_hidden_files: - :ref:`bool` **is_showing_hidden_files** **(** **)** const @@ -137,6 +146,10 @@ Member Function Description - void **set_current_path** **(** :ref:`String` path **)** +.. _class_EditorFileDialog_set_disable_overwrite_warning: + +- void **set_disable_overwrite_warning** **(** :ref:`bool` disable **)** + .. _class_EditorFileDialog_set_display_mode: - void **set_display_mode** **(** :ref:`int` mode **)** diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index a949a1c87..63b90d98f 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -13,44 +13,105 @@ EditorImportPlugin Brief Description ----------------- - +Import plugin for editor Member Functions ---------------- -+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RawArray` | :ref:`custom_export` **(** :ref:`String` path **)** virtual | -+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_name` **(** **)** virtual | -+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_visible_name` **(** **)** virtual | -+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`import` **(** :ref:`String` path, ResourceImportMetaData from **)** virtual | -+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`import_dialog` **(** :ref:`String` from **)** virtual | -+----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_reimport_multiple_files` **(** **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`custom_export` **(** :ref:`String` path, EditorExportPlatform platform **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`expand_source_path` **(** :ref:`String` path **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_visible_name` **(** **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`import` **(** :ref:`String` path, :ref:`ResourceImportMetadata` from **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`import_dialog` **(** :ref:`String` from **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`import_from_drop` **(** :ref:`StringArray` files, :ref:`String` dest_path **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reimport_multiple_files` **(** :ref:`StringArray` files **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`validate_source_path` **(** :ref:`String` path **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Import plugins make it easy to handle importing of external assets into a project. They way they work is not that obvious though, so please make sure to read the documentation, tutorials and examples. Member Function Description --------------------------- +.. _class_EditorImportPlugin_can_reimport_multiple_files: + +- :ref:`bool` **can_reimport_multiple_files** **(** **)** virtual + .. _class_EditorImportPlugin_custom_export: -- :ref:`RawArray` **custom_export** **(** :ref:`String` path **)** virtual +- :ref:`RawArray` **custom_export** **(** :ref:`String` path, EditorExportPlatform platform **)** virtual + +Generally, files that are imported stay the same when exported. The only exception is in some cases when the file must be re-imported for different platforms (ie. texture compression). + +If you want to customize the export process, it's recommended to use :ref:`EditorExportPlugin.custom_export` instead. + +.. _class_EditorImportPlugin_expand_source_path: + +- :ref:`String` **expand_source_path** **(** :ref:`String` path **)** .. _class_EditorImportPlugin_get_name: - :ref:`String` **get_name** **(** **)** virtual +Get the name of the import plugin, which will be used to identify content imported by this plugin. Try to use lowercase and underscores if possible. + .. _class_EditorImportPlugin_get_visible_name: - :ref:`String` **get_visible_name** **(** **)** virtual +Visible name for this plugin, which will be shown on the import menu. + .. _class_EditorImportPlugin_import: -- :ref:`int` **import** **(** :ref:`String` path, ResourceImportMetaData from **)** virtual +- :ref:`int` **import** **(** :ref:`String` path, :ref:`ResourceImportMetadata` from **)** virtual + +Perform an import of an external resources into the project. This function is both called on import (from the dialog) or re-import (manual or automatic when external source files changed). + +An import process generally works like this: + +1) Check the metadata for source files and options. Metadata is either generated in the import dialog or taken from an existing resource upon reimport. + +2) Perform the import process into a new resource. Some times the resource being re-imported may be already loaded and in use, so checking for this by using :ref:`ResourceLoader.has` is recommended. Otherwise create a new resource. + +3) Set the metadata from the argument into the existing or new resource being created using :ref:`Resource.set_import_metadata`. + +4) Save the resource into 'path' (function argument) .. _class_EditorImportPlugin_import_dialog: - void **import_dialog** **(** :ref:`String` from **)** virtual +This function is called when either the user chooses to import a resource of this type (Import menu), or when the user chooses to re-import the resource (from filesystem). In the later case, the path for the existing file is supplied in the argument. + +If the path is supplied, it is recommended to read the import metadata with :ref:`ResourceLoader.load_import_metadata` and fill in the fields with the values contained there. + +The dialog can be shown in any way (just use a ConfirmationDialog and pop it up). Upon confirmation, fill up a ResourceImportMetadata and call the :ref:`EditorImportPlugin.import` function with this information. + +.. _class_EditorImportPlugin_import_from_drop: + +- void **import_from_drop** **(** :ref:`StringArray` files, :ref:`String` dest_path **)** virtual + +.. _class_EditorImportPlugin_reimport_multiple_files: + +- void **reimport_multiple_files** **(** :ref:`StringArray` files **)** virtual + +.. _class_EditorImportPlugin_validate_source_path: + +- :ref:`String` **validate_source_path** **(** :ref:`String` path **)** + diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 541159ed0..7e16dd1d7 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -13,44 +13,68 @@ EditorPlugin Brief Description ----------------- - +Used by the editor to extend it's functionality. Member Functions ---------------- -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_control` **(** :ref:`int` container, :ref:`Object` control **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_custom_type` **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture` icon **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_changes` **(** **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`edit` **(** :ref:`Object` object **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`forward_input_event` **(** :ref:`InputEvent` event **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`forward_spatial_input_event` **(** :ref:`Camera` camera, :ref:`InputEvent` event **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringArray` | :ref:`get_breakpoints` **(** **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_name` **(** **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_state` **(** **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_undo_redo` **(** **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`handles` **(** :ref:`Object` object **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_main_screen` **(** **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`make_visible` **(** :ref:`bool` visible **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_custom_type` **(** :ref:`String` type **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_state` **(** :ref:`Dictionary` state **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ToolButton` | :ref:`add_control_to_bottom_panel` **(** :ref:`Control` control, :ref:`String` title **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_control_to_container` **(** :ref:`int` container, :ref:`Control` control **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_control_to_dock` **(** :ref:`int` slot, :ref:`Control` control **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_custom_type` **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture` icon **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_import_plugin` **(** :ref:`EditorImportPlugin` plugin **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_changes` **(** **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorSpatialGizmo` | :ref:`create_spatial_gizmo` **(** :ref:`Spatial` for_spatial **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit` **(** :ref:`Object` object **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`forward_input_event` **(** :ref:`InputEvent` event **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`forward_spatial_input_event` **(** :ref:`Camera` camera, :ref:`InputEvent` event **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Control` | :ref:`get_base_control` **(** **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_breakpoints` **(** **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorSettings` | :ref:`get_editor_settings` **(** **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorSelection` | :ref:`get_selection` **(** **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_state` **(** **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`UndoRedo` | :ref:`get_undo_redo` **(** **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`handles` **(** :ref:`Object` object **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_main_screen` **(** **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_visible` **(** :ref:`bool` visible **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_control_from_bottom_panel` **(** :ref:`Control` control **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_control_from_docks` **(** :ref:`Control` control **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_custom_type` **(** :ref:`String` type **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_export_plugin` **(** :ref:`EditorExportPlugin` plugin **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_import_plugin` **(** :ref:`EditorImportPlugin` plugin **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_state` **(** :ref:`Dictionary` state **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -61,72 +85,217 @@ Numeric Constants - **CONTAINER_SPATIAL_EDITOR_BOTTOM** = **3** - **CONTAINER_CANVAS_EDITOR_MENU** = **4** - **CONTAINER_CANVAS_EDITOR_SIDE** = **5** +- **CONTAINER_PROPERTY_EDITOR_BOTTOM** = **7** +- **DOCK_SLOT_LEFT_UL** = **0** +- **DOCK_SLOT_LEFT_BL** = **1** +- **DOCK_SLOT_LEFT_UR** = **2** +- **DOCK_SLOT_LEFT_BR** = **3** +- **DOCK_SLOT_RIGHT_UL** = **4** +- **DOCK_SLOT_RIGHT_BL** = **5** +- **DOCK_SLOT_RIGHT_UR** = **6** +- **DOCK_SLOT_RIGHT_BR** = **7** +- **DOCK_SLOT_MAX** = **8** + +Description +----------- + +Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. Member Function Description --------------------------- -.. _class_EditorPlugin_add_custom_control: +.. _class_EditorPlugin_add_control_to_bottom_panel: -- void **add_custom_control** **(** :ref:`int` container, :ref:`Object` control **)** +- :ref:`ToolButton` **add_control_to_bottom_panel** **(** :ref:`Control` control, :ref:`String` title **)** + +Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. If your plugin is being removed, also make sure to remove your control by calling :ref:`remove_control_from_bottom_panel`. + +.. _class_EditorPlugin_add_control_to_container: + +- void **add_control_to_container** **(** :ref:`int` container, :ref:`Control` control **)** + +Add a custom control to a container (see CONTAINER\_\* enum). There are many locations where custom controls can be added in the editor UI. + +Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). + +If your plugin is being removed, also make sure to remove your custom controls too. + +.. _class_EditorPlugin_add_control_to_dock: + +- void **add_control_to_dock** **(** :ref:`int` slot, :ref:`Control` control **)** + +Add the control to a specific dock slot (see DOCK\_\* enum for options). + +If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. + +If your plugin is being removed, also make sure to remove your control by calling :ref:`remove_control_from_docks`. .. _class_EditorPlugin_add_custom_type: - void **add_custom_type** **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture` icon **)** +Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. + +When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. + +You can use the :ref:`EditorPlugin.handles` to check if your custom object is being edited by checking the script or using 'extends' keyword. + +During run-time, this will be a simple object with a script so this function does not need to be called then. + +.. _class_EditorPlugin_add_export_plugin: + +- void **add_export_plugin** **(** :ref:`EditorExportPlugin` plugin **)** + +Add an export plugin. Plugins of this kind can change files being exported. On exit don't forget to call :ref:`remove_export_plugin`. + +.. _class_EditorPlugin_add_import_plugin: + +- void **add_import_plugin** **(** :ref:`EditorImportPlugin` plugin **)** + +Add an import plugin. These plugins manage importing external content (from outside the project) into formats the engine can understand. + +On exit, don't forget to remove the plugin by calling :ref:`remove_import_plugin` + .. _class_EditorPlugin_apply_changes: - void **apply_changes** **(** **)** virtual +This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency. + +This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object. + .. _class_EditorPlugin_clear: - void **clear** **(** **)** virtual +Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene. + +.. _class_EditorPlugin_create_spatial_gizmo: + +- :ref:`EditorSpatialGizmo` **create_spatial_gizmo** **(** :ref:`Spatial` for_spatial **)** virtual + +This is used for plugins that create gizmos used by the spatial editor. Just check that the node passed in the "for_spatial" argument matches your plugin. + .. _class_EditorPlugin_edit: - void **edit** **(** :ref:`Object` object **)** virtual +This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. + .. _class_EditorPlugin_forward_input_event: - :ref:`bool` **forward_input_event** **(** :ref:`InputEvent` event **)** virtual +This is a low level function for plugins that edit a given object type derived from CanvasItem to capture the input in the 2D editor viewport. The function is only being called if your object is being edited. + +Return true if you want to capture the input, otherwise false. + .. _class_EditorPlugin_forward_spatial_input_event: - :ref:`bool` **forward_spatial_input_event** **(** :ref:`Camera` camera, :ref:`InputEvent` event **)** virtual +This is a low level function for plugins that edit a given objet type derived from Spatial to capture the input of the viewport. The function is only being called if your object is being edited. + +By using the :ref:`InputEvent` and the :ref:`Camera` arguments it's pretty easy to do raycasts into space using Camera functions. + +Return true if you want to capture the input, otherwise false. + +.. _class_EditorPlugin_get_base_control: + +- :ref:`Control` **get_base_control** **(** **)** + +Get a base control where it's safe to place dialogs. Many plugins open dialogs and they need a control as a base to make sure they use the editor icons and theme. + .. _class_EditorPlugin_get_breakpoints: - :ref:`StringArray` **get_breakpoints** **(** **)** virtual +This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25 + +.. _class_EditorPlugin_get_editor_settings: + +- :ref:`EditorSettings` **get_editor_settings** **(** **)** + +Get the general settings for the editor (the same window that appears in the Settings menu). + .. _class_EditorPlugin_get_name: - :ref:`String` **get_name** **(** **)** virtual +Get the name of the editor plugin. For main scren plugins this is what will appear in the selector (which by default is 2D, 3D, Script). + +.. _class_EditorPlugin_get_selection: + +- :ref:`EditorSelection` **get_selection** **(** **)** + +Get the object that handles the selection of nodes in the Scene Tree editor. + .. _class_EditorPlugin_get_state: - :ref:`Dictionary` **get_state** **(** **)** virtual +Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). + .. _class_EditorPlugin_get_undo_redo: -- :ref:`Object` **get_undo_redo** **(** **)** +- :ref:`UndoRedo` **get_undo_redo** **(** **)** + +Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. .. _class_EditorPlugin_handles: - :ref:`bool` **handles** **(** :ref:`Object` object **)** virtual +Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions :ref:`EditorPlugin.edit` and :ref:`EditorPlugin.make_visible` called when the editor requests them. + .. _class_EditorPlugin_has_main_screen: - :ref:`bool` **has_main_screen** **(** **)** virtual +Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script). + .. _class_EditorPlugin_make_visible: - void **make_visible** **(** :ref:`bool` visible **)** virtual +This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. + +Remember that you have to manage the visibility of all your editor controls manually. + +.. _class_EditorPlugin_remove_control_from_bottom_panel: + +- void **remove_control_from_bottom_panel** **(** :ref:`Control` control **)** + +Remove the control from the bottom panel. Don't forget to call this if you added one, so the editor can remove it cleanly. + +.. _class_EditorPlugin_remove_control_from_docks: + +- void **remove_control_from_docks** **(** :ref:`Control` control **)** + +Remove the control from the dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly. + .. _class_EditorPlugin_remove_custom_type: - void **remove_custom_type** **(** :ref:`String` type **)** +Remove a custom type added by :ref:`EditorPlugin.add_custom_type` + +.. _class_EditorPlugin_remove_export_plugin: + +- void **remove_export_plugin** **(** :ref:`EditorExportPlugin` plugin **)** + +Remove the export plugin, don't forget to call this on exit. + +.. _class_EditorPlugin_remove_import_plugin: + +- void **remove_import_plugin** **(** :ref:`EditorImportPlugin` plugin **)** + +Remove the import plugin, don't forget to call this on exit. + .. _class_EditorPlugin_set_state: - void **set_state** **(** :ref:`Dictionary` state **)** virtual +Restore the state saved by :ref:`EditorPlugin.get_state`. + diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index 174802734..98c6e113e 100644 --- a/classes/class_editorscenepostimport.rst +++ b/classes/class_editorscenepostimport.rst @@ -13,7 +13,7 @@ EditorScenePostImport Brief Description ----------------- - +Base script for post-processing scenes being imported. Member Functions ---------------- @@ -22,6 +22,11 @@ Member Functions | void | :ref:`post_import` **(** :ref:`Object` scene **)** virtual | +-------+---------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +These scripts can modify scenes after being imported by the 3D Scene import option of the Import menu. + Member Function Description --------------------------- @@ -29,4 +34,8 @@ Member Function Description - void **post_import** **(** :ref:`Object` scene **)** virtual +This function is called upon import with the imported scene. + +Just do any changes desired to the scene and return it. If null is returned, import will fail and throw an error to the user. + diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 2ed092d87..8b3d83792 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -13,7 +13,7 @@ EditorScript Brief Description ----------------- - +Simple script to perform changes in the currently edited scene. Member Functions ---------------- @@ -26,6 +26,11 @@ Member Functions | :ref:`Object` | :ref:`get_scene` **(** **)** | +------------------------------+-------------------------------------------------------------------------------------------------------+ +Description +----------- + +This script can be run from the Scene -> Run Script menu option. + Member Function Description --------------------------- diff --git a/classes/class_editorselection.rst b/classes/class_editorselection.rst new file mode 100644 index 000000000..ea177c393 --- /dev/null +++ b/classes/class_editorselection.rst @@ -0,0 +1,68 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_EditorSelection: + +EditorSelection +=============== + +**Inherits:** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +Manages the SceneTree selection in the editor. + +Member Functions +---------------- + ++----------------------------+--------------------------------------------------------------------------------------------------+ +| void | :ref:`add_node` **(** :ref:`Node` node **)** | ++----------------------------+--------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_selected_nodes` **(** **)** | ++----------------------------+--------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_node` **(** :ref:`Node` node **)** | ++----------------------------+--------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **selection_changed** **(** **)** + +Description +----------- + +This object manages the SceneTree selection in the editor. + +Member Function Description +--------------------------- + +.. _class_EditorSelection_add_node: + +- void **add_node** **(** :ref:`Node` node **)** + +Add a node to the selection. + +.. _class_EditorSelection_clear: + +- void **clear** **(** **)** + +Clear the selection. + +.. _class_EditorSelection_get_selected_nodes: + +- :ref:`Array` **get_selected_nodes** **(** **)** + +Get the list of selectes nodes. + +.. _class_EditorSelection_remove_node: + +- void **remove_node** **(** :ref:`Node` node **)** + +Remove a node from the selection. + + diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst new file mode 100644 index 000000000..8ac6aeaa8 --- /dev/null +++ b/classes/class_editorsettings.rst @@ -0,0 +1,104 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_EditorSettings: + +EditorSettings +============== + +**Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +Object that holds the project-independent editor settings. + +Member Functions +---------------- + ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase` **(** :ref:`String` property **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_favorite_dirs` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_project_settings_path` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_recent_dirs` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_settings_path` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_favorite_dirs` **(** :ref:`StringArray` dirs **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_recent_dirs` **(** :ref:`StringArray` dirs **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **settings_changed** **(** **)** + +Description +----------- + +Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu. + +Accessing the settings is done by using the regular :ref:`Object` API, such as: + +:: + + settings.set(prop,value) + settings.get(prop) + list_of_settings = settings.get_property_list() + +Member Function Description +--------------------------- + +.. _class_EditorSettings_erase: + +- void **erase** **(** :ref:`String` property **)** + +Erase a given setting (pass full property path). + +.. _class_EditorSettings_get_favorite_dirs: + +- :ref:`StringArray` **get_favorite_dirs** **(** **)** const + +Get the list of favorite directories for this project. + +.. _class_EditorSettings_get_project_settings_path: + +- :ref:`String` **get_project_settings_path** **(** **)** const + +Get the specific project settings path. Projects all have an unique sub-directory inside the settings path where project specific settings are saved. + +.. _class_EditorSettings_get_recent_dirs: + +- :ref:`StringArray` **get_recent_dirs** **(** **)** const + +Get the list of recently visited folders in the file dialog for this project. + +.. _class_EditorSettings_get_settings_path: + +- :ref:`String` **get_settings_path** **(** **)** const + +Get the global settings path for the engine. Inside this path you can find some standard paths such as: + +settings/tmp - used for temporary storage of files + +settings/templates - where export templates are located + +.. _class_EditorSettings_set_favorite_dirs: + +- void **set_favorite_dirs** **(** :ref:`StringArray` dirs **)** + +Set the list of favorite directories for this project. + +.. _class_EditorSettings_set_recent_dirs: + +- void **set_recent_dirs** **(** :ref:`StringArray` dirs **)** + +Set the list of recently visited folders in the file dialog for this project. + + diff --git a/classes/class_editorspatialgizmo.rst b/classes/class_editorspatialgizmo.rst new file mode 100644 index 000000000..1ddaff972 --- /dev/null +++ b/classes/class_editorspatialgizmo.rst @@ -0,0 +1,139 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_EditorSpatialGizmo: + +EditorSpatialGizmo +================== + +**Inherits:** :ref:`SpatialGizmo` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +Custom gizmo for editing Spatial objects. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_collision_segments` **(** :ref:`Vector3Array` segments **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_collision_triangles` **(** TriangleMesh triangles **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_handles` **(** :ref:`Vector3Array` handles, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_lines` **(** :ref:`Vector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_mesh` **(** :ref:`Mesh` mesh, :ref:`bool` billboard=false, :ref:`RID` skeleton=RID() **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_unscaled_billboard` **(** :ref:`Material` material, :ref:`float` default_scale=1 **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`commit_handle` **(** :ref:`int` index, :ref:`Variant` restore, :ref:`bool` cancel **)** virtual | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_handle_name` **(** :ref:`int` index **)** virtual | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_handle_value` **(** :ref:`int` index **)** virtual | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`redraw` **(** **)** virtual | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_handle` **(** :ref:`int` index, :ref:`Camera` camera, :ref:`Vector2` point **)** virtual | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_spatial_node` **(** :ref:`Spatial` node **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. These are created by :ref:`EditorPlugin.create_spatial_gizmo`. + +Member Function Description +--------------------------- + +.. _class_EditorSpatialGizmo_add_collision_segments: + +- void **add_collision_segments** **(** :ref:`Vector3Array` segments **)** + +.. _class_EditorSpatialGizmo_add_collision_triangles: + +- void **add_collision_triangles** **(** TriangleMesh triangles **)** + +Add collision triangles to the gizmo for picking. A :ref:`TriangleMesh` can be generated from a regular :ref:`Mesh` too. Call this function during :ref:`redraw`. + +.. _class_EditorSpatialGizmo_add_handles: + +- void **add_handles** **(** :ref:`Vector3Array` handles, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** + +Add a list of handles (points) which can be used to deform the object being edited. + +There are virtual functions which will be called upon editing of these handles. Call this function during :ref:`redraw`. + +.. _class_EditorSpatialGizmo_add_lines: + +- void **add_lines** **(** :ref:`Vector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false **)** + +Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during :ref:`redraw`. + +.. _class_EditorSpatialGizmo_add_mesh: + +- void **add_mesh** **(** :ref:`Mesh` mesh, :ref:`bool` billboard=false, :ref:`RID` skeleton=RID() **)** + +Add a mesh to the gizmo, this is used for visualization. Call this function during :ref:`redraw`. + +.. _class_EditorSpatialGizmo_add_unscaled_billboard: + +- void **add_unscaled_billboard** **(** :ref:`Material` material, :ref:`float` default_scale=1 **)** + +Add an unscaled billboard for visualization. Call this function during :ref:`redraw`. + +.. _class_EditorSpatialGizmo_clear: + +- void **clear** **(** **)** + +.. _class_EditorSpatialGizmo_commit_handle: + +- void **commit_handle** **(** :ref:`int` index, :ref:`Variant` restore, :ref:`bool` cancel **)** virtual + +Commit a handle being edited (handles must have been prevously added by :ref:`add_handles`). + +If the cancel parameter is true, an option to restore the edited value to the original is provided. + +.. _class_EditorSpatialGizmo_get_handle_name: + +- :ref:`String` **get_handle_name** **(** :ref:`int` index **)** virtual + +Get the name of an edited handle (handles must have been previously added by :ref:`add_handles`). + +Handles can be named for reference to the user when editing. + +.. _class_EditorSpatialGizmo_get_handle_value: + +- :ref:`Variant` **get_handle_value** **(** :ref:`int` index **)** virtual + +Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling :ref:`commit_handle` + +.. _class_EditorSpatialGizmo_redraw: + +- void **redraw** **(** **)** virtual + +This function is called when the Spatial this gizmo refers to changes (the :ref:`Spatial.update_gizmo` is called). + +.. _class_EditorSpatialGizmo_set_handle: + +- void **set_handle** **(** :ref:`int` index, :ref:`Camera` camera, :ref:`Vector2` point **)** virtual + +This function is used when the user drags a gizmo handle (previously added with :ref:`add_handles`) in screen coordinates. + +The :ref:`Camera` is also provided so screen coordinates can be converted to raycasts. + +.. _class_EditorSpatialGizmo_set_spatial_node: + +- void **set_spatial_node** **(** :ref:`Spatial` node **)** + +Call this function once and upon creation of the gizmo, otherwise no other function will work. The argument is the node being edited by the gizmo. + + diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 9de0b7da2..cee755732 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -18,23 +18,23 @@ Brief Description Member Functions ---------------- -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fx_get_param` **(** :ref:`int` param **)** const | -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`fx_set_param` **(** :ref:`int` param, var value **)** | -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_background` **(** **)** const | -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get_background_param` **(** :ref:`int` param **)** const | -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_fx_enabled` **(** :ref:`int` effect **)** const | -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_background` **(** :ref:`int` bgmode **)** | -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_background_param` **(** :ref:`int` param, var value **)** | -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_enable_fx` **(** :ref:`int` effect, :ref:`bool` enabled **)** | -+--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fx_get_param` **(** :ref:`int` param **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fx_set_param` **(** :ref:`int` param, :ref:`Variant` value **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_background` **(** **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_background_param` **(** :ref:`int` param **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_fx_enabled` **(** :ref:`int` effect **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_background` **(** :ref:`int` bgmode **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_background_param` **(** :ref:`int` param, :ref:`Variant` value **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_fx` **(** :ref:`int` effect, :ref:`bool` enabled **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -107,7 +107,7 @@ Member Function Description .. _class_Environment_fx_set_param: -- void **fx_set_param** **(** :ref:`int` param, var value **)** +- void **fx_set_param** **(** :ref:`int` param, :ref:`Variant` value **)** .. _class_Environment_get_background: @@ -127,7 +127,7 @@ Member Function Description .. _class_Environment_set_background_param: -- void **set_background_param** **(** :ref:`int` param, var value **)** +- void **set_background_param** **(** :ref:`int` param, :ref:`Variant` value **)** .. _class_Environment_set_enable_fx: diff --git a/classes/class_file.rst b/classes/class_file.rst index f084bd05b..1dcc1bc90 100644 --- a/classes/class_file.rst +++ b/classes/class_file.rst @@ -51,12 +51,16 @@ Member Functions +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_line` **(** **)** const | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_md5` **(** :ref:`String` path **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_pascal_string` **(** **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_pos` **(** **)** const | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_real` **(** **)** const | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_sha256` **(** :ref:`String` path **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`get_var` **(** **)** const | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_open` **(** **)** const | @@ -95,7 +99,7 @@ Member Functions +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`store_string` **(** :ref:`String` string **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`store_var` **(** var value **)** | +| void | :ref:`store_var` **(** :ref:`Variant` value **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants @@ -111,12 +115,8 @@ Description File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example. - - Here's a sample on how to write and read from a file: - - :: func save(content): @@ -231,6 +231,12 @@ Return the size of the file in bytes. Get the next line of the file as a :ref:`String`. +.. _class_File_get_md5: + +- :ref:`String` **get_md5** **(** :ref:`String` path **)** const + +Return a md5 String representing the file at the given path or an empty :ref:`String` on failure. + .. _class_File_get_pascal_string: - :ref:`String` **get_pascal_string** **(** **)** @@ -249,6 +255,12 @@ Return the file cursor position. Get the next bits from the file as a floating point number. +.. _class_File_get_sha256: + +- :ref:`String` **get_sha256** **(** :ref:`String` path **)** const + +Return a sha256 String representing the file at the given path or an empty :ref:`String` on failure. + .. _class_File_get_var: - void **get_var** **(** **)** const @@ -297,9 +309,7 @@ Change the file reading/writing cursor to the specified position (in bytes from Set whether to swap the endianess of the file. Enable this if you're dealing with files written in big endian machines. - - - Note that this is about the file format, not CPU type. This is always reseted to ``false`` whenever you open the file. +Note that this is about the file format, not CPU type. This is always reseted to ``false`` whenever you open the file. .. _class_File_store_16: @@ -369,7 +379,7 @@ Store the given :ref:`String` in the file. .. _class_File_store_var: -- void **store_var** **(** var value **)** +- void **store_var** **(** :ref:`Variant` value **)** Store any Variant value in the file. diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index df90737a4..ad330bbfd 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -31,6 +31,8 @@ Member Functions +--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_current_path` **(** **)** const | +--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_filters` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_mode` **(** **)** const | +--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | @@ -47,6 +49,8 @@ Member Functions +--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_current_path` **(** :ref:`String` path **)** | +--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_filters` **(** :ref:`StringArray` filters **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_mode` **(** :ref:`int` mode **)** | +--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_show_hidden_files` **(** :ref:`bool` show **)** | @@ -65,7 +69,8 @@ Numeric Constants - **MODE_OPEN_FILE** = **0** --- The dialog allows the selection of one, and only one file. - **MODE_OPEN_FILES** = **1** --- The dialog allows the selection of multiple files. - **MODE_OPEN_DIR** = **2** --- The dialog functions as a folder selector, disallowing the selection of any file. -- **MODE_SAVE_FILE** = **3** --- The dialog will warn when a file exists. +- **MODE_OPEN_ANY** = **3** --- The dialog allows the selection of a file or a directory. +- **MODE_SAVE_FILE** = **4** --- The dialog will warn when a file exists. - **ACCESS_RESOURCES** = **0** --- The dialog allows the selection of file and directory. - **ACCESS_USERDATA** = **1** --- The dialog allows ascess files under :ref:`Resource` path(res://) . - **ACCESS_FILESYSTEM** = **2** --- The dialog allows ascess files in whole file system. @@ -114,6 +119,10 @@ Get the current selected file of the file dialog (empty if none). Get the current selected path (directory and file) of the file dialog (empty if none). +.. _class_FileDialog_get_filters: + +- :ref:`StringArray` **get_filters** **(** **)** const + .. _class_FileDialog_get_mode: - :ref:`int` **get_mode** **(** **)** const @@ -162,6 +171,10 @@ Set the current selected file name of the file dialog. Set the current selected file path of the file dialog. +.. _class_FileDialog_set_filters: + +- void **set_filters** **(** :ref:`StringArray` filters **)** + .. _class_FileDialog_set_mode: - void **set_mode** **(** :ref:`int` mode **)** diff --git a/classes/class_fixedmaterial.rst b/classes/class_fixedmaterial.rst index 7183ef69d..7a487d6da 100644 --- a/classes/class_fixedmaterial.rst +++ b/classes/class_fixedmaterial.rst @@ -18,35 +18,35 @@ Simple Material with a fixed parameter set. Member Functions ---------------- -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_fixed_flag` **(** :ref:`int` flag **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_light_shader` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get_parameter` **(** :ref:`int` param **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_point_size` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_texcoord_mode` **(** :ref:`int` param **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`get_texture` **(** :ref:`int` param **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform` | :ref:`get_uv_transform` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fixed_flag` **(** :ref:`int` flag, :ref:`bool` value **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_light_shader` **(** :ref:`int` shader **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_parameter` **(** :ref:`int` param, var value **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_size` **(** :ref:`float` size **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texcoord_mode` **(** :ref:`int` param, :ref:`int` mode **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture` **(** :ref:`int` param, :ref:`Texture` texture **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_uv_transform` **(** :ref:`Transform` transform **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_fixed_flag` **(** :ref:`int` flag **)** const | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_light_shader` **(** **)** const | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_parameter` **(** :ref:`int` param **)** const | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_size` **(** **)** const | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_texcoord_mode` **(** :ref:`int` param **)** const | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_texture` **(** :ref:`int` param **)** const | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_uv_transform` **(** **)** const | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fixed_flag` **(** :ref:`int` flag, :ref:`bool` value **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_light_shader` **(** :ref:`int` shader **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_parameter` **(** :ref:`int` param, :ref:`Variant` value **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_size` **(** :ref:`float` size **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texcoord_mode` **(** :ref:`int` param, :ref:`int` mode **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`int` param, :ref:`Texture` texture **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_uv_transform` **(** :ref:`Transform` transform **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -127,7 +127,7 @@ Returns the special transform used to post-transform UV coordinates of the uv_xf .. _class_FixedMaterial_set_parameter: -- void **set_parameter** **(** :ref:`int` param, var value **)** +- void **set_parameter** **(** :ref:`int` param, :ref:`Variant` value **)** Set a parameter, parameters are defined in the PARAM\_\* enum. The type of each parameter may change, so it's best to check the enum. diff --git a/classes/class_font.rst b/classes/class_font.rst index 1d782a27b..c4127dd40 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -8,6 +8,8 @@ Font **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` +**Inherited By:** :ref:`DynamicFont`, :ref:`BitmapFont` + **Category:** Core Brief Description @@ -18,16 +20,6 @@ Internationalized font and text drawing support. Member Functions ---------------- -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_char` **(** :ref:`int` character, :ref:`int` texture, :ref:`Rect2` rect, :ref:`Vector2` align=Vector2(0,0), :ref:`float` advance=-1 **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_kerning_pair` **(** :ref:`int` char_a, :ref:`int` char_b, :ref:`int` kerning **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_texture` **(** :ref:`Texture` texture **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_from_fnt` **(** :ref:`String` path **)** | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` string, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** const | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -35,31 +27,15 @@ Member Functions +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_ascent` **(** **)** const | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` next=0 **)** const | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_descent` **(** **)** const | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_fallback` **(** **)** const | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_height` **(** **)** const | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_kerning_pair` **(** :ref:`int` char_a, :ref:`int` char_b **)** const | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` string **)** const | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`get_texture` **(** :ref:`int` idx **)** const | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_texture_count` **(** **)** const | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_distance_field_hint` **(** **)** const | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ascent` **(** :ref:`float` px **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_distance_field_hint` **(** :ref:`bool` enable **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fallback` **(** :ref:`Object` fallback **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_height` **(** :ref:`float` px **)** | +| void | :ref:`update_changes` **(** **)** | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description @@ -70,34 +46,6 @@ Font contains an unicode compatible character set, as well as the ability to dra Member Function Description --------------------------- -.. _class_Font_add_char: - -- void **add_char** **(** :ref:`int` character, :ref:`int` texture, :ref:`Rect2` rect, :ref:`Vector2` align=Vector2(0,0), :ref:`float` advance=-1 **)** - -Add a character to the font, where "character" is the unicode value, "texture" is the texture index, "rect" is the region in the texture (in pixels!), "align" is the (optional) alignment for the character and "advance" is the (optional) advance. - -.. _class_Font_add_kerning_pair: - -- void **add_kerning_pair** **(** :ref:`int` char_a, :ref:`int` char_b, :ref:`int` kerning **)** - -Add a kerning pair to the :ref:`Font` as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. - -.. _class_Font_add_texture: - -- void **add_texture** **(** :ref:`Texture` texture **)** - -Add a texture to the :ref:`Font`. - -.. _class_Font_clear: - -- void **clear** **(** **)** - -Clear all the font data. - -.. _class_Font_create_from_fnt: - -- :ref:`int` **create_from_fnt** **(** :ref:`String` path **)** - .. _class_Font_draw: - void **draw** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` string, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** const @@ -116,70 +64,32 @@ Draw character "char" into a canvas item using the font at a given "pos" positio Return the font ascent (number of pixels above the baseline). -.. _class_Font_get_char_size: - -- :ref:`Vector2` **get_char_size** **(** :ref:`int` char, :ref:`int` next=0 **)** const - -Return the size of a character, optionally taking kerning into account if the next character is provided. - .. _class_Font_get_descent: - :ref:`float` **get_descent** **(** **)** const Return the font descent (number of pixels below the baseline). -.. _class_Font_get_fallback: - -- :ref:`Object` **get_fallback** **(** **)** const - .. _class_Font_get_height: - :ref:`float` **get_height** **(** **)** const Return the total font height (ascent plus descent) in pixels. -.. _class_Font_get_kerning_pair: - -- :ref:`int` **get_kerning_pair** **(** :ref:`int` char_a, :ref:`int` char_b **)** const - -Return a kerning pair as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. - .. _class_Font_get_string_size: - :ref:`Vector2` **get_string_size** **(** :ref:`String` string **)** const Return the size of a string, taking kerning and advance into account. -.. _class_Font_get_texture: - -- :ref:`Texture` **get_texture** **(** :ref:`int` idx **)** const - -.. _class_Font_get_texture_count: - -- :ref:`int` **get_texture_count** **(** **)** const - .. _class_Font_is_distance_field_hint: - :ref:`bool` **is_distance_field_hint** **(** **)** const -.. _class_Font_set_ascent: +.. _class_Font_update_changes: -- void **set_ascent** **(** :ref:`float` px **)** +- void **update_changes** **(** **)** -Set the font ascent (number of pixels above the baseline). - -.. _class_Font_set_distance_field_hint: - -- void **set_distance_field_hint** **(** :ref:`bool` enable **)** - -.. _class_Font_set_fallback: - -- void **set_fallback** **(** :ref:`Object` fallback **)** - -.. _class_Font_set_height: - -- void **set_height** **(** :ref:`float` px **)** - -Set the total font height (ascent plus descent) in pixels. +After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it. diff --git a/classes/class_funcref.rst b/classes/class_funcref.rst index a55d15929..e6ac3303f 100644 --- a/classes/class_funcref.rst +++ b/classes/class_funcref.rst @@ -13,32 +13,45 @@ FuncRef Brief Description ----------------- - +Reference to a function in an object. Member Functions ---------------- -+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_func` **(** var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** | -+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_function` **(** :ref:`String` name **)** | -+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance` **(** :ref:`Object` instance **)** | -+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call_func` **(** :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL, :ref:`Variant` arg5=NULL, :ref:`Variant` arg6=NULL, :ref:`Variant` arg7=NULL, :ref:`Variant` arg8=NULL, :ref:`Variant` arg9=NULL **)** | ++-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_function` **(** :ref:`String` name **)** | ++-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance` **(** :ref:`Object` instance **)** | ++-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +In GDScript, functions are not *first-class objects*. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments. + +However, by creating a :ref:`FuncRef` using the :ref:`@GDScript.funcref` function, a reference to a function in a given object can be created, passed around and called. Member Function Description --------------------------- .. _class_FuncRef_call_func: -- void **call_func** **(** var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** +- void **call_func** **(** :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL, :ref:`Variant` arg5=NULL, :ref:`Variant` arg6=NULL, :ref:`Variant` arg7=NULL, :ref:`Variant` arg8=NULL, :ref:`Variant` arg9=NULL **)** + +Call the referenced function with the given arguments. The argument count must correspond to the required number of arguments in the function. Returns the return value of the function call. .. _class_FuncRef_set_function: - void **set_function** **(** :ref:`String` name **)** +Set the name of the function to call on the object, without parentheses or any parameters. + .. _class_FuncRef_set_instance: - void **set_instance** **(** :ref:`Object` instance **)** +Set the object on which to call the referenced function. This object must be of a type actually inheriting from :ref:`Object`, not a built-in type such as :ref:`int`, :ref:`Vector2` or :ref:`Dictionary`. + diff --git a/classes/class_gdfunctionstate.rst b/classes/class_gdfunctionstate.rst index b9e7c7554..6eee7fb0e 100644 --- a/classes/class_gdfunctionstate.rst +++ b/classes/class_gdfunctionstate.rst @@ -13,16 +13,21 @@ GDFunctionState Brief Description ----------------- - +State of a function call after yielding. Member Functions ---------------- -+--------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid` **(** **)** const | -+--------------------------+------------------------------------------------------------------------+ -| Variant | :ref:`resume` **(** var arg=NULL **)** | -+--------------------------+------------------------------------------------------------------------+ ++--------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`resume` **(** :ref:`Variant` arg=NULL **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------+ + +Description +----------- + +Calling :ref:`@GDScript.yield` within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling :ref:`resume` on this state object. Member Function Description --------------------------- @@ -31,10 +36,16 @@ Member Function Description - :ref:`bool` **is_valid** **(** **)** const -Should put children to the top left corner instead of center of the container. +Check whether the function call may be resumed. This is not the case if the function state was already resumed. .. _class_GDFunctionState_resume: -- Variant **resume** **(** var arg=NULL **)** +- :ref:`Variant` **resume** **(** :ref:`Variant` arg=NULL **)** + +Resume execution of the yielded function call. + +If handed an argument, return the argument from the :ref:`@GDScript.yield` call in the yielded function call. You can pass e.g. an :ref:`Array` to hand multiple arguments. + +This function returns what the resumed function call returns, possibly another function state if yielded again. diff --git a/classes/class_geometryinstance.rst b/classes/class_geometryinstance.rst index 52e577f14..cb623d230 100644 --- a/classes/class_geometryinstance.rst +++ b/classes/class_geometryinstance.rst @@ -20,31 +20,35 @@ Base node for geometry based visual instances. Member Functions ---------------- -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_baked_light_texture_id` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_draw_range_begin` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_draw_range_end` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_extra_cull_margin` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_flag` **(** :ref:`int` flag **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_material_override` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_baked_light_texture_id` **(** :ref:`int` id **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_draw_range_begin` **(** :ref:`float` mode **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_draw_range_end` **(** :ref:`float` mode **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_extra_cull_margin` **(** :ref:`float` margin **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_flag` **(** :ref:`int` flag, :ref:`bool` value **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_material_override` **(** :ref:`Object` material **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_baked_light_texture_id` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cast_shadows_setting` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_draw_range_begin` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_draw_range_end` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_extra_cull_margin` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_flag` **(** :ref:`int` flag **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_material_override` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_baked_light_texture_id` **(** :ref:`int` id **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cast_shadows_setting` **(** :ref:`int` shadow_casting_setting **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_range_begin` **(** :ref:`float` mode **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_range_end` **(** :ref:`float` mode **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_extra_cull_margin` **(** :ref:`float` margin **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flag` **(** :ref:`int` flag, :ref:`bool` value **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_material_override` **(** :ref:`Object` material **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -57,6 +61,10 @@ Numeric Constants - **FLAG_DEPH_SCALE** = **5** - **FLAG_VISIBLE_IN_ALL_ROOMS** = **6** - **FLAG_MAX** = **8** +- **SHADOW_CASTING_SETTING_OFF** = **0** +- **SHADOW_CASTING_SETTING_ON** = **1** +- **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = **2** +- **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = **3** Description ----------- @@ -70,6 +78,10 @@ Member Function Description - :ref:`int` **get_baked_light_texture_id** **(** **)** const +.. _class_GeometryInstance_get_cast_shadows_setting: + +- :ref:`int` **get_cast_shadows_setting** **(** **)** const + .. _class_GeometryInstance_get_draw_range_begin: - :ref:`float` **get_draw_range_begin** **(** **)** const @@ -96,6 +108,10 @@ Return the material override for the whole geometry. - void **set_baked_light_texture_id** **(** :ref:`int` id **)** +.. _class_GeometryInstance_set_cast_shadows_setting: + +- void **set_cast_shadows_setting** **(** :ref:`int` shadow_casting_setting **)** + .. _class_GeometryInstance_set_draw_range_begin: - void **set_draw_range_begin** **(** :ref:`float` mode **)** diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index 8b46ae7ed..7b427557d 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -18,45 +18,49 @@ Hyper-text transfer protocol client. Member Functions ---------------- -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close` **(** **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Error | :ref:`connect` **(** :ref:`String` host, :ref:`int` port, :ref:`bool` use_ssl=false, :ref:`bool` verify_host=true **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_response_body_length` **(** **)** const | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_response_code` **(** **)** const | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringArray` | :ref:`get_response_headers` **(** **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_response_headers_as_dictionary` **(** **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_status` **(** **)** const | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_response` **(** **)** const | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_blocking_mode_enabled` **(** **)** const | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_response_chunked` **(** **)** const | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Error | :ref:`poll` **(** **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`query_string_from_dict` **(** :ref:`Dictionary` fields **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RawArray` | :ref:`read_response_body_chunk` **(** **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`request` **(** :ref:`int` method, :ref:`String` url, :ref:`StringArray` headers, :ref:`String` body="" **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`send_body_data` **(** :ref:`RawArray` body **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`send_body_text` **(** :ref:`String` body **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_blocking_mode` **(** :ref:`bool` enabled **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_connection` **(** :ref:`StreamPeer` connection **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_read_chunk_size` **(** :ref:`int` bytes **)** | -+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`close` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`connect` **(** :ref:`String` host, :ref:`int` port, :ref:`bool` use_ssl=false, :ref:`bool` verify_host=true **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StreamPeer` | :ref:`get_connection` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_response_body_length` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_response_code` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_response_headers` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_response_headers_as_dictionary` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_status` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_response` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_blocking_mode_enabled` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_response_chunked` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`poll` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`query_string_from_dict` **(** :ref:`Dictionary` fields **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`read_response_body_chunk` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`request` **(** :ref:`int` method, :ref:`String` url, :ref:`StringArray` headers, :ref:`String` body="" **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`request_raw` **(** :ref:`int` method, :ref:`String` url, :ref:`StringArray` headers, :ref:`RawArray` body **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`send_body_data` **(** :ref:`RawArray` body **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`send_body_text` **(** :ref:`String` body **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_blocking_mode` **(** :ref:`bool` enabled **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_connection` **(** :ref:`StreamPeer` connection **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_read_chunk_size` **(** :ref:`int` bytes **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -133,7 +137,7 @@ Numeric Constants Description ----------- -Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification. +Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification. Can be reused to connect to different hosts and make many requests. @@ -156,6 +160,12 @@ The host should not have http:// prepended but will strip the protocol identifie verify_host will check the SSL identity of the host if set to true. +.. _class_HTTPClient_get_connection: + +- :ref:`StreamPeer` **get_connection** **(** **)** const + +Return current connection. + .. _class_HTTPClient_get_response_body_length: - :ref:`int` **get_response_body_length** **(** **)** const @@ -249,6 +259,16 @@ To create a POST request with query strings to push to the server, do: var headers = :ref:`"Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())` var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString) +.. _class_HTTPClient_request_raw: + +- :ref:`int` **request_raw** **(** :ref:`int` method, :ref:`String` url, :ref:`StringArray` headers, :ref:`RawArray` body **)** + +Sends a raw request to the connected host. The url is what is normally behind the hostname, i.e. in ``http://somehost.com/index.php``, url would be "index.php". + +Headers are HTTP request headers. + +Sends body raw, as a byte array, does not encode it in any way. + .. _class_HTTPClient_send_body_data: - :ref:`int` **send_body_data** **(** :ref:`RawArray` body **)** diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst new file mode 100644 index 000000000..c9e41c8a0 --- /dev/null +++ b/classes/class_httprequest.rst @@ -0,0 +1,162 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_HTTPRequest: + +HTTPRequest +=========== + +**Inherits:** :ref:`Node` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +A Node with the ability to send HTTP requests. + +Member Functions +---------------- + ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cancel_request` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_body_size` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_body_size_limit` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_download_file` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_downloaded_bytes` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_http_client_status` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_redirects` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_threads` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`request` **(** :ref:`String` url, :ref:`StringArray` custom_headers=StringArray([]), :ref:`bool` ssl_validate_domain=true **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_body_size_limit` **(** :ref:`int` bytes **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_download_file` **(** :ref:`String` path **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_redirects` **(** :ref:`int` amount **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_threads` **(** :ref:`bool` enable **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **request_completed** **(** :ref:`int` result, :ref:`int` response_code, :ref:`StringArray` headers, :ref:`RawArray` body **)** + +Numeric Constants +----------------- + +- **RESULT_SUCCESS** = **0** --- Request successful. +- **RESULT_CHUNKED_BODY_SIZE_MISMATCH** = **1** +- **RESULT_CANT_CONNECT** = **2** --- Request failed while connecting. +- **RESULT_CANT_RESOLVE** = **3** --- Request failed while resolving. +- **RESULT_CONNECTION_ERROR** = **4** --- Request failed due to connection(read/write) error. +- **RESULT_SSL_HANDSHAKE_ERROR** = **5** --- Request failed on SSL handshake. +- **RESULT_NO_RESPONSE** = **6** --- Request does not have a response(yet). +- **RESULT_BODY_SIZE_LIMIT_EXCEEDED** = **7** --- Request exceded it's maximum size limit, see :ref:`set_body_size_limit`. +- **RESULT_REQUEST_FAILED** = **8** --- Request failed. (unused) +- **RESULT_DOWNLOAD_FILE_CANT_OPEN** = **9** --- HTTPRequest couldn't open the download file. +- **RESULT_DOWNLOAD_FILE_WRITE_ERROR** = **10** --- HTTPRequest couldn't write to the download file. +- **RESULT_REDIRECT_LIMIT_REACHED** = **11** --- Request reached it's maximum redirect limit, see :ref:`set_max_redirects`. + +Description +----------- + +A Node with the ability to send HTTP requests. Uses a :ref:`HTTPClient` internally, supports HTTPS. + +Can be used to make HTTP requests or download files via HTTP. + +Member Function Description +--------------------------- + +.. _class_HTTPRequest_cancel_request: + +- void **cancel_request** **(** **)** + +Cancel the current request. + +.. _class_HTTPRequest_get_body_size: + +- :ref:`int` **get_body_size** **(** **)** const + +Return the response body length. + +.. _class_HTTPRequest_get_body_size_limit: + +- :ref:`int` **get_body_size_limit** **(** **)** const + +Return current body size limit. + +.. _class_HTTPRequest_get_download_file: + +- :ref:`String` **get_download_file** **(** **)** const + +Return the file this request will download into. + +.. _class_HTTPRequest_get_downloaded_bytes: + +- :ref:`int` **get_downloaded_bytes** **(** **)** const + +Return the amount of bytes this HTTPRequest downloaded. + +.. _class_HTTPRequest_get_http_client_status: + +- :ref:`int` **get_http_client_status** **(** **)** const + +Return the current status of the underlying :ref:`HTTPClient`. + +.. _class_HTTPRequest_get_max_redirects: + +- :ref:`int` **get_max_redirects** **(** **)** const + +Return the maximum amount of redirects that will be followed. + +.. _class_HTTPRequest_is_using_threads: + +- :ref:`bool` **is_using_threads** **(** **)** const + +Whether this request is using threads. + +.. _class_HTTPRequest_request: + +- :ref:`int` **request** **(** :ref:`String` url, :ref:`StringArray` custom_headers=StringArray([]), :ref:`bool` ssl_validate_domain=true **)** + +Make a HTTP GET request. The url is the complete url including "http://" or "https://" which will be parsed for a host and a port. + +The custom_headers are HTTP request headers which will be used. If User-Agent is not specified a Godot specific will be used. + +The ssl_validate_domain specifies if in case of HTTPS the server certificate should be verified. + +.. _class_HTTPRequest_set_body_size_limit: + +- void **set_body_size_limit** **(** :ref:`int` bytes **)** + +Set the response body size limit. + +.. _class_HTTPRequest_set_download_file: + +- void **set_download_file** **(** :ref:`String` path **)** + +Set the file to download into. Outputs the response body into the file. + +.. _class_HTTPRequest_set_max_redirects: + +- void **set_max_redirects** **(** :ref:`int` amount **)** + +Set the maximum amount of redirects the request will follow. + +.. _class_HTTPRequest_set_use_threads: + +- void **set_use_threads** **(** :ref:`bool` enable **)** + +Make this HTTPRequest use threads. + + diff --git a/classes/class_immediategeometry.rst b/classes/class_immediategeometry.rst index e12bff826..518a2d182 100644 --- a/classes/class_immediategeometry.rst +++ b/classes/class_immediategeometry.rst @@ -13,7 +13,7 @@ ImmediateGeometry Brief Description ----------------- - +Node to draw simple geometry from code, ala OpenGL 1.x Member Functions ---------------- @@ -23,7 +23,7 @@ Member Functions +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_vertex` **(** :ref:`Vector3` pos **)** | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`begin` **(** :ref:`int` primitive, :ref:`Texture` texture **)** | +| void | :ref:`begin` **(** :ref:`int` primitive, :ref:`Texture` texture=Object() **)** | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -47,40 +47,62 @@ Member Function Description - void **add_sphere** **(** :ref:`int` lats, :ref:`int` lons, :ref:`float` radius **)** +Simple helper to draw an uvsphere, with given latitudes, longitude and radius. + .. _class_ImmediateGeometry_add_vertex: - void **add_vertex** **(** :ref:`Vector3` pos **)** +Add a vertex with the currently set color/uv/etc. + .. _class_ImmediateGeometry_begin: -- void **begin** **(** :ref:`int` primitive, :ref:`Texture` texture **)** +- void **begin** **(** :ref:`int` primitive, :ref:`Texture` texture=Object() **)** + +Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. + +For the type of primitive, use the :ref:`Mesh`.PRIMITIVE\_\* enumerations. .. _class_ImmediateGeometry_clear: - void **clear** **(** **)** +Clear everything that was drawn using begin/end. + .. _class_ImmediateGeometry_end: - void **end** **(** **)** +Call this when done adding a batch of geometry, otherwise it can't be displayed. + .. _class_ImmediateGeometry_set_color: - void **set_color** **(** :ref:`Color` color **)** +Set the color that the next vertex will use to be drawn. + .. _class_ImmediateGeometry_set_normal: - void **set_normal** **(** :ref:`Vector3` normal **)** +Set the normal that the next vertex will use to be drawn. + .. _class_ImmediateGeometry_set_tangent: - void **set_tangent** **(** :ref:`Plane` tangent **)** +Set the tangent (and binormal facing) that the next vertex will use to be drawn. + .. _class_ImmediateGeometry_set_uv: - void **set_uv** **(** :ref:`Vector2` uv **)** +Set the UV that the next vertex will use to be drawn. + .. _class_ImmediateGeometry_set_uv2: - void **set_uv2** **(** :ref:`Vector2` uv **)** +Set the second layer of UV that the next vertex will use to be drawn. + diff --git a/classes/class_input.rst b/classes/class_input.rst index f7d287f82..a23d67b4b 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -20,45 +20,59 @@ A Singleton that deals with inputs. Member Functions ---------------- -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_press` **(** :ref:`String` action **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`action_release` **(** :ref:`String` action **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_joy_mapping` **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_accelerometer` **(** **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_joy_axis` **(** :ref:`int` device, :ref:`int` axis **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_joy_guid` **(** :ref:`int` device **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_joy_name` **(** :ref:`int` device **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_mouse_button_mask` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_mouse_mode` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_mouse_speed` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` action **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_joy_button_pressed` **(** :ref:`int` device, :ref:`int` button **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_joy_known` **(** :ref:`int` device **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_key_pressed` **(** :ref:`int` scancode **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_mouse_button_pressed` **(** :ref:`int` button **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_joy_mapping` **(** :ref:`String` guid **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_mouse_cursor` **(** :ref:`Texture` image, :ref:`Vector2` hotspot=Vector2(0,0) **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_mouse_mode` **(** :ref:`int` mode **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`warp_mouse_pos` **(** :ref:`Vector2` to **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_press` **(** :ref:`String` action **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_release` **(** :ref:`String` action **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_joy_mapping` **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_accelerometer` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_connected_joysticks` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_gyroscope` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_joy_axis` **(** :ref:`int` device, :ref:`int` axis **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_joy_guid` **(** :ref:`int` device **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_joy_name` **(** :ref:`int` device **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_joy_vibration_duration` **(** :ref:`int` device **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_joy_vibration_strength` **(** :ref:`int` device **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_magnetometer` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mouse_button_mask` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mouse_mode` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_mouse_speed` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` action **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_joy_button_pressed` **(** :ref:`int` device, :ref:`int` button **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_joy_known` **(** :ref:`int` device **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_key_pressed` **(** :ref:`int` scancode **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_mouse_button_pressed` **(** :ref:`int` button **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_joy_mapping` **(** :ref:`String` guid **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_mouse_cursor` **(** :ref:`Texture` image, :ref:`Vector2` hotspot=Vector2((0, 0)) **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mouse_mode` **(** :ref:`int` mode **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`start_joy_vibration` **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop_joy_vibration` **(** :ref:`int` device **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`warp_mouse_pos` **(** :ref:`Vector2` to **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -104,6 +118,18 @@ Add a new mapping entry (in SDL2 format) to the mapping database. Optionally upd If the device has an accelerometer, this will return the movement. +.. _class_Input_get_connected_joysticks: + +- :ref:`Array` **get_connected_joysticks** **(** **)** + +Returns an :ref:`Array` containing the device IDs of all currently connected joysticks. + +.. _class_Input_get_gyroscope: + +- :ref:`Vector3` **get_gyroscope** **(** **)** + +If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's x, y, and z axis. + .. _class_Input_get_joy_axis: - :ref:`float` **get_joy_axis** **(** :ref:`int` device, :ref:`int` axis **)** @@ -122,6 +148,24 @@ Returns a SDL2 compatible device guid on platforms that use gamepad remapping. R Returns the name of the joystick at the specified device index +.. _class_Input_get_joy_vibration_duration: + +- :ref:`float` **get_joy_vibration_duration** **(** :ref:`int` device **)** + +Returns the duration of the current vibration effect in seconds. + +.. _class_Input_get_joy_vibration_strength: + +- :ref:`Vector2` **get_joy_vibration_strength** **(** :ref:`int` device **)** + +Returns the strength of the joystick vibration: x is the strength of the weak motor, and y is the strength of the strong motor. + +.. _class_Input_get_magnetometer: + +- :ref:`Vector3` **get_magnetometer** **(** **)** + +If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes. + .. _class_Input_get_mouse_button_mask: - :ref:`int` **get_mouse_button_mask** **(** **)** const @@ -138,7 +182,7 @@ Return the mouse mode. See the constants for more information. - :ref:`Vector2` **get_mouse_speed** **(** **)** const -Returns the mouse speed. +Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion. .. _class_Input_is_action_pressed: @@ -178,7 +222,7 @@ Removes all mappings from the internal db that match the given uid. .. _class_Input_set_custom_mouse_cursor: -- void **set_custom_mouse_cursor** **(** :ref:`Texture` image, :ref:`Vector2` hotspot=Vector2(0,0) **)** +- 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. @@ -188,6 +232,18 @@ Set a custom mouse cursor image, which is only visible inside the game window. T Set the mouse mode. See the constants for more information. +.. _class_Input_start_joy_vibration: + +- void **start_joy_vibration** **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** + +Starts to vibrate the joystick. Joysticks usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will play the vibration indefinitely). + +.. _class_Input_stop_joy_vibration: + +- void **stop_joy_vibration** **(** :ref:`int` device **)** + +Stops the vibration of the joystick. + .. _class_Input_warp_mouse_pos: - void **warp_mouse_pos** **(** :ref:`Vector2` to **)** diff --git a/classes/class_instanceplaceholder.rst b/classes/class_instanceplaceholder.rst index 6b4cf91c9..a9c8be230 100644 --- a/classes/class_instanceplaceholder.rst +++ b/classes/class_instanceplaceholder.rst @@ -13,7 +13,7 @@ InstancePlaceholder Brief Description ----------------- - +Placeholder for the root :ref:`Node` of a :ref:`PackedScene`. Member Functions ---------------- @@ -24,6 +24,13 @@ Member Functions | void | :ref:`replace_by_instance` **(** :ref:`PackedScene` custom_scene=NULL **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +Turning on the option **Load As Placeholder** for an instanced scene in the editor causes it to be replaced by an InstacePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling :ref:`replace_by_instance`. This is useful to avoid loading large scenes all at once by loading parts of it selectively. + +The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. + Member Function Description --------------------------- @@ -31,8 +38,12 @@ Member Function Description - :ref:`String` **get_instance_path** **(** **)** const +Retrieve the path to the :ref:`PackedScene` resource file that is loaded by default when calling :ref:`replace_by_instance`. + .. _class_InstancePlaceholder_replace_by_instance: - void **replace_by_instance** **(** :ref:`PackedScene` custom_scene=NULL **)** +Replace this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided. + diff --git a/classes/class_intarray.rst b/classes/class_intarray.rst index 46743f435..79041598d 100644 --- a/classes/class_intarray.rst +++ b/classes/class_intarray.rst @@ -16,17 +16,27 @@ Integer Array. Member Functions ---------------- -+----------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`IntArray` | :ref:`IntArray` **(** :ref:`Array` from **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_back` **(** :ref:`int` integer **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` idx **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` idx, :ref:`int` integer **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------+ ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`IntArray` **(** :ref:`Array` from **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append` **(** :ref:`int` integer **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_array` **(** :ref:`IntArray` array **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`int` integer **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invert` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`int` integer **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove` **(** :ref:`int` idx **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`int` integer **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -42,12 +52,42 @@ Member Function Description Create from a generic array. +.. _class_IntArray_append: + +- void **append** **(** :ref:`int` integer **)** + +Append an element at the end of the array (alias of :ref:`push_back`). + +.. _class_IntArray_append_array: + +- void **append_array** **(** :ref:`IntArray` array **)** + +Append an :ref:`IntArray` at the end of this array. + +.. _class_IntArray_insert: + +- :ref:`int` **insert** **(** :ref:`int` idx, :ref:`int` integer **)** + +Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + +.. _class_IntArray_invert: + +- void **invert** **(** **)** + +Reverse the order of the elements in the array (so first element will now be the last). + .. _class_IntArray_push_back: - void **push_back** **(** :ref:`int` integer **)** Append a value to the array. +.. _class_IntArray_remove: + +- void **remove** **(** :ref:`int` idx **)** + +Remove an element from the array by index. + .. _class_IntArray_resize: - void **resize** **(** :ref:`int` idx **)** diff --git a/classes/class_inversekinematics.rst b/classes/class_inversekinematics.rst new file mode 100644 index 000000000..20e461b06 --- /dev/null +++ b/classes/class_inversekinematics.rst @@ -0,0 +1,86 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_InverseKinematics: + +InverseKinematics +================= + +**Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_bone_name` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_chain_size` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_iterations` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_precision` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_speed` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bone_name` **(** :ref:`String` ik_bone **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_chain_size` **(** :ref:`int` chain_size **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_iterations` **(** :ref:`int` iterations **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_precision` **(** :ref:`float` precision **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_speed` **(** :ref:`float` speed **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_InverseKinematics_get_bone_name: + +- :ref:`String` **get_bone_name** **(** **)** const + +.. _class_InverseKinematics_get_chain_size: + +- :ref:`int` **get_chain_size** **(** **)** const + +.. _class_InverseKinematics_get_iterations: + +- :ref:`int` **get_iterations** **(** **)** const + +.. _class_InverseKinematics_get_precision: + +- :ref:`float` **get_precision** **(** **)** const + +.. _class_InverseKinematics_get_speed: + +- :ref:`float` **get_speed** **(** **)** const + +.. _class_InverseKinematics_set_bone_name: + +- void **set_bone_name** **(** :ref:`String` ik_bone **)** + +.. _class_InverseKinematics_set_chain_size: + +- void **set_chain_size** **(** :ref:`int` chain_size **)** + +.. _class_InverseKinematics_set_iterations: + +- void **set_iterations** **(** :ref:`int` iterations **)** + +.. _class_InverseKinematics_set_precision: + +- void **set_precision** **(** :ref:`float` precision **)** + +.. _class_InverseKinematics_set_speed: + +- void **set_speed** **(** :ref:`float` speed **)** + + diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 07ec9bc05..41ef7e793 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -18,84 +18,105 @@ Brief Description Member Functions ---------------- -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_item` **(** :ref:`Texture` icon, :ref:`bool` selectable=true **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_item` **(** :ref:`String` text, :ref:`Texture` icon=NULL, :ref:`bool` selectable=true **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ensure_current_is_visible` **(** **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_fixed_column_width` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_icon_mode` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_count` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_columns` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_text_lines` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_min_icon_size` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_select_mode` **(** **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_selectable` **(** :ref:`int` idx **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** const | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` idx **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` idx, :ref:`bool` single=true **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_fixed_column_width` **(** :ref:`int` width **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon_mode` **(** :ref:`int` mode **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_custom_bg_color` **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` icon **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_selectable` **(** :ref:`int` idx, :ref:`bool` selectable **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_max_columns` **(** :ref:`int` amount **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_max_text_lines` **(** :ref:`int` lines **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_min_icon_size` **(** :ref:`Vector2` size **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`sort_items_by_text` **(** **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unselect` **(** :ref:`int` idx **)** | -+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_item` **(** :ref:`Texture` icon, :ref:`bool` selectable=true **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_item` **(** :ref:`String` text, :ref:`Texture` icon=NULL, :ref:`bool` selectable=true **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`ensure_current_is_visible` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_allow_rmb_select` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_fixed_column_width` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_fixed_icon_size` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_icon_mode` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_icon_scale` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_at_pos` **(** :ref:`Vector2` pos, :ref:`bool` exact=false **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_count` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_item_icon_region` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_columns` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_text_lines` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_select_mode` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_selected_items` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_selectable` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`is_same_column_width` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` idx **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` idx, :ref:`bool` single=true **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_allow_rmb_select` **(** :ref:`bool` allow **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fixed_column_width` **(** :ref:`int` width **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fixed_icon_size` **(** :ref:`Vector2` size **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_mode` **(** :ref:`int` mode **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_scale` **(** :ref:`float` scale **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_custom_bg_color` **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` icon **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_icon_region` **(** :ref:`int` idx, :ref:`Rect2` rect **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_selectable` **(** :ref:`int` idx, :ref:`bool` selectable **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_columns` **(** :ref:`int` amount **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_text_lines` **(** :ref:`int` lines **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_same_column_width` **(** :ref:`bool` enable **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sort_items_by_text` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unselect` **(** :ref:`int` idx **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- - **item_activated** **(** :ref:`int` index **)** +- **item_rmb_selected** **(** :ref:`int` index, :ref:`Vector2` atpos **)** - **item_selected** **(** :ref:`int` index **)** - **multi_selected** **(** :ref:`int` index, :ref:`bool` selected **)** @@ -126,14 +147,30 @@ Member Function Description - void **ensure_current_is_visible** **(** **)** +.. _class_ItemList_get_allow_rmb_select: + +- :ref:`bool` **get_allow_rmb_select** **(** **)** const + .. _class_ItemList_get_fixed_column_width: - :ref:`int` **get_fixed_column_width** **(** **)** const +.. _class_ItemList_get_fixed_icon_size: + +- :ref:`Vector2` **get_fixed_icon_size** **(** **)** const + .. _class_ItemList_get_icon_mode: - :ref:`int` **get_icon_mode** **(** **)** const +.. _class_ItemList_get_icon_scale: + +- :ref:`float` **get_icon_scale** **(** **)** const + +.. _class_ItemList_get_item_at_pos: + +- :ref:`int` **get_item_at_pos** **(** :ref:`Vector2` pos, :ref:`bool` exact=false **)** const + .. _class_ItemList_get_item_count: - :ref:`int` **get_item_count** **(** **)** const @@ -146,6 +183,10 @@ Member Function Description - :ref:`Texture` **get_item_icon** **(** :ref:`int` idx **)** const +.. _class_ItemList_get_item_icon_region: + +- :ref:`Rect2` **get_item_icon_region** **(** :ref:`int` idx **)** const + .. _class_ItemList_get_item_metadata: - void **get_item_metadata** **(** :ref:`int` idx **)** const @@ -166,14 +207,16 @@ Member Function Description - :ref:`int` **get_max_text_lines** **(** **)** const -.. _class_ItemList_get_min_icon_size: - -- :ref:`Vector2` **get_min_icon_size** **(** **)** const - .. _class_ItemList_get_select_mode: - :ref:`int` **get_select_mode** **(** **)** const +.. _class_ItemList_get_selected_items: + +- :ref:`IntArray` **get_selected_items** **(** **)** + +Returns a list of selected indexes. + .. _class_ItemList_is_item_disabled: - :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const @@ -182,6 +225,10 @@ Member Function Description - :ref:`bool` **is_item_selectable** **(** :ref:`int` idx **)** const +.. _class_ItemList_is_same_column_width: + +- :ref:`int` **is_same_column_width** **(** **)** const + .. _class_ItemList_is_selected: - :ref:`bool` **is_selected** **(** :ref:`int` idx **)** const @@ -194,14 +241,26 @@ Member Function Description - void **select** **(** :ref:`int` idx, :ref:`bool` single=true **)** +.. _class_ItemList_set_allow_rmb_select: + +- void **set_allow_rmb_select** **(** :ref:`bool` allow **)** + .. _class_ItemList_set_fixed_column_width: - void **set_fixed_column_width** **(** :ref:`int` width **)** +.. _class_ItemList_set_fixed_icon_size: + +- void **set_fixed_icon_size** **(** :ref:`Vector2` size **)** + .. _class_ItemList_set_icon_mode: - void **set_icon_mode** **(** :ref:`int` mode **)** +.. _class_ItemList_set_icon_scale: + +- void **set_icon_scale** **(** :ref:`float` scale **)** + .. _class_ItemList_set_item_custom_bg_color: - void **set_item_custom_bg_color** **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** @@ -214,9 +273,13 @@ Member Function Description - void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture` icon **)** +.. _class_ItemList_set_item_icon_region: + +- void **set_item_icon_region** **(** :ref:`int` idx, :ref:`Rect2` rect **)** + .. _class_ItemList_set_item_metadata: -- void **set_item_metadata** **(** :ref:`int` idx, var metadata **)** +- void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` metadata **)** .. _class_ItemList_set_item_selectable: @@ -238,9 +301,9 @@ Member Function Description - void **set_max_text_lines** **(** :ref:`int` lines **)** -.. _class_ItemList_set_min_icon_size: +.. _class_ItemList_set_same_column_width: -- void **set_min_icon_size** **(** :ref:`Vector2` size **)** +- void **set_same_column_width** **(** :ref:`bool` enable **)** .. _class_ItemList_set_select_mode: diff --git a/classes/class_kinematicbody2d.rst b/classes/class_kinematicbody2d.rst index 02980dd06..1eead77f7 100644 --- a/classes/class_kinematicbody2d.rst +++ b/classes/class_kinematicbody2d.rst @@ -21,7 +21,7 @@ Member Functions +--------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_collider` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`get_collider_metadata` **(** **)** const | +| :ref:`Variant` | :ref:`get_collider_metadata` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_collider_shape` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------+ @@ -68,7 +68,7 @@ Return the body that collided with this one. .. _class_KinematicBody2D_get_collider_metadata: -- Variant **get_collider_metadata** **(** **)** const +- :ref:`Variant` **get_collider_metadata** **(** **)** const Return the metadata of the shape that collided with this body. If there is no collision, it will return 0, so collisions must be checked first with :ref:`is_colliding`. Additionally, this metadata can not be set with :ref:`Object.set_meta`, it must be set with :ref:`Physics2DServer.body_set_shape_metadata`. diff --git a/classes/class_label.rst b/classes/class_label.rst index 93266ecf2..441054e37 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -39,6 +39,8 @@ Member Functions +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_visible_characters` **(** **)** const | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_visible_line_count` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_autowrap` **(** **)** const | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_clipping_text` **(** **)** const | @@ -146,6 +148,10 @@ Return the vertical alignment mode (any of the VALIGN\_\* enumeration values). Return the restricted number of characters to display. Returns -1 if unrestricted. +.. _class_Label_get_visible_line_count: + +- :ref:`int` **get_visible_line_count** **(** **)** const + .. _class_Label_has_autowrap: - :ref:`bool` **has_autowrap** **(** **)** const diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 97c494a99..1efb9029f 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -18,39 +18,59 @@ Control that provides single line string editing. Member Functions ---------------- -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`append_at_cursor` **(** :ref:`String` text **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_align` **(** **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_cursor_pos` **(** **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_max_length` **(** **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_text` **(** **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_editable` **(** **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_secret` **(** **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` from=0, :ref:`int` to=-1 **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select_all` **(** **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_align` **(** :ref:`int` align **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cursor_pos` **(** :ref:`int` pos **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_editable` **(** :ref:`bool` enabled **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_max_length` **(** :ref:`int` chars **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_secret` **(** :ref:`bool` enabled **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_text` **(** :ref:`String` text **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------+ ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_at_cursor` **(** :ref:`String` text **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`cursor_get_blink_enabled` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cursor_get_blink_speed` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_blink_enabled` **(** :ref:`bool` enable **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_blink_speed` **(** :ref:`float` blink_speed **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_align` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cursor_pos` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_length` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PopupMenu` | :ref:`get_menu` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_placeholder` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_placeholder_alpha` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editable` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_secret` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`menu_option` **(** :ref:`int` option **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` from=0, :ref:`int` to=-1 **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select_all` **(** **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_align` **(** :ref:`int` align **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cursor_pos` **(** :ref:`int` pos **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editable` **(** :ref:`bool` enabled **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_length` **(** :ref:`int` chars **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_placeholder` **(** :ref:`String` text **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_placeholder_alpha` **(** :ref:`float` alpha **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_secret` **(** :ref:`bool` enabled **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`String` text **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -65,6 +85,13 @@ Numeric Constants - **ALIGN_CENTER** = **1** - **ALIGN_RIGHT** = **2** - **ALIGN_FILL** = **3** +- **MENU_CUT** = **0** +- **MENU_COPY** = **1** +- **MENU_PASTE** = **2** +- **MENU_CLEAR** = **3** +- **MENU_SELECT_ALL** = **4** +- **MENU_UNDO** = **5** +- **MENU_MAX** = **6** Description ----------- @@ -86,6 +113,30 @@ Append text at cursor, scrolling the :ref:`LineEdit` when needed Clear the :ref:`LineEdit` text. +.. _class_LineEdit_cursor_get_blink_enabled: + +- :ref:`bool` **cursor_get_blink_enabled** **(** **)** const + +Gets whether the line edit caret is blinking. + +.. _class_LineEdit_cursor_get_blink_speed: + +- :ref:`float` **cursor_get_blink_speed** **(** **)** const + +Gets the line edit caret blink speed. + +.. _class_LineEdit_cursor_set_blink_enabled: + +- void **cursor_set_blink_enabled** **(** :ref:`bool` enable **)** + +Set the line edit caret to blink. + +.. _class_LineEdit_cursor_set_blink_speed: + +- void **cursor_set_blink_speed** **(** :ref:`float` blink_speed **)** + +Set the line edit caret blink speed. Cannot be less then or equal to 0. + .. _class_LineEdit_get_align: - :ref:`int` **get_align** **(** **)** const @@ -102,6 +153,18 @@ Return the cursor position inside the :ref:`LineEdit`. Return the maximum amount of characters the :ref:`LineEdit` can edit. If 0 is returned, no limit exists. +.. _class_LineEdit_get_menu: + +- :ref:`PopupMenu` **get_menu** **(** **)** const + +.. _class_LineEdit_get_placeholder: + +- :ref:`String` **get_placeholder** **(** **)** const + +.. _class_LineEdit_get_placeholder_alpha: + +- :ref:`float` **get_placeholder_alpha** **(** **)** const + .. _class_LineEdit_get_text: - :ref:`String` **get_text** **(** **)** const @@ -120,6 +183,10 @@ Return the *editable* status of the :ref:`LineEdit` (see :ref:`s Return the *secret* status of the :ref:`LineEdit` (see :ref:`set_secret`). +.. _class_LineEdit_menu_option: + +- void **menu_option** **(** :ref:`int` option **)** + .. _class_LineEdit_select: - void **select** **(** :ref:`int` from=0, :ref:`int` to=-1 **)** @@ -152,6 +219,14 @@ Set the *editable* status of the :ref:`LineEdit`. When disabled, Set the maximum amount of characters the :ref:`LineEdit` can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit. +.. _class_LineEdit_set_placeholder: + +- void **set_placeholder** **(** :ref:`String` text **)** + +.. _class_LineEdit_set_placeholder_alpha: + +- void **set_placeholder_alpha** **(** :ref:`float` alpha **)** + .. _class_LineEdit_set_secret: - void **set_secret** **(** :ref:`bool` enabled **)** diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst new file mode 100644 index 000000000..62ada58f2 --- /dev/null +++ b/classes/class_linkbutton.rst @@ -0,0 +1,69 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_LinkButton: + +LinkButton +========== + +**Inherits:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +Simple button used to represent a link to some resource + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_underline_mode` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`String` text **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_underline_mode` **(** :ref:`int` underline_mode **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **UNDERLINE_MODE_ALWAYS** = **0** --- The LinkButton will always show an underline at the bottom of its text +- **UNDERLINE_MODE_ON_HOVER** = **1** --- The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. + +Description +----------- + +This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page). + +Member Function Description +--------------------------- + +.. _class_LinkButton_get_text: + +- :ref:`String` **get_text** **(** **)** const + +Returns the text of the button. + +.. _class_LinkButton_get_underline_mode: + +- :ref:`int` **get_underline_mode** **(** **)** const + +Returns the underline mode for this button. + +.. _class_LinkButton_set_text: + +- void **set_text** **(** :ref:`String` text **)** + +Sets the text of the button. + +.. _class_LinkButton_set_underline_mode: + +- void **set_underline_mode** **(** :ref:`int` underline_mode **)** + +Sets the underline mode for this button, the argument must be one of the :ref:`LinkButton` constants (see constants section). + + diff --git a/classes/class_listener.rst b/classes/class_listener.rst new file mode 100644 index 000000000..518d6b0f4 --- /dev/null +++ b/classes/class_listener.rst @@ -0,0 +1,50 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_Listener: + +Listener +======== + +**Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------+-----------------------------------------------------------------------------------------+ +| void | :ref:`clear_current` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_listener_transform` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_current` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------+ +| void | :ref:`make_current` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Listener_clear_current: + +- void **clear_current** **(** **)** + +.. _class_Listener_get_listener_transform: + +- :ref:`Transform` **get_listener_transform** **(** **)** const + +.. _class_Listener_is_current: + +- :ref:`bool` **is_current** **(** **)** const + +.. _class_Listener_make_current: + +- void **make_current** **(** **)** + + diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index 8e13de01e..9bb28e168 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -20,31 +20,33 @@ Main loop is the abstract main loop base class. Member Functions ---------------- -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_finalize` **(** **)** virtual | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_idle` **(** :ref:`float` delta **)** virtual | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_initialize` **(** **)** virtual | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_input_event` **(** :ref:`InputEvent` ev **)** virtual | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_input_text` **(** :ref:`String` text **)** virtual | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_iteration` **(** :ref:`float` delta **)** virtual | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`finish` **(** **)** | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`idle` **(** :ref:`float` delta **)** | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`init` **(** **)** | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`input_event` **(** :ref:`InputEvent` ev **)** | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`input_text` **(** :ref:`String` text **)** | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`iteration` **(** :ref:`float` delta **)** | -+--------------------------+---------------------------------------------------------------------------------------------------------------+ ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_drop_files` **(** :ref:`StringArray` files, :ref:`int` screen **)** virtual | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_finalize` **(** **)** virtual | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_idle` **(** :ref:`float` delta **)** virtual | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_initialize` **(** **)** virtual | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_event` **(** :ref:`InputEvent` ev **)** virtual | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_text` **(** :ref:`String` text **)** virtual | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_iteration` **(** :ref:`float` delta **)** virtual | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`finish` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`idle` **(** :ref:`float` delta **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`init` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input_event` **(** :ref:`InputEvent` ev **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input_text` **(** :ref:`String` text **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`iteration` **(** :ref:`float` delta **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -65,6 +67,10 @@ Main loop is the abstract main loop base class. All other main loop classes are Member Function Description --------------------------- +.. _class_MainLoop__drop_files: + +- void **_drop_files** **(** :ref:`StringArray` files, :ref:`int` screen **)** virtual + .. _class_MainLoop__finalize: - void **_finalize** **(** **)** virtual diff --git a/classes/class_marshalls.rst b/classes/class_marshalls.rst index 0b33fc204..32c20320e 100644 --- a/classes/class_marshalls.rst +++ b/classes/class_marshalls.rst @@ -23,13 +23,13 @@ Member Functions +----------------------------------+------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`base64_to_utf8` **(** :ref:`String` base64_str **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`base64_to_variant` **(** :ref:`String` base64_str **)** | +| :ref:`Variant` | :ref:`base64_to_variant` **(** :ref:`String` base64_str **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`raw_to_base64` **(** :ref:`RawArray` array **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`utf8_to_base64` **(** :ref:`String` utf8_str **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`variant_to_base64` **(** var variant **)** | +| :ref:`String` | :ref:`variant_to_base64` **(** :ref:`Variant` variant **)** | +----------------------------------+------------------------------------------------------------------------------------------------------------------+ Member Function Description @@ -45,7 +45,7 @@ Member Function Description .. _class_Marshalls_base64_to_variant: -- Variant **base64_to_variant** **(** :ref:`String` base64_str **)** +- :ref:`Variant` **base64_to_variant** **(** :ref:`String` base64_str **)** .. _class_Marshalls_raw_to_base64: @@ -57,6 +57,6 @@ Member Function Description .. _class_Marshalls_variant_to_base64: -- :ref:`String` **variant_to_base64** **(** var variant **)** +- :ref:`String` **variant_to_base64** **(** :ref:`Variant` variant **)** diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index 917373db2..69e9a2e4f 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -71,9 +71,9 @@ Member Functions +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RealArray` | :ref:`get_vertex_weights` **(** :ref:`int` idx **)** const | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_edge_meta` **(** :ref:`int` idx, var meta **)** | +| void | :ref:`set_edge_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_face_meta` **(** :ref:`int` idx, var meta **)** | +| void | :ref:`set_face_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_material` **(** :ref:`Material` material **)** | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -83,7 +83,7 @@ Member Functions +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_vertex_color` **(** :ref:`int` idx, :ref:`Color` color **)** | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_vertex_meta` **(** :ref:`int` idx, var meta **)** | +| void | :ref:`set_vertex_meta` **(** :ref:`int` idx, :ref:`Variant` meta **)** | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_vertex_normal` **(** :ref:`int` idx, :ref:`Vector3` normal **)** | +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -205,11 +205,11 @@ Member Function Description .. _class_MeshDataTool_set_edge_meta: -- void **set_edge_meta** **(** :ref:`int` idx, var meta **)** +- void **set_edge_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** .. _class_MeshDataTool_set_face_meta: -- void **set_face_meta** **(** :ref:`int` idx, var meta **)** +- void **set_face_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** .. _class_MeshDataTool_set_material: @@ -229,7 +229,7 @@ Member Function Description .. _class_MeshDataTool_set_vertex_meta: -- void **set_vertex_meta** **(** :ref:`int` idx, var meta **)** +- void **set_vertex_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** .. _class_MeshDataTool_set_vertex_normal: diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index 87ffd7990..176466e5a 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -18,29 +18,33 @@ Library of meshes. Member Functions ---------------- -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_item` **(** :ref:`int` id **)** | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`IntArray` | :ref:`get_item_list` **(** **)** const | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`get_item_mesh` **(** :ref:`int` id **)** const | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_name` **(** :ref:`int` id **)** const | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shape` | :ref:`get_item_shape` **(** :ref:`int` id **)** const | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_last_unused_item_id` **(** **)** const | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` id **)** | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_mesh` **(** :ref:`int` id, :ref:`Mesh` mesh **)** | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_name` **(** :ref:`int` id, :ref:`String` name **)** | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_shape` **(** :ref:`int` id, :ref:`Shape` shape **)** | -+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_item` **(** :ref:`int` id **)** | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_item_list` **(** **)** const | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Mesh` | :ref:`get_item_mesh` **(** :ref:`int` id **)** const | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_name` **(** :ref:`int` id **)** const | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NavigationMesh` | :ref:`get_item_navmesh` **(** :ref:`int` id **)** const | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape` | :ref:`get_item_shape` **(** :ref:`int` id **)** const | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_last_unused_item_id` **(** **)** const | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` id **)** | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_mesh` **(** :ref:`int` id, :ref:`Mesh` mesh **)** | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_name` **(** :ref:`int` id, :ref:`String` name **)** | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_navmesh` **(** :ref:`int` id, :ref:`NavigationMesh` navmesh **)** | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_shape` **(** :ref:`int` id, :ref:`Shape` shape **)** | ++----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -80,6 +84,10 @@ Return the mesh of the item. Return the name of the item. +.. _class_MeshLibrary_get_item_navmesh: + +- :ref:`NavigationMesh` **get_item_navmesh** **(** :ref:`int` id **)** const + .. _class_MeshLibrary_get_item_shape: - :ref:`Shape` **get_item_shape** **(** :ref:`int` id **)** const @@ -108,6 +116,10 @@ Set the mesh of the item. Set the name of the item. +.. _class_MeshLibrary_set_item_navmesh: + +- void **set_item_navmesh** **(** :ref:`int` id, :ref:`NavigationMesh` navmesh **)** + .. _class_MeshLibrary_set_item_shape: - void **set_item_shape** **(** :ref:`int` id, :ref:`Shape` shape **)** diff --git a/classes/class_node.rst b/classes/class_node.rst index 0a21db374..5bc366864 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -8,14 +8,14 @@ Node **Inherits:** :ref:`Object` -**Inherited By:** :ref:`Viewport`, :ref:`Timer`, :ref:`CanvasLayer`, :ref:`EventPlayer`, :ref:`SoundRoomParams`, :ref:`Spatial`, :ref:`AnimationPlayer`, :ref:`EditorPlugin`, :ref:`ResourcePreloader`, :ref:`AnimationTreePlayer`, :ref:`SamplePlayer`, :ref:`InstancePlaceholder`, :ref:`StreamPlayer`, :ref:`CanvasItem`, :ref:`Tween` +**Inherited By:** :ref:`Viewport`, :ref:`Timer`, :ref:`CanvasLayer`, :ref:`EventPlayer`, :ref:`SoundRoomParams`, :ref:`Spatial`, :ref:`AnimationPlayer`, :ref:`EditorPlugin`, :ref:`ResourcePreloader`, :ref:`AnimationTreePlayer`, :ref:`SamplePlayer`, :ref:`InstancePlaceholder`, :ref:`HTTPRequest`, :ref:`StreamPlayer`, :ref:`CanvasItem`, :ref:`Tween` **Category:** Core Brief Description ----------------- -Base class for all the "Scene" elements. +Base class for all the *scene* elements. Member Functions ---------------- @@ -93,6 +93,8 @@ Member Functions +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_a_parent_of` **(** :ref:`Node` node **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_displayed_folded` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_fixed_processing` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_greater_than` **(** :ref:`Node` node **)** const | @@ -129,6 +131,8 @@ Member Functions +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`replace_by` **(** :ref:`Node` node, :ref:`bool` keep_data=false **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_display_folded` **(** :ref:`bool` fold **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_filename` **(** :ref:`String` filename **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_fixed_process` **(** :ref:`bool` enable **)** | @@ -171,6 +175,8 @@ Numeric Constants - **NOTIFICATION_PAUSED** = **14** - **NOTIFICATION_UNPAUSED** = **15** - **NOTIFICATION_INSTANCED** = **20** +- **NOTIFICATION_DRAG_BEGIN** = **21** +- **NOTIFICATION_DRAG_END** = **22** - **PAUSE_MODE_INHERIT** = **0** - **PAUSE_MODE_STOP** = **1** - **PAUSE_MODE_PROCESS** = **2** @@ -178,23 +184,23 @@ Numeric Constants Description ----------- -Nodes can be set as children of other nodes, resulting in a tree arrangement. Any tree of nodes is called a "Scene". +Nodes are the base bricks with which Godot games are developed. They can be set as children of other nodes, resulting in a tree arrangement. A given node can contain any number of nodes as children (but there is only one scene tree root node) with the requirement that all siblings (direct children of a node) should have unique names. -Scenes can be saved to disk, and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. +Any tree of nodes is called a *scene*. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. Nodes can optionally be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group) to perform grouped actions. -:ref:`SceneTree` contains the "active" tree of nodes, and a node becomes active (receiving NOTIFICATION_ENTER_SCENE) when added to that tree. +**Scene tree:** The :ref:`SceneTree` contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its :ref:`_enter_tree` callback is triggered. Children nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree` callback of a parent node will be triggered before its child's. -A node can contain any number of nodes as a children (but there is only one tree root) with the requirement that no two children with the same name can exist. +Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective :ref:`_ready` callbacks are triggered. For groups of nodes, the :ref:`_ready` callback is called in reverse order, from the children up to the parent nodes. -Nodes can, optionally, be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group). +It means that when adding a scene to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree` of the parent, :ref:`_enter_tree` of the children, :ref:`_ready` of the children and finally :ref:`_ready` of the parent (and that recursively for the whole scene). -Nodes can be set to "process" state, so they constantly receive a callback requesting them to process (do anything). Normal processing (:ref:`_process`) happens as fast as possible and is dependent on the frame rate, so the processing time delta is variable. Fixed processing (:ref:`_fixed_process`) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics. +**Processing:** Nodes can be set to the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process`, toggled with :ref:`set_process`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* is variable. Fixed processing (callback :ref:`_fixed_process`, toggled with :ref:`set_fixed_process`) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics. -Nodes can also process input events. When set, the :ref:`_input` function will be called with every input that the program receives. Since this is usually too overkill (unless used for simple projects), an :ref:`_unhandled_input` function is called when the input was not handled by anyone else (usually, GUI :ref:`Control` nodes). +Nodes can also process input events. When set, the :ref:`_input` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the :ref:`_unhandled_input` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control` nodes), ensuring that the node only receives the events that were meant for it. -To keep track of the scene hierarchy (specially when instancing scenes into scenes) an "owner" can be set to a node. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. +To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with :ref:`set_owner`. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. -Finally, when a node is freed, it will free all its children nodes too. +Finally, when a node is freed with :ref:`free` or :ref:`queue_free`, it will also free all its children. Member Function Description --------------------------- @@ -203,45 +209,69 @@ Member Function Description - void **_enter_tree** **(** **)** virtual +Called when the node enters the :ref:`SceneTree` (e.g. upon instancing, scene changing or after calling :ref:`add_child` in a script). If the node has children, its :ref:`_enter_tree` callback will be called first, and then that of the children. + +Corresponds to the NOTIFICATION_ENTER_TREE notification in :ref:`Object._notification`. + .. _class_Node__exit_tree: - void **_exit_tree** **(** **)** virtual +Called when the node leaves the :ref:`SceneTree` (e.g. upon freeing, scene changing or after calling :ref:`remove_child` in a script). If the node has children, its :ref:`_exit_tree` callback will be called last, after all its children have left the tree. + +Corresponds to the NOTIFICATION_EXIT_TREE notification in :ref:`Object._notification`. + .. _class_Node__fixed_process: - void **_fixed_process** **(** :ref:`float` delta **)** virtual -Called for fixed processing (synced to the physics). +Called during the fixed processing step of the main loop. Fixed processing means that the frame rate is synced to the physics, i.e. the ``delta`` variable should be constant. + +It is only called if fixed processing has been enabled with :ref:`set_fixed_process`. + +Corresponds to the NOTIFICATION_FIXED_PROCESS notification in :ref:`Object._notification`. .. _class_Node__input: - void **_input** **(** :ref:`InputEvent` event **)** virtual -Called when any input happens (also must enable with :ref:`set_process_input` or the property). +Called for every input event. + +It has to be enabled with :ref:`set_process_input` or the corresponding property in the inspector. .. _class_Node__process: - void **_process** **(** :ref:`float` delta **)** virtual -Called for processing. This is called every frame, with the delta time from the previous frame. +Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the ``delta`` time since the previous frame is not constant. + +It is only called if processing has been enabled with :ref:`set_process`. + +Corresponds to the NOTIFICATION_PROCESS notification in :ref:`Object._notification`. .. _class_Node__ready: - void **_ready** **(** **)** virtual -Called when ready (entered scene and children entered too). +Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their :ref:`_ready` callback gets triggered first, and the node will receive the ready notification only afterwards. + +Corresponds to the NOTIFICATION_READY notification in :ref:`Object._notification`. .. _class_Node__unhandled_input: - void **_unhandled_input** **(** :ref:`InputEvent` event **)** virtual -Called when any input happens that was not handled by something else (also must enable with :ref:`set_process_unhandled_input` or the property). +Called for every input event that has not already been handled by another node. + +It has to be enabled with :ref:`set_process_unhandled_input` or the corresponding property in the inspector. .. _class_Node__unhandled_key_input: - void **_unhandled_key_input** **(** :ref:`InputEvent` key_event **)** virtual -Called when any key input happens that was not handled by something else. +Called for every *key* input event that has not already been handled by another node. + +It has to be enabled with :ref:`set_process_unhandled_key_input` or the corresponding property in the inspector. .. _class_Node_add_child: @@ -249,24 +279,26 @@ Called when any key input happens that was not handled by something else. Add a child :ref:`Node`. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node. -The optional boolean argument enforces creating child node with human-readable names, based on the name of node being instanced instead of its type only. +The optional boolean argument enforces creating child nodes with human-readable names, based on the name of the node being instanced instead of its type only. .. _class_Node_add_to_group: - void **add_to_group** **(** :ref:`String` group, :ref:`bool` persistent=false **)** -Add a node to a group. Groups are helpers to name and organize group of nodes, like for example: "Enemies", "Collectables", etc. A :ref:`Node` can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see :ref:`is_inside_tree`). +Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A :ref:`Node` can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see :ref:`is_inside_tree`). .. _class_Node_can_process: - :ref:`bool` **can_process** **(** **)** const -Return true if the node can process. +Return true if the node can process, i.e. whether its pause mode allows processing while the scene tree is paused (see :ref:`set_pause_mode`). Always returns true if the scene tree is not paused, and false if the node is not in the tree. FIXME: Why FAIL_COND? .. _class_Node_duplicate: - :ref:`Node` **duplicate** **(** :ref:`bool` use_instancing=false **)** const +Duplicate the node, returning a new :ref:`Node`. If ``use_instancing`` is true, the duplicated node will be a new instance of the original :ref:`PackedScene`, if not it will be an independent node. The duplicated node has the same group assignments and signals as the original one. + .. _class_Node_find_node: - :ref:`Node` **find_node** **(** :ref:`String` mask, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** const @@ -277,83 +309,79 @@ Find a descendant of this node whose name matches ``mask`` as in :ref:`String.ma - :ref:`Node` **get_child** **(** :ref:`int` idx **)** const -Return a children node by it's index (see :ref:`get_child_count`). This method is often used for iterating all children of a node. +Return a child node by its index (see :ref:`get_child_count`). This method is often used for iterating all children of a node. .. _class_Node_get_child_count: - :ref:`int` **get_child_count** **(** **)** const -Return the amount of children nodes. +Return the amount of child nodes. .. _class_Node_get_children: - :ref:`Array` **get_children** **(** **)** const +Return an array of references (:ref:`Node`) to the child nodes. + .. _class_Node_get_filename: - :ref:`String` **get_filename** **(** **)** const -Return a filename that may be containedA node can contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see :ref:`set_filename`). +Return a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see :ref:`set_filename`). .. _class_Node_get_fixed_process_delta_time: - :ref:`float` **get_fixed_process_delta_time** **(** **)** const -Return the time elapsed since the last fixed frame. This is always the same in fixed processing unless the frames per second is changed in :ref:`OS`. +Return the time elapsed since the last fixed frame (see :ref:`_fixed_process`). This is always the same in fixed processing unless the frames per second is changed in :ref:`OS`. .. _class_Node_get_groups: - :ref:`Array` **get_groups** **(** **)** const +Return an array listing the groups that the node is part of. + .. _class_Node_get_index: - :ref:`int` **get_index** **(** **)** const -Get the node index in the parent (assuming it has a parent). +Get the node index, i.e. its position among the siblings of its parent. .. _class_Node_get_name: - :ref:`String` **get_name** **(** **)** const -Return the name of the :ref:`Node`. Name is be unique within parent. +Return the name of the node. This name is unique among the siblings (other child nodes from the same parent). .. _class_Node_get_node: - :ref:`Node` **get_node** **(** :ref:`NodePath` path **)** const -Fetch a node. NodePath must be valid (or else error will occur) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node. +Fetch a node. The :ref:`NodePath` must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node. -Note: fetching absolute paths only works when the node is inside the scene tree (see :ref:`is_inside_tree`). Examples. Assume your current node is Character and following tree: +Note: fetching absolute paths only works when the node is inside the scene tree (see :ref:`is_inside_tree`). +*Example:* Assume your current node is Character and the following tree: +:: - root/ + /root + /root/Character + /root/Character/Sword + /root/Character/Backpack/Dagger + /root/MyGame + /root/Swamp/Alligator + /root/Swamp/Mosquito + /root/Swamp/Goblin - root/Character +Possible paths are: - root/Character/Sword +:: - root/Character/Backpack/Dagger - - root/MyGame - - root/Swamp/Alligator - - root/Swamp/Mosquito - - root/Swamp/Goblin - - - - Possible paths are: - - - get_node("Sword") - - - get_node("Backpack/Dagger") - - - get_node("../Swamp/Alligator") - - - get_node("/root/MyGame") + get_node("Sword") + get_node("Backpack/Dagger") + get_node("../Swamp/Alligator") + get_node("/root/MyGame") .. _class_Node_get_node_and_resource: @@ -369,7 +397,7 @@ Get the node owner (see :ref:`set_owner`). - :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. +Return the parent node of the current node, or an empty :ref:`Node` if the node lacks a parent. .. _class_Node_get_path: @@ -423,6 +451,10 @@ Return the time elapsed (in seconds) since the last process callback. This is al Return *true* if the "node" argument is a direct or indirect child of the current node, otherwise return *false*. +.. _class_Node_is_displayed_folded: + +- :ref:`bool` **is_displayed_folded** **(** **)** const + .. _class_Node_is_fixed_processing: - :ref:`bool` **is_fixed_processing** **(** **)** const @@ -521,6 +553,10 @@ Remove a node from a group. Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost. +.. _class_Node_set_display_folded: + +- void **set_display_folded** **(** :ref:`bool` fold **)** + .. _class_Node_set_filename: - void **set_filename** **(** :ref:`String` filename **)** diff --git a/classes/class_object.rst b/classes/class_object.rst index b0ecdca3e..c6e76935f 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -6,7 +6,7 @@ Object ====== -**Inherited By:** :ref:`Reference`, :ref:`Physics2DServer`, :ref:`Input`, :ref:`SpatialSound2DServer`, :ref:`Node`, :ref:`Geometry`, :ref:`TreeItem`, :ref:`PhysicsDirectSpaceState`, :ref:`Physics2DDirectSpaceState`, :ref:`MainLoop`, :ref:`InputMap`, :ref:`UndoRedo`, :ref:`PhysicsServer`, :ref:`ResourceSaver`, :ref:`Performance`, :ref:`PathRemap`, :ref:`ResourceLoader`, :ref:`AudioServer`, :ref:`SpatialSoundServer`, :ref:`IP`, :ref:`VisualServer`, :ref:`OS`, :ref:`Physics2DDirectBodyState`, :ref:`Globals`, :ref:`PhysicsDirectBodyState`, :ref:`TranslationServer` +**Inherited By:** :ref:`Reference`, :ref:`Physics2DServer`, :ref:`Input`, :ref:`SpatialSound2DServer`, :ref:`Node`, :ref:`Geometry`, :ref:`TreeItem`, :ref:`PhysicsDirectSpaceState`, :ref:`Physics2DDirectSpaceState`, :ref:`MainLoop`, :ref:`InputMap`, :ref:`UndoRedo`, :ref:`PhysicsServer`, :ref:`ResourceSaver`, :ref:`Performance`, :ref:`PathRemap`, :ref:`ResourceLoader`, :ref:`AudioServer`, :ref:`SpatialSoundServer`, :ref:`VisualServer`, :ref:`IP`, :ref:`OS`, :ref:`Globals`, :ref:`PhysicsDirectBodyState`, :ref:`EditorSelection`, :ref:`Physics2DDirectBodyState`, :ref:`TranslationServer` **Category:** Core @@ -18,87 +18,87 @@ Base class for all non built-in types. Member Functions ---------------- -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`XL_MESSAGE` **(** :ref:`String` message **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_get` **(** :ref:`String` property **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_get_property_list` **(** **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_init` **(** **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_notification` **(** :ref:`int` what **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_set` **(** :ref:`String` property, var value **)** virtual | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_user_signal` **(** :ref:`String` signal, :ref:`Array` arguments=Array() **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call` **(** :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_deferred` **(** :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`callv` **(** :ref:`String` method, :ref:`Array` arg_array **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`can_translate_messages` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`connect` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method, :ref:`Array` binds=Array(), :ref:`int` flags=0 **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`emit_signal` **(** :ref:`String` signal, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free` **(** **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get` **(** :ref:`String` property **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_instance_ID` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get_meta` **(** :ref:`String` name **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringArray` | :ref:`get_meta_list` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_method_list` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_property_list` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Script` | :ref:`get_script` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_signal_connection_list` **(** :ref:`String` signal **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_signal_list` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_type` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_meta` **(** :ref:`String` name **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_method` **(** :ref:`String` method **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_user_signal` **(** :ref:`String` signal **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_blocking_signals` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_connected` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_queued_for_deletion` **(** **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_type` **(** :ref:`String` type **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`notification` **(** :ref:`int` what, :ref:`bool` reversed=false **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`property_list_changed_notify` **(** **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`String` property, var value **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_block_signals` **(** :ref:`bool` enable **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_message_translation` **(** :ref:`bool` enable **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_meta` **(** :ref:`String` name, var value **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_script` **(** :ref:`Script` script **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`tr` **(** :ref:`String` message **)** const | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`XL_MESSAGE` **(** :ref:`String` message **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_get` **(** :ref:`String` property **)** virtual | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_get_property_list` **(** **)** virtual | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_init` **(** **)** virtual | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_notification` **(** :ref:`int` what **)** virtual | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set` **(** :ref:`String` property, :ref:`Variant` value **)** virtual | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_user_signal` **(** :ref:`String` signal, :ref:`Array` arguments=Array() **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call` **(** :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL, :ref:`Variant` arg5=NULL, :ref:`Variant` arg6=NULL, :ref:`Variant` arg7=NULL, :ref:`Variant` arg8=NULL, :ref:`Variant` arg9=NULL **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call_deferred` **(** :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`callv` **(** :ref:`String` method, :ref:`Array` arg_array **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_translate_messages` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`connect` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method, :ref:`Array` binds=Array(), :ref:`int` flags=0 **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`emit_signal` **(** :ref:`String` signal, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free` **(** **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get` **(** :ref:`String` property **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_instance_ID` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_meta` **(** :ref:`String` name **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_meta_list` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_method_list` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_property_list` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Script` | :ref:`get_script` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_signal_connection_list` **(** :ref:`String` signal **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_signal_list` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_type` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_meta` **(** :ref:`String` name **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_method` **(** :ref:`String` method **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_user_signal` **(** :ref:`String` signal **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_blocking_signals` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_connected` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_queued_for_deletion` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_type` **(** :ref:`String` type **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`notification` **(** :ref:`int` what, :ref:`bool` reversed=false **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`property_list_changed_notify` **(** **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`String` property, :ref:`Variant` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_block_signals` **(** :ref:`bool` enable **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_message_translation` **(** :ref:`bool` enable **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_meta` **(** :ref:`String` name, :ref:`Variant` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_script` **(** :ref:`Script` script **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`tr` **(** :ref:`String` message **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -160,7 +160,7 @@ Notification request, the notification id is received. .. _class_Object__set: -- void **_set** **(** :ref:`String` property, var value **)** virtual +- void **_set** **(** :ref:`String` property, :ref:`Variant` value **)** virtual Set a property. Return true if the property was found. @@ -172,19 +172,19 @@ Add a user signal (can be added anytime). Arguments are optional, but can be add .. _class_Object_call: -- void **call** **(** :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** +- void **call** **(** :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL, :ref:`Variant` arg5=NULL, :ref:`Variant` arg6=NULL, :ref:`Variant` arg7=NULL, :ref:`Variant` arg8=NULL, :ref:`Variant` arg9=NULL **)** Call a function in the object, result is returned. .. _class_Object_call_deferred: -- void **call_deferred** **(** :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** +- void **call_deferred** **(** :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** Create and store a function in the object. The call will take place on idle time. .. _class_Object_callv: -- Variant **callv** **(** :ref:`String` method, :ref:`Array` arg_array **)** +- :ref:`Variant` **callv** **(** :ref:`String` method, :ref:`Array` arg_array **)** .. _class_Object_can_translate_messages: @@ -206,7 +206,7 @@ Disconnect a signal from a method. .. _class_Object_emit_signal: -- void **emit_signal** **(** :ref:`String` signal, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** +- void **emit_signal** **(** :ref:`String` signal, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** Emit a signal. Arguments are passed in an array. @@ -318,7 +318,7 @@ Notify the object of something. .. _class_Object_set: -- void **set** **(** :ref:`String` property, var value **)** +- void **set** **(** :ref:`String` property, :ref:`Variant` value **)** Set property into the object. @@ -336,7 +336,7 @@ Set true if this object can translate strings (in calls to tr() ). Default is tr .. _class_Object_set_meta: -- void **set_meta** **(** :ref:`String` name, var value **)** +- void **set_meta** **(** :ref:`String` name, :ref:`Variant` value **)** Set a metadata into the object. Metadata is serialized. Metadata can be *anything*. diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 225f18e38..eecce8445 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -55,7 +55,7 @@ Member Functions +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` texture **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | +| void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -171,7 +171,7 @@ Set the icon of an item at index "idx". .. _class_OptionButton_set_item_metadata: -- void **set_item_metadata** **(** :ref:`int` idx, var metadata **)** +- void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` metadata **)** .. _class_OptionButton_set_item_text: diff --git a/classes/class_os.rst b/classes/class_os.rst index 214d29449..1fbdd937c 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -37,6 +37,8 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find_scancode_from_string` **(** :ref:`String` string **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_borderless_window` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_clipboard` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringArray` | :ref:`get_cmdline_args` **(** **)** | @@ -49,8 +51,14 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_date` **(** :ref:`bool` utc=false **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_datetime` **(** :ref:`bool` utc=false **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_datetime_from_unix_time` **(** :ref:`int` unix_time_val **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_dynamic_memory_usage` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_engine_version` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_environment` **(** :ref:`String` environment **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_executable_path` **(** **)** const | @@ -63,6 +71,8 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_iterations_per_second` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_latin_keyboard_variant` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_locale` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_main_loop` **(** **)** const | @@ -79,6 +89,8 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_screen_count` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_screen_dpi` **(** :ref:`int` screen=0 **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_screen_orientation` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_screen_position` **(** :ref:`int` screen=0 **)** const | @@ -109,6 +121,8 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_unix_time` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_unix_time_from_datetime` **(** :ref:`Dictionary` datetime **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_video_mode_size` **(** :ref:`int` screen=0 **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_window_position` **(** **)** const | @@ -119,6 +133,10 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_touchscreen_ui_hint` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_virtual_keyboard` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hide_virtual_keyboard` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_debug_build` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_in_low_processor_usage_mode` **(** **)** const | @@ -135,6 +153,8 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_video_mode_resizable` **(** :ref:`int` screen=0 **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_vsnc_enabled` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_window_fullscreen` **(** **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_window_maximized` **(** **)** const | @@ -163,6 +183,10 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`print_resources_in_use` **(** :ref:`bool` short=false **)** | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`request_attention` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_borderless_window` **(** :ref:`bool` borderless **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_clipboard` **(** :ref:`String` clipboard **)** | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_current_screen` **(** :ref:`int` screen **)** | @@ -185,6 +209,8 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_use_file_access_save_and_swap` **(** :ref:`bool` enabled **)** | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_vsync` **(** :ref:`bool` enable **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_video_mode` **(** :ref:`Vector2` size, :ref:`bool` fullscreen, :ref:`bool` resizable, :ref:`int` screen=0 **)** | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_window_fullscreen` **(** :ref:`bool` enabled **)** | @@ -203,6 +229,8 @@ Member Functions +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shell_open` **(** :ref:`String` uri **)** | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`show_virtual_keyboard` **(** :ref:`String` existing_text="" **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -214,18 +242,18 @@ Numeric Constants - **DAY_THURSDAY** = **4** - **DAY_FRIDAY** = **5** - **DAY_SATURDAY** = **6** -- **MONTH_JANUARY** = **0** -- **MONTH_FEBRUARY** = **1** -- **MONTH_MARCH** = **2** -- **MONTH_APRIL** = **3** -- **MONTH_MAY** = **4** -- **MONTH_JUNE** = **5** -- **MONTH_JULY** = **6** -- **MONTH_AUGUST** = **7** -- **MONTH_SEPTEMBER** = **8** -- **MONTH_OCTOBER** = **9** -- **MONTH_NOVEMBER** = **10** -- **MONTH_DECEMBER** = **11** +- **MONTH_JANUARY** = **1** +- **MONTH_FEBRUARY** = **2** +- **MONTH_MARCH** = **3** +- **MONTH_APRIL** = **4** +- **MONTH_MAY** = **5** +- **MONTH_JUNE** = **6** +- **MONTH_JULY** = **7** +- **MONTH_AUGUST** = **8** +- **MONTH_SEPTEMBER** = **9** +- **MONTH_OCTOBER** = **10** +- **MONTH_NOVEMBER** = **11** +- **MONTH_DECEMBER** = **12** - **SCREEN_ORIENTATION_LANDSCAPE** = **0** - **SCREEN_ORIENTATION_PORTRAIT** = **1** - **SCREEN_ORIENTATION_REVERSE_LANDSCAPE** = **2** @@ -245,25 +273,7 @@ Numeric Constants Description ----------- -Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: - - -Mouse Grabbing - - -Mouse Cursors - - -Clipboard - - -Video Mode - - -Date " Time - - -Timers - - -Environment Variables - - -Execution of Binaries - - -Command Line +Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: mouse grabbing, mouse cursors, clipboard, video mode, date and time, timers, environment variables, execution of binaries, command line, etc. Member Function Description --------------------------- @@ -272,6 +282,8 @@ Member Function Description - void **alert** **(** :ref:`String` text, :ref:`String` title="Alert!" **)** +Displays a modal dialog box utilizing the host OS. + .. _class_OS_can_draw: - :ref:`bool` **can_draw** **(** **)** const @@ -282,6 +294,8 @@ Return true if the host OS allows drawing. - :ref:`bool` **can_use_threads** **(** **)** const +Returns if the current host platform is using multiple threads. + .. _class_OS_delay_msec: - void **delay_msec** **(** :ref:`int` msec **)** const @@ -298,10 +312,20 @@ Delay executing of the current thread by given microseconds. - void **dump_memory_to_file** **(** :ref:`String` file **)** +Dumps the memory allocation ringlist to a file (only works in debug). + +Entry format per line: "Address - Size - Description" + .. _class_OS_dump_resources_to_file: - void **dump_resources_to_file** **(** :ref:`String` file **)** +Dumps all used resources to file (only works in debug). + +Entry format per line: "Resource Type : Resource Location" + +At the end of the file is a statistic of all used Resource Types. + .. _class_OS_execute: - :ref:`int` **execute** **(** :ref:`String` path, :ref:`StringArray` arguments, :ref:`bool` blocking, :ref:`Array` output=Array() **)** @@ -312,6 +336,14 @@ Execute the binary file in given path, optionally blocking until it returns. A p - :ref:`int` **find_scancode_from_string** **(** :ref:`String` string **)** const +Returns the scancode of the given string (e.g. "Escape") + +.. _class_OS_get_borderless_window: + +- :ref:`bool` **get_borderless_window** **(** **)** const + +Returns true if the current window is borderless. + .. _class_OS_get_clipboard: - :ref:`String` **get_clipboard** **(** **)** const @@ -334,6 +366,8 @@ Returns the current screen index (0 padded). - :ref:`String` **get_custom_level** **(** **)** const +Returns the value of the commandline argument "-level". + .. _class_OS_get_data_dir: - :ref:`String` **get_data_dir** **(** **)** const @@ -344,12 +378,48 @@ Return the absolute directory path of user data path(:ref:`user://` **get_date** **(** :ref:`bool` utc=false **)** const +Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time). + +.. _class_OS_get_datetime: + +- :ref:`Dictionary` **get_datetime** **(** :ref:`bool` utc=false **)** const + +Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second. + +.. _class_OS_get_datetime_from_unix_time: + +- :ref:`Dictionary` **get_datetime_from_unix_time** **(** :ref:`int` unix_time_val **)** const + +Get a dictionary of time values when given epoch time. + +Dictionary Time values will be a union of values from :ref:`get_time` and :ref:`get_date` dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch). + .. _class_OS_get_dynamic_memory_usage: - :ref:`int` **get_dynamic_memory_usage** **(** **)** const Return the total amount of dynamic memory used (only works in debug). +.. _class_OS_get_engine_version: + +- :ref:`Dictionary` **get_engine_version** **(** **)** const + +Returns the current engine version information in a Dictionary. + + + +"major" - Holds the major version number as a String + +"minor" - Holds the minor version number as a String + +"patch" - Holds the patch version number as a String + +"status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String + +"revision" - Holds the revision (e.g. "custom-build") as a String + +"string" - major + minor + patch + status + revision in a single String + .. _class_OS_get_environment: - :ref:`String` **get_environment** **(** :ref:`String` environment **)** const @@ -386,6 +456,14 @@ Return the list of fullscreen modes. Return the amount of fixed iterations per second (for fixed process and physics). +.. _class_OS_get_latin_keyboard_variant: + +- :ref:`String` **get_latin_keyboard_variant** **(** **)** const + +Returns the current latin keyboard variant as a String. + +Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO" or "ERROR" + .. _class_OS_get_locale: - :ref:`String` **get_locale** **(** **)** const @@ -402,6 +480,8 @@ Return the main loop object (see :ref:`MainLoop`). - :ref:`String` **get_model_name** **(** **)** const +Returns the model name of the current device. + .. _class_OS_get_name: - :ref:`String` **get_name** **(** **)** const @@ -424,12 +504,36 @@ Returns the number of cores available in the host machine. - :ref:`String` **get_scancode_string** **(** :ref:`int` code **)** const +Returns the given scancode as a string (e.g. Return values: "Escape", "Shift+Escape"). + .. _class_OS_get_screen_count: - :ref:`int` **get_screen_count** **(** **)** const Returns the number of displays attached to the host machine +.. _class_OS_get_screen_dpi: + +- :ref:`int` **get_screen_dpi** **(** :ref:`int` screen=0 **)** const + +Returns the dots per inch density of the specified screen. + + + +On Android Devices, the actual screen densities are grouped into six generalized densities: + +ldpi - 120 dpi + +mdpi - 160 dpi + +hdpi - 240 dpi + +xhdpi - 320 dpi + +xxhdpi - 480 dpi + +xxxhdpi - 640 dpi + .. _class_OS_get_screen_orientation: - :ref:`int` **get_screen_orientation** **(** **)** const @@ -482,6 +586,8 @@ Return the amount of time passed in milliseconds since the engine started. - :ref:`Dictionary` **get_time** **(** :ref:`bool` utc=false **)** const +Returns current time as a dictionary of keys: hour, minute, second + .. _class_OS_get_time_scale: - :ref:`float` **get_time_scale** **(** **)** @@ -500,6 +606,16 @@ Return the amount of time passed in milliseconds since the engine started. Return the current unix timestamp. +.. _class_OS_get_unix_time_from_datetime: + +- :ref:`int` **get_unix_time_from_datetime** **(** :ref:`Dictionary` datetime **)** const + +Get an epoch time value from a dictionary of time values. + +``datetime`` must be populated with the following keys: year, month, day, hour, minute, second. + +You can pass the output from :ref:`get_datetime_from_unix_time` directly into this function. Daylight savings time (dst), if present, is ignored. + .. _class_OS_get_video_mode_size: - :ref:`Vector2` **get_video_mode_size** **(** :ref:`int` screen=0 **)** const @@ -528,6 +644,18 @@ Return true if an environment variable exists. - :ref:`bool` **has_touchscreen_ui_hint** **(** **)** const +.. _class_OS_has_virtual_keyboard: + +- :ref:`bool` **has_virtual_keyboard** **(** **)** const + +Returns true if the platform has a virtual keyboard, false otherwise. + +.. _class_OS_hide_virtual_keyboard: + +- void **hide_virtual_keyboard** **(** **)** + +Hides the virtual keyboard if it is shown, does nothing otherwise. + .. _class_OS_is_debug_build: - :ref:`bool` **is_debug_build** **(** **)** const @@ -570,6 +698,10 @@ Return true if the current video mode is fullscreen. Return true if the window is resizable. +.. _class_OS_is_vsnc_enabled: + +- :ref:`bool` **is_vsnc_enabled** **(** **)** const + .. _class_OS_is_window_fullscreen: - :ref:`bool` **is_window_fullscreen** **(** **)** const @@ -636,6 +768,16 @@ Kill a process ID (this method can be used to kill processes that were not spawn - void **print_resources_in_use** **(** :ref:`bool` short=false **)** +.. _class_OS_request_attention: + +- void **request_attention** **(** **)** + +Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. + +.. _class_OS_set_borderless_window: + +- void **set_borderless_window** **(** :ref:`bool` borderless **)** + .. _class_OS_set_clipboard: - void **set_clipboard** **(** :ref:`String` clipboard **)** @@ -692,6 +834,10 @@ Speeds up or slows down the physics by changing the delta variable. (delta \* ti - void **set_use_file_access_save_and_swap** **(** :ref:`bool` enabled **)** +.. _class_OS_set_use_vsync: + +- void **set_use_vsync** **(** :ref:`bool` enable **)** + .. _class_OS_set_video_mode: - void **set_video_mode** **(** :ref:`Vector2` size, :ref:`bool` fullscreen, :ref:`bool` resizable, :ref:`int` screen=0 **)** @@ -744,4 +890,10 @@ Sets the window title to the specified string. - :ref:`int` **shell_open** **(** :ref:`String` uri **)** +.. _class_OS_show_virtual_keyboard: + +- void **show_virtual_keyboard** **(** :ref:`String` existing_text="" **)** + +Shows the virtual keyboard if the platform has one. The *existing_text* parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + diff --git a/classes/class_packeddatacontainer.rst b/classes/class_packeddatacontainer.rst index 94db54b5d..a83ed9ecd 100644 --- a/classes/class_packeddatacontainer.rst +++ b/classes/class_packeddatacontainer.rst @@ -18,18 +18,18 @@ Brief Description Member Functions ---------------- -+------------------------+---------------------------------------------------------------------+ -| Error | :ref:`pack` **(** var value **)** | -+------------------------+---------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** const | -+------------------------+---------------------------------------------------------------------+ ++------------------------+-----------------------------------------------------------------------------------------------+ +| Error | :ref:`pack` **(** :ref:`Variant` value **)** | ++------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** const | ++------------------------+-----------------------------------------------------------------------------------------------+ Member Function Description --------------------------- .. _class_PackedDataContainer_pack: -- Error **pack** **(** var value **)** +- Error **pack** **(** :ref:`Variant` value **)** .. _class_PackedDataContainer_size: diff --git a/classes/class_packetpeer.rst b/classes/class_packetpeer.rst index c8fe574ed..b75685c26 100644 --- a/classes/class_packetpeer.rst +++ b/classes/class_packetpeer.rst @@ -27,11 +27,11 @@ Member Functions +----------------------------------+-----------------------------------------------------------------------------------------------------+ | Error | :ref:`get_packet_error` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------+ -| Variant | :ref:`get_var` **(** **)** const | +| :ref:`Variant` | :ref:`get_var` **(** **)** const | +----------------------------------+-----------------------------------------------------------------------------------------------------+ | Error | :ref:`put_packet` **(** :ref:`RawArray` buffer **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`put_var` **(** Variant var **)** | +| :ref:`int` | :ref:`put_var` **(** :ref:`Variant` var **)** | +----------------------------------+-----------------------------------------------------------------------------------------------------+ Description @@ -62,7 +62,7 @@ Return the error state of the last packet received (via :ref:`get_packet` **get_var** **(** **)** const Get a Variant. @@ -74,7 +74,7 @@ Send a raw packet. .. _class_PacketPeer_put_var: -- :ref:`int` **put_var** **(** Variant var **)** +- :ref:`int` **put_var** **(** :ref:`Variant` var **)** Send a Variant as a packet. diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index e0807bd6d..db7e3dd5b 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -18,15 +18,19 @@ A parallax scrolling layer to be used with :ref:`ParallaxBackground` | :ref:`get_mirroring` **(** **)** const | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_motion_scale` **(** **)** const | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_mirroring` **(** :ref:`Vector2` mirror **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_motion_scale` **(** :ref:`Vector2` scale **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ ++--------------------------------+--------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_mirroring` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_motion_offset` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_motion_scale` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mirroring` **(** :ref:`Vector2` mirror **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_motion_offset` **(** :ref:`Vector2` offset **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_motion_scale` **(** :ref:`Vector2` scale **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -42,6 +46,10 @@ Member Function Description Return the mirroring of the ParallaxLayer. +.. _class_ParallaxLayer_get_motion_offset: + +- :ref:`Vector2` **get_motion_offset** **(** **)** const + .. _class_ParallaxLayer_get_motion_scale: - :ref:`Vector2` **get_motion_scale** **(** **)** const @@ -54,6 +62,10 @@ Return the motion scale of the ParallaxLayer. Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring. +.. _class_ParallaxLayer_set_motion_offset: + +- void **set_motion_offset** **(** :ref:`Vector2` offset **)** + .. _class_ParallaxLayer_set_motion_scale: - void **set_motion_scale** **(** :ref:`Vector2` scale **)** diff --git a/classes/class_patch9frame.rst b/classes/class_patch9frame.rst index dd613706c..f78046ebc 100644 --- a/classes/class_patch9frame.rst +++ b/classes/class_patch9frame.rst @@ -25,6 +25,8 @@ Member Functions +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_patch_margin` **(** :ref:`int` margin **)** const | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_region_rect` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_texture` **(** **)** const | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_draw_center` **(** :ref:`bool` draw_center **)** | @@ -33,9 +35,16 @@ Member Functions +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_patch_margin` **(** :ref:`int` margin, :ref:`int` value **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_region_rect` **(** :ref:`Rect2` rect **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_texture` **(** :ref:`Object` texture **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +Signals +------- + +- **texture_changed** **(** **)** + Member Function Description --------------------------- @@ -51,6 +60,10 @@ Member Function Description - :ref:`int` **get_patch_margin** **(** :ref:`int` margin **)** const +.. _class_Patch9Frame_get_region_rect: + +- :ref:`Rect2` **get_region_rect** **(** **)** const + .. _class_Patch9Frame_get_texture: - :ref:`Object` **get_texture** **(** **)** const @@ -67,6 +80,10 @@ Member Function Description - void **set_patch_margin** **(** :ref:`int` margin, :ref:`int` value **)** +.. _class_Patch9Frame_set_region_rect: + +- void **set_region_rect** **(** :ref:`Rect2` rect **)** + .. _class_Patch9Frame_set_texture: - void **set_texture** **(** :ref:`Object` texture **)** diff --git a/classes/class_physics2ddirectbodystate.rst b/classes/class_physics2ddirectbodystate.rst index a11351e1a..730b3f240 100644 --- a/classes/class_physics2ddirectbodystate.rst +++ b/classes/class_physics2ddirectbodystate.rst @@ -33,7 +33,7 @@ Member Functions +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_contact_collider_shape` **(** :ref:`int` contact_idx **)** const | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`get_contact_collider_shape_metadata` **(** :ref:`int` contact_idx **)** const | +| :ref:`Variant` | :ref:`get_contact_collider_shape_metadata` **(** :ref:`int` contact_idx **)** const | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_contact_collider_velocity_at_pos` **(** :ref:`int` contact_idx **)** const | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -122,7 +122,7 @@ Return the collider shape index. .. _class_Physics2DDirectBodyState_get_contact_collider_shape_metadata: -- Variant **get_contact_collider_shape_metadata** **(** :ref:`int` contact_idx **)** const +- :ref:`Variant` **get_contact_collider_shape_metadata** **(** :ref:`int` contact_idx **)** const Return the metadata of the collided shape. This metadata is different from :ref:`Object.get_meta`, and is set with :ref:`Physics2DServer.shape_set_data`. diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst index c69bb7d27..0ee027c5b 100644 --- a/classes/class_physics2dserver.rst +++ b/classes/class_physics2dserver.rst @@ -21,7 +21,7 @@ Member Functions ---------------- +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** | +| void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Matrix32` transform=((1, 0), (0, 1), (0, 0)) **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`area_attach_object_instance_ID` **(** :ref:`RID` area, :ref:`int` id **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -53,7 +53,7 @@ Member Functions +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`int` param, var value **)** | +| void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`int` param, :ref:`Variant` value **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -67,7 +67,9 @@ Member Functions +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** | +| void | :ref:`body_add_force` **(** :ref:`RID` body, :ref:`Vector2` offset, :ref:`Vector2` force **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Matrix32` transform=((1, 0), (0, 1), (0, 0)) **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector2` pos, :ref:`Vector2` impulse **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -121,7 +123,7 @@ Member Functions +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_continuous_collision_detection_mode` **(** :ref:`RID` body, :ref:`int` mode **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, var userdata=NULL **)** | +| void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, :ref:`Variant` userdata=NULL **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_layer_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -141,13 +143,13 @@ Member Functions +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_shape_as_trigger` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape_metadata` **(** :ref:`RID` body, :ref:`int` shape_idx, var metadata **)** | +| void | :ref:`body_set_shape_metadata` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Variant` metadata **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Matrix32` transform **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`int` state, var value **)** | +| void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`int` state, :ref:`Variant` value **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`body_test_motion` **(** :ref:`RID` body, :ref:`Vector2` motion, :ref:`float` margin=0.08, :ref:`Physics2DTestMotionResult` result=NULL **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -179,7 +181,7 @@ Member Functions +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** const | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_set_data` **(** :ref:`RID` shape, var data **)** | +| void | :ref:`shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`space_create` **(** **)** | +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -232,10 +234,11 @@ Numeric Constants - **BODY_PARAM_BOUNCE** = **0** --- Constant to set/get a body's bounce factor. - **BODY_PARAM_FRICTION** = **1** --- Constant to set/get a body's friction. - **BODY_PARAM_MASS** = **2** --- Constant to set/get a body's mass. -- **BODY_PARAM_GRAVITY_SCALE** = **3** --- Constant to set/get a body's gravity multiplier. -- **BODY_PARAM_LINEAR_DAMP** = **4** --- Constant to set/get a body's linear dampening factor. -- **BODY_PARAM_ANGULAR_DAMP** = **5** --- Constant to set/get a body's angular dampening factor. -- **BODY_PARAM_MAX** = **6** --- This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. +- **BODY_PARAM_INERTIA** = **3** --- Constant to set/get a body's inertia. +- **BODY_PARAM_GRAVITY_SCALE** = **4** --- Constant to set/get a body's gravity multiplier. +- **BODY_PARAM_LINEAR_DAMP** = **5** --- Constant to set/get a body's linear dampening factor. +- **BODY_PARAM_ANGULAR_DAMP** = **6** --- Constant to set/get a body's angular dampening factor. +- **BODY_PARAM_MAX** = **7** --- This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. - **BODY_STATE_TRANSFORM** = **0** --- Constant to set/get the current transform matrix of the body. - **BODY_STATE_LINEAR_VELOCITY** = **1** --- Constant to set/get the current linear velocity of the body. - **BODY_STATE_ANGULAR_VELOCITY** = **2** --- Constant to set/get the current angular velocity of the body. @@ -266,7 +269,7 @@ Member Function Description .. _class_Physics2DServer_area_add_shape: -- void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** +- void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Matrix32` transform=((1, 0), (0, 1), (0, 0)) **)** Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. @@ -372,7 +375,7 @@ Set the function to call when any body/area enters or exits the area. This callb .. _class_Physics2DServer_area_set_param: -- void **area_set_param** **(** :ref:`RID` area, :ref:`int` param, var value **)** +- void **area_set_param** **(** :ref:`RID` area, :ref:`int` param, :ref:`Variant` value **)** Set the value for an area parameter. A list of available parameters is on the AREA_PARAM\_\* constants. @@ -412,9 +415,15 @@ Set the transform matrix for an area. Add a body to the list of bodies exempt from collisions. +.. _class_Physics2DServer_body_add_force: + +- void **body_add_force** **(** :ref:`RID` body, :ref:`Vector2` offset, :ref:`Vector2` force **)** + +Add a positioned force to the applied force and torque. As with :ref:`body_apply_impulse`, both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. + .. _class_Physics2DServer_body_add_shape: -- void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** +- void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Matrix32` transform=((1, 0), (0, 1), (0, 0)) **)** Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. @@ -578,7 +587,7 @@ Continuous collision detection tries to predict where a moving body will collide .. _class_Physics2DServer_body_set_force_integration_callback: -- void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, var userdata=NULL **)** +- void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, :ref:`Variant` userdata=NULL **)** Set the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force integration`). @@ -638,7 +647,7 @@ Mark a body's shape as a trigger. A trigger shape cannot affect other bodies, bu .. _class_Physics2DServer_body_set_shape_metadata: -- void **body_set_shape_metadata** **(** :ref:`RID` body, :ref:`int` shape_idx, var metadata **)** +- void **body_set_shape_metadata** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Variant` metadata **)** Set metadata of a shape within a body. This metadata is different from :ref:`Object.set_meta`, and can be retrieved on shape queries. @@ -656,7 +665,7 @@ Assign a space to the body (see :ref:`create_space` body, :ref:`int` state, var value **)** +- void **body_set_state** **(** :ref:`RID` body, :ref:`int` state, :ref:`Variant` value **)** Set a body state (see BODY_STATE\* constants). @@ -752,7 +761,7 @@ Return the type of shape (see SHAPE\_\* constants). .. _class_Physics2DServer_shape_set_data: -- void **shape_set_data** **(** :ref:`RID` shape, var data **)** +- void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created :ref:`shape_get_type`. diff --git a/classes/class_physicsbody.rst b/classes/class_physicsbody.rst index 4664f1196..bf738670c 100644 --- a/classes/class_physicsbody.rst +++ b/classes/class_physicsbody.rst @@ -20,15 +20,27 @@ Base class for different types of Physics bodies. Member Functions ---------------- -+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_collision_exception_with` **(** :ref:`PhysicsBody` body **)** | -+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | -+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_collision_exception_with` **(** :ref:`PhysicsBody` body **)** | -+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_layer_mask` **(** :ref:`int` mask **)** | -+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_collision_exception_with` **(** :ref:`PhysicsBody` body **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_layer_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_collision_exception_with` **(** :ref:`PhysicsBody` body **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask` **(** :ref:`int` mask **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` mask **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -42,16 +54,40 @@ Member Function Description - void **add_collision_exception_with** **(** :ref:`PhysicsBody` body **)** +.. _class_PhysicsBody_get_collision_mask: + +- :ref:`int` **get_collision_mask** **(** **)** const + +.. _class_PhysicsBody_get_collision_mask_bit: + +- :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const + .. _class_PhysicsBody_get_layer_mask: - :ref:`int` **get_layer_mask** **(** **)** const +.. _class_PhysicsBody_get_layer_mask_bit: + +- :ref:`bool` **get_layer_mask_bit** **(** :ref:`int` bit **)** const + .. _class_PhysicsBody_remove_collision_exception_with: - void **remove_collision_exception_with** **(** :ref:`PhysicsBody` body **)** +.. _class_PhysicsBody_set_collision_mask: + +- void **set_collision_mask** **(** :ref:`int` mask **)** + +.. _class_PhysicsBody_set_collision_mask_bit: + +- void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** + .. _class_PhysicsBody_set_layer_mask: - void **set_layer_mask** **(** :ref:`int` mask **)** +.. _class_PhysicsBody_set_layer_mask_bit: + +- void **set_layer_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** + diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index c13a00219..276cedab7 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -20,197 +20,209 @@ Brief Description Member Functions ---------------- -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform` transform=Transform() **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_attach_object_instance_ID` **(** :ref:`RID` area, :ref:`int` id **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_clear_shapes` **(** :ref:`RID` area **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_create` **(** **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_object_instance_ID` **(** :ref:`RID` area **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_get_param` **(** :ref:`RID` area, :ref:`int` param **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_shape_count` **(** :ref:`RID` area **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform` | :ref:`area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`area_get_space` **(** :ref:`RID` area **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`area_get_space_override_mode` **(** :ref:`RID` area **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform` | :ref:`area_get_transform` **(** :ref:`RID` area **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`area_is_ray_pickable` **(** :ref:`RID` area **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`int` param, var value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform` transform **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_space_override_mode` **(** :ref:`RID` area, :ref:`int` mode **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`area_set_transform` **(** :ref:`RID` area, :ref:`Transform` transform **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform` transform=Transform() **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` pos, :ref:`Vector3` impulse **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_attach_object_instance_ID` **(** :ref:`RID` body, :ref:`int` id **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_clear_shapes` **(** :ref:`RID` body **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_create` **(** :ref:`int` mode=2, :ref:`bool` init_sleeping=false **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_axis_lock` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_max_contacts_reported` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_mode` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_object_instance_ID` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`body_get_param` **(** :ref:`RID` body, :ref:`int` param **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`body_get_shape_count` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform` | :ref:`body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`body_get_space` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_get_state` **(** :ref:`RID` body, :ref:`int` state **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_is_omitting_force_integration` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`body_is_ray_pickable` **(** :ref:`RID` body **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_axis_lock` **(** :ref:`RID` body, :ref:`int` axis **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, var userdata=NULL **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_mode` **(** :ref:`RID` body, :ref:`int` mode **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_param` **(** :ref:`RID` body, :ref:`int` param, :ref:`float` value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform` transform **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`int` state, var value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`generic_6dof_joint_get_flag` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`generic_6dof_joint_get_param` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generic_6dof_joint_set_flag` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag, :ref:`bool` enable **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generic_6dof_joint_set_param` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param, :ref:`float` value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_process_info` **(** :ref:`int` process_info **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`int` flag **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`int` flag, :ref:`bool` enabled **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`joint_create_cone_twist` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`joint_create_generic_6dof` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`joint_create_hinge` **(** :ref:`RID` body_A, :ref:`Transform` hinge_A, :ref:`RID` body_B, :ref:`Transform` hinge_B **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`joint_create_pin` **(** :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`joint_create_slider` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`joint_get_solver_priority` **(** :ref:`RID` joint **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`pin_joint_get_local_A` **(** :ref:`RID` joint **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`pin_joint_get_local_B` **(** :ref:`RID` joint **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`pin_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pin_joint_set_local_A` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pin_joint_set_local_B` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pin_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_active` **(** :ref:`bool` active **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`shape_create` **(** :ref:`int` type **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_get_data` **(** :ref:`RID` shape **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`shape_set_data` **(** :ref:`RID` shape, var data **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`slider_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`slider_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`space_create` **(** **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PhysicsDirectSpaceState` | :ref:`space_get_direct_state` **(** :ref:`RID` space **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`space_get_param` **(** :ref:`RID` space, :ref:`int` param **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`space_is_active` **(** :ref:`RID` space **)** const | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`space_set_param` **(** :ref:`RID` space, :ref:`int` param, :ref:`float` value **)** | -+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform` transform=Transform() **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_attach_object_instance_ID` **(** :ref:`RID` area, :ref:`int` id **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_clear_shapes` **(** :ref:`RID` area **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_create` **(** **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_object_instance_ID` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_get_param` **(** :ref:`RID` area, :ref:`int` param **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_shape_count` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_get_space` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_space_override_mode` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`area_get_transform` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`area_is_ray_pickable` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_layer_mask` **(** :ref:`RID` area, :ref:`int` mask **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`int` param, :ref:`Variant` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform` transform **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_space_override_mode` **(** :ref:`RID` area, :ref:`int` mode **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_transform` **(** :ref:`RID` area, :ref:`Transform` transform **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform` transform=Transform() **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` pos, :ref:`Vector3` impulse **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_attach_object_instance_ID` **(** :ref:`RID` body, :ref:`int` id **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_clear_shapes` **(** :ref:`RID` body **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_create` **(** :ref:`int` mode=2, :ref:`bool` init_sleeping=false **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_axis_lock` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_collision_mask` **(** :ref:`RID` body, :ref:`int` arg1 **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_layer_mask` **(** :ref:`RID` body, :ref:`int` arg1 **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_max_contacts_reported` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_mode` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_object_instance_ID` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`body_get_param` **(** :ref:`RID` body, :ref:`int` param **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_shape_count` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_get_space` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_get_state` **(** :ref:`RID` body, :ref:`int` state **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_is_omitting_force_integration` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_is_ray_pickable` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_axis_lock` **(** :ref:`RID` body, :ref:`int` axis **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, :ref:`Variant` userdata=NULL **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_layer_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_mode` **(** :ref:`RID` body, :ref:`int` mode **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_param` **(** :ref:`RID` body, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform` transform **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`int` state, :ref:`Variant` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`generic_6dof_joint_get_flag` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`generic_6dof_joint_get_param` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`generic_6dof_joint_set_flag` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag, :ref:`bool` enable **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`generic_6dof_joint_set_param` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_process_info` **(** :ref:`int` process_info **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`int` flag **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`int` flag, :ref:`bool` enabled **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_cone_twist` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_generic_6dof` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_hinge` **(** :ref:`RID` body_A, :ref:`Transform` hinge_A, :ref:`RID` body_B, :ref:`Transform` hinge_B **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_pin` **(** :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_slider` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`joint_get_solver_priority` **(** :ref:`RID` joint **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`pin_joint_get_local_A` **(** :ref:`RID` joint **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`pin_joint_get_local_B` **(** :ref:`RID` joint **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`pin_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pin_joint_set_local_A` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pin_joint_set_local_B` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pin_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_active` **(** :ref:`bool` active **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shape_create` **(** :ref:`int` type **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_get_data` **(** :ref:`RID` shape **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`slider_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`slider_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`space_create` **(** **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsDirectSpaceState` | :ref:`space_get_direct_state` **(** :ref:`RID` space **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`space_get_param` **(** :ref:`RID` space, :ref:`int` param **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`space_is_active` **(** :ref:`RID` space **)** const | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`space_set_param` **(** :ref:`RID` space, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -381,13 +393,21 @@ Member Function Description - void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** +.. _class_PhysicsServer_area_set_collision_mask: + +- void **area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** + +.. _class_PhysicsServer_area_set_layer_mask: + +- void **area_set_layer_mask** **(** :ref:`RID` area, :ref:`int` mask **)** + .. _class_PhysicsServer_area_set_monitor_callback: - void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** .. _class_PhysicsServer_area_set_param: -- void **area_set_param** **(** :ref:`RID` area, :ref:`int` param, var value **)** +- void **area_set_param** **(** :ref:`RID` area, :ref:`int` param, :ref:`Variant` value **)** .. _class_PhysicsServer_area_set_ray_pickable: @@ -441,6 +461,14 @@ Member Function Description - :ref:`int` **body_get_axis_lock** **(** :ref:`RID` body **)** const +.. _class_PhysicsServer_body_get_collision_mask: + +- :ref:`int` **body_get_collision_mask** **(** :ref:`RID` body, :ref:`int` arg1 **)** const + +.. _class_PhysicsServer_body_get_layer_mask: + +- :ref:`int` **body_get_layer_mask** **(** :ref:`RID` body, :ref:`int` arg1 **)** const + .. _class_PhysicsServer_body_get_max_contacts_reported: - :ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** const @@ -505,13 +533,21 @@ Member Function Description - void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** +.. _class_PhysicsServer_body_set_collision_mask: + +- void **body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** + .. _class_PhysicsServer_body_set_enable_continuous_collision_detection: - void **body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`bool` enable **)** .. _class_PhysicsServer_body_set_force_integration_callback: -- void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, var userdata=NULL **)** +- void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, :ref:`Variant` userdata=NULL **)** + +.. _class_PhysicsServer_body_set_layer_mask: + +- void **body_set_layer_mask** **(** :ref:`RID` body, :ref:`int` mask **)** .. _class_PhysicsServer_body_set_max_contacts_reported: @@ -547,7 +583,7 @@ Member Function Description .. _class_PhysicsServer_body_set_state: -- void **body_set_state** **(** :ref:`RID` body, :ref:`int` state, var value **)** +- void **body_set_state** **(** :ref:`RID` body, :ref:`int` state, :ref:`Variant` value **)** .. _class_PhysicsServer_cone_twist_joint_get_param: @@ -671,7 +707,7 @@ Member Function Description .. _class_PhysicsServer_shape_set_data: -- void **shape_set_data** **(** :ref:`RID` shape, var data **)** +- void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** .. _class_PhysicsServer_slider_joint_get_param: diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 9fca56121..bd91abd60 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -18,47 +18,51 @@ Brief Description Member Functions ---------------- -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_color` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_invert` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_invert_border` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2Array` | :ref:`get_polygon` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_texture` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_texture_offset` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_texture_rotation` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_texture_scale` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2Array` | :ref:`get_uv` **(** **)** const | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_color` **(** :ref:`Color` color **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_invert` **(** :ref:`bool` invert **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_invert_border` **(** :ref:`float` invert_border **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_polygon` **(** :ref:`Vector2Array` polygon **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture_offset` **(** :ref:`Vector2` texture_offset **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture_rotation` **(** :ref:`float` texture_rotation **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture_scale` **(** :ref:`Vector2` texture_scale **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_uv` **(** :ref:`Vector2Array` uv **)** | -+------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_invert` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_invert_border` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_polygon` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_texture` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_texture_offset` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_texture_rotation` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_texture_scale` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_uv` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ColorArray` | :ref:`get_vertex_colors` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`Color` color **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_invert` **(** :ref:`bool` invert **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_invert_border` **(** :ref:`float` invert_border **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_polygon` **(** :ref:`Vector2Array` polygon **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_offset` **(** :ref:`Vector2` texture_offset **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_rotation` **(** :ref:`float` texture_rotation **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_scale` **(** :ref:`Vector2` texture_scale **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_uv` **(** :ref:`Vector2Array` uv **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_colors` **(** :ref:`ColorArray` vertex_colors **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -128,6 +132,12 @@ Return the uv coordinate multiplier. Return the texture coordinates associated with every vertex of the polygon. +.. _class_Polygon2D_get_vertex_colors: + +- :ref:`ColorArray` **get_vertex_colors** **(** **)** const + +Return the list of vertex colors. + .. _class_Polygon2D_set_color: - void **set_color** **(** :ref:`Color` color **)** @@ -188,4 +198,12 @@ Set the value that will multiply the uv coordinates (:ref:`get_uv` vertex_colors **)** + +Set the color for each vertex of the polygon. There should be one color for every vertex in the polygon. If there are less, the undefined ones will be assumed to be :ref:`get_color`. Extra color entries are ignored. + +Colors are interpolated between vertices, resulting in smooth gradients when they differ. + diff --git a/classes/class_popup.rst b/classes/class_popup.rst index ef90e7076..0baafb9bf 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -20,19 +20,19 @@ Base container control for popups and dialogs. Member Functions ---------------- -+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_exclusive` **(** **)** const | -+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup` **(** **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup_centered` **(** :ref:`Vector2` size=Vector2(0,0) **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup_centered_minsize` **(** :ref:`Vector2` minsize=Vector2(0,0) **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.75 **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_exclusive` **(** :ref:`bool` enable **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_exclusive` **(** **)** const | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup_centered` **(** :ref:`Vector2` size=Vector2((0, 0)) **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup_centered_minsize` **(** :ref:`Vector2` minsize=Vector2((0, 0)) **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.75 **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_exclusive` **(** :ref:`bool` enable **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -68,13 +68,13 @@ Popup (show the control in modal form). .. _class_Popup_popup_centered: -- void **popup_centered** **(** :ref:`Vector2` size=Vector2(0,0) **)** +- void **popup_centered** **(** :ref:`Vector2` size=Vector2((0, 0)) **)** Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size". .. _class_Popup_popup_centered_minsize: -- void **popup_centered_minsize** **(** :ref:`Vector2` minsize=Vector2(0,0) **)** +- 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``. diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index fac889a23..6707d2fa8 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -18,67 +18,79 @@ PopupMenu displays a list of options. Member Functions ---------------- -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_check_item` **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_item` **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_separator` **(** **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_submenu_item` **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_ID` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_accelerator` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_count` **(** **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_submenu` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_checkable` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_checked` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` idx **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` idx **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_ID` **(** :ref:`int` idx, :ref:`int` id **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_accelerator` **(** :ref:`int` idx, :ref:`int` accel **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_as_checkable` **(** :ref:`int` idx, :ref:`bool` enable **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_as_separator` **(** :ref:`int` idx, :ref:`bool` enable **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_checked` **(** :ref:`int` idx, :ref:`bool` checked **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Object` icon **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_submenu` **(** :ref:`int` idx, :ref:`String` submenu **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_check_shortcut` **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_check_item` **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_check_shortcut` **(** :ref:`Object` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_item` **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_shortcut` **(** :ref:`Object` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_separator` **(** **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_shortcut` **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_submenu_item` **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_ID` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_accelerator` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_count` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ShortCut` | :ref:`get_item_shortcut` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_submenu` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_checkable` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_checked` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` idx **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_ID` **(** :ref:`int` idx, :ref:`int` id **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_accelerator` **(** :ref:`int` idx, :ref:`int` accel **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_as_checkable` **(** :ref:`int` idx, :ref:`bool` enable **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_as_separator` **(** :ref:`int` idx, :ref:`bool` enable **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_checked` **(** :ref:`int` idx, :ref:`bool` checked **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Object` icon **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_shortcut` **(** :ref:`int` idx, :ref:`ShortCut` shortcut **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_submenu` **(** :ref:`int` idx, :ref:`String` submenu **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -99,18 +111,30 @@ Member Function Description Add a new checkable 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. 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_shortcut: + +- void **add_check_shortcut** **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1 **)** + .. _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 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_icon_check_shortcut: + +- void **add_icon_check_shortcut** **(** :ref:`Object` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1 **)** + .. _class_PopupMenu_add_icon_item: - 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 keybinding. If no id is provided, one will be created from the index. +.. _class_PopupMenu_add_icon_shortcut: + +- void **add_icon_shortcut** **(** :ref:`Object` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1 **)** + .. _class_PopupMenu_add_item: - void **add_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** @@ -123,6 +147,10 @@ Add a new item with text "label". An id can optionally be provided, as well as a Add a separator between items. Separators also occupy an index. +.. _class_PopupMenu_add_shortcut: + +- void **add_shortcut** **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1 **)** + .. _class_PopupMenu_add_submenu_item: - void **add_submenu_item** **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** @@ -171,6 +199,10 @@ Find and return the index of the item containing a given id. 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_shortcut: + +- :ref:`ShortCut` **get_item_shortcut** **(** :ref:`int` idx **)** const + .. _class_PopupMenu_get_item_submenu: - :ref:`String` **get_item_submenu** **(** :ref:`int` idx **)** const @@ -257,10 +289,14 @@ Set the icon of the item at index "idx". .. _class_PopupMenu_set_item_metadata: -- void **set_item_metadata** **(** :ref:`int` idx, var metadata **)** +- void **set_item_metadata** **(** :ref:`int` idx, :ref:`Variant` 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_shortcut: + +- void **set_item_shortcut** **(** :ref:`int` idx, :ref:`ShortCut` shortcut **)** + .. _class_PopupMenu_set_item_submenu: - void **set_item_submenu** **(** :ref:`int` idx, :ref:`String` submenu **)** diff --git a/classes/class_proximitygroup.rst b/classes/class_proximitygroup.rst index 86eeded10..d6f96f4a9 100644 --- a/classes/class_proximitygroup.rst +++ b/classes/class_proximitygroup.rst @@ -18,17 +18,17 @@ General purpose proximity-detection node. Member Functions ---------------- -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| void | :ref:`broadcast` **(** :ref:`String` name, var parameters **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_grid_radius` **(** **)** const | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_dispatch_mode` **(** :ref:`int` mode **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_grid_radius` **(** :ref:`Vector3` radius **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_group_name` **(** :ref:`String` name **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------+ ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`broadcast` **(** :ref:`String` name, :ref:`Variant` parameters **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_grid_radius` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_dispatch_mode` **(** :ref:`int` mode **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_grid_radius` **(** :ref:`Vector3` radius **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_group_name` **(** :ref:`String` name **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -45,7 +45,7 @@ Member Function Description .. _class_ProximityGroup_broadcast: -- void **broadcast** **(** :ref:`String` name, var parameters **)** +- void **broadcast** **(** :ref:`String` name, :ref:`Variant` parameters **)** .. _class_ProximityGroup_get_grid_radius: diff --git a/classes/class_rawarray.rst b/classes/class_rawarray.rst index 0afbcf29a..5f07693e2 100644 --- a/classes/class_rawarray.rst +++ b/classes/class_rawarray.rst @@ -16,21 +16,31 @@ Raw byte array. Member Functions ---------------- -+----------------------------------+----------------------------------------------------------------------------------------------------+ -| :ref:`RawArray` | :ref:`RawArray` **(** :ref:`Array` from **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string_from_ascii` **(** **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string_from_utf8` **(** **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------+ -| void | :ref:`push_back` **(** :ref:`int` byte **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` idx **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` idx, :ref:`int` byte **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------+ ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`RawArray` **(** :ref:`Array` from **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`append` **(** :ref:`int` byte **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_array` **(** :ref:`RawArray` array **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_string_from_ascii` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_string_from_utf8` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`int` byte **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`invert` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`int` byte **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove` **(** :ref:`int` idx **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`int` byte **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------+ Description ----------- @@ -46,6 +56,16 @@ Member Function Description Create from a generic array. +.. _class_RawArray_append: + +- void **append** **(** :ref:`int` byte **)** + +.. _class_RawArray_append_array: + +- void **append_array** **(** :ref:`RawArray` array **)** + +Append an :ref:`RawArray` at the end of this array. + .. _class_RawArray_get_string_from_ascii: - :ref:`String` **get_string_from_ascii** **(** **)** @@ -58,12 +78,30 @@ Returns a copy of the array's contents formatted as String. Fast alternative to Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input. +.. _class_RawArray_insert: + +- :ref:`int` **insert** **(** :ref:`int` idx, :ref:`int` byte **)** + +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + +.. _class_RawArray_invert: + +- void **invert** **(** **)** + +Reverse the order of the elements in the array (so first element will now be the last). + .. _class_RawArray_push_back: - void **push_back** **(** :ref:`int` byte **)** Append an element at the end of the array. +.. _class_RawArray_remove: + +- void **remove** **(** :ref:`int` idx **)** + +Remove an element from the array by index. + .. _class_RawArray_resize: - void **resize** **(** :ref:`int` idx **)** diff --git a/classes/class_raycast.rst b/classes/class_raycast.rst index fad2e2e45..10c622d14 100644 --- a/classes/class_raycast.rst +++ b/classes/class_raycast.rst @@ -35,6 +35,10 @@ Member Functions +--------------------------------+---------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_collision_point` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_type_mask` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_colliding` **(** **)** const | +--------------------------------+---------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_enabled` **(** **)** const | @@ -47,6 +51,10 @@ Member Functions +--------------------------------+---------------------------------------------------------------------------------------------------------+ | void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | +--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` mask **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_type_mask` **(** :ref:`int` mask **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- @@ -83,6 +91,16 @@ Member Function Description - :ref:`Vector3` **get_collision_point** **(** **)** const +Returns collision point. This point is in **global** coordinate system. + +.. _class_RayCast_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + +.. _class_RayCast_get_type_mask: + +- :ref:`int` **get_type_mask** **(** **)** const + .. _class_RayCast_is_colliding: - :ref:`bool` **is_colliding** **(** **)** const @@ -103,8 +121,18 @@ Member Function Description - void **set_cast_to** **(** :ref:`Vector3` local_point **)** +Sets to which point ray should be casted. This point is in **local** coordinate system. + .. _class_RayCast_set_enabled: - void **set_enabled** **(** :ref:`bool` enabled **)** +.. _class_RayCast_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` mask **)** + +.. _class_RayCast_set_type_mask: + +- void **set_type_mask** **(** :ref:`int` mask **)** + diff --git a/classes/class_realarray.rst b/classes/class_realarray.rst index 713b57aba..544500b8d 100644 --- a/classes/class_realarray.rst +++ b/classes/class_realarray.rst @@ -16,17 +16,27 @@ Real Array . Member Functions ---------------- -+------------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`RealArray` | :ref:`RealArray` **(** :ref:`Array` from **)** | -+------------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_back` **(** :ref:`float` value **)** | -+------------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` idx **)** | -+------------------------------------+----------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` idx, :ref:`float` value **)** | -+------------------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** | -+------------------------------------+----------------------------------------------------------------------------------------------------------+ ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`RealArray` | :ref:`RealArray` **(** :ref:`Array` from **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append` **(** :ref:`float` value **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_array` **(** :ref:`RealArray` array **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`float` value **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invert` **(** **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`float` value **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove` **(** :ref:`int` idx **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`float` value **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -42,12 +52,42 @@ Member Function Description Create from a generic array. +.. _class_RealArray_append: + +- void **append** **(** :ref:`float` value **)** + +Append an element at the end of the array (alias of :ref:`push_back`). + +.. _class_RealArray_append_array: + +- void **append_array** **(** :ref:`RealArray` array **)** + +Append an :ref:`RealArray` at the end of this array. + +.. _class_RealArray_insert: + +- :ref:`int` **insert** **(** :ref:`int` idx, :ref:`float` value **)** + +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + +.. _class_RealArray_invert: + +- void **invert** **(** **)** + +Reverse the order of the elements in the array (so first element will now be the last). + .. _class_RealArray_push_back: - void **push_back** **(** :ref:`float` value **)** Append an element at the end of the array. +.. _class_RealArray_remove: + +- void **remove** **(** :ref:`int` idx **)** + +Remove an element from the array by index. + .. _class_RealArray_resize: - void **resize** **(** :ref:`int` idx **)** diff --git a/classes/class_reference.rst b/classes/class_reference.rst index 822b8d48f..f19723b7e 100644 --- a/classes/class_reference.rst +++ b/classes/class_reference.rst @@ -8,7 +8,7 @@ Reference **Inherits:** :ref:`Object` -**Inherited By:** :ref:`RegEx`, :ref:`SurfaceTool`, :ref:`EditorScenePostImport`, :ref:`PhysicsShapeQueryResult`, :ref:`Physics2DTestMotionResult`, :ref:`FuncRef`, :ref:`File`, :ref:`TCP_Server`, :ref:`Physics2DShapeQueryResult`, :ref:`ConfigFile`, :ref:`StreamPeer`, :ref:`HTTPClient`, :ref:`AudioStreamPlayback`, :ref:`MeshDataTool`, :ref:`GDFunctionState`, :ref:`Physics2DShapeQueryParameters`, :ref:`EditorScript`, :ref:`Mutex`, :ref:`PacketPeer`, :ref:`Semaphore`, :ref:`XMLParser`, :ref:`EditorImportPlugin`, :ref:`Directory`, :ref:`Marshalls`, :ref:`WeakRef`, :ref:`SceneState`, :ref:`GDNativeClass`, :ref:`PCKPacker`, :ref:`Resource`, :ref:`Thread`, :ref:`PackedDataContainerRef`, :ref:`ResourceInteractiveLoader`, :ref:`ResourceImportMetadata`, :ref:`PhysicsShapeQueryParameters` +**Inherited By:** :ref:`RegEx`, :ref:`SurfaceTool`, :ref:`SpatialGizmo`, :ref:`EditorScenePostImport`, :ref:`PhysicsShapeQueryResult`, :ref:`Physics2DTestMotionResult`, :ref:`FuncRef`, :ref:`File`, :ref:`TCP_Server`, :ref:`Physics2DShapeQueryResult`, :ref:`ConfigFile`, :ref:`StreamPeer`, :ref:`HTTPClient`, :ref:`AudioStreamPlayback`, :ref:`Physics2DShapeQueryParameters`, :ref:`MeshDataTool`, :ref:`GDFunctionState`, :ref:`EditorExportPlugin`, :ref:`EditorScript`, :ref:`Mutex`, :ref:`PacketPeer`, :ref:`Semaphore`, :ref:`XMLParser`, :ref:`EditorImportPlugin`, :ref:`Directory`, :ref:`Marshalls`, :ref:`WeakRef`, :ref:`SceneState`, :ref:`GDNativeClass`, :ref:`PCKPacker`, :ref:`Resource`, :ref:`Thread`, :ref:`PackedDataContainerRef`, :ref:`ResourceInteractiveLoader`, :ref:`ResourceImportMetadata`, :ref:`PhysicsShapeQueryParameters` **Category:** Core diff --git a/classes/class_regex.rst b/classes/class_regex.rst index af2e80b48..7c969861c 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -39,41 +39,51 @@ Member Functions Description ----------- -Class for finding text patterns in a string using regular expressions. Regular expressions are a way to define patterns of text to be searched. +Class for finding text patterns in a string using regular expressions. It can not perform replacements. Regular expressions are a way to define patterns of text to be searched. Details on writing patterns are too long to explain here but the Internet is full of tutorials and detailed explanations. -This class only finds patterns in a string. It can not perform replacements. +Once created, the RegEx object needs to be compiled with the pattern before it can be used. The pattern must be escaped first for gdscript before it is escaped for the expression. For example: -Usage of regular expressions is too long to be explained here, but Internet is full of tutorials and detailed explanations. +``var exp = RegEx.new()`` + +``exp.compile("\\d+")`` + +would be read by RegEx as ``\d+`` + +Similarly: + +``exp.compile("\"(?:\\\\.|:ref:`^\"`)\*\"")`` + +would be read as ``"(?:\\.|:ref:`^"`)\*"`` Currently supported features: -Capturing ``()`` and non-capturing ``(?:)`` groups +\* Capturing ``()`` and non-capturing ``(?:)`` groups -Any character ``.`` +\* Any character ``.`` -Shorthand character classes ``\w \W \s \S \d \D`` +\* Shorthand character classes ``\w \W \s \S \d \D`` -User-defined character classes such as ``:ref:`A-Za-z``` +\* User-defined character classes such as ``:ref:`A-Za-z``` -Simple quantifiers ``?``, ``\*`` and ``+`` +\* Simple quantifiers ``?``, ``\*`` and ``+`` -Range quantifiers ``{x,y}`` +\* Range quantifiers ``{x,y}`` -Lazy (non-greedy) quantifiers ``\*?`` +\* Lazy (non-greedy) quantifiers ``\*?`` -Beginning ``^`` and end ``$`` anchors +\* Beginning ``^`` and end ``$`` anchors -Alternation ``|`` +\* Alternation ``|`` -Backreferences ``\1`` and ``\g{1}`` +\* Backreferences ``\1`` and ``\g{1}`` -POSIX character classes ``:ref:`[:alnum:`]`` +\* POSIX character classes ``:ref:`[:alnum:`]`` -Lookahead ``(?=)``, ``(?!)`` and lookbehind ``(?<=)``, ``(?` **<** :ref:`Object` -**Inherited By:** :ref:`Theme`, :ref:`AudioStream`, :ref:`EventStream`, :ref:`CubeMap`, :ref:`Translation`, :ref:`Curve2D`, :ref:`Shape`, :ref:`Shape2D`, :ref:`BakedLight`, :ref:`ColorRamp`, :ref:`StyleBox`, :ref:`Environment`, :ref:`Material`, :ref:`VideoStream`, :ref:`RoomBounds`, :ref:`PackedScene`, :ref:`Texture`, :ref:`Script`, :ref:`OccluderPolygon2D`, :ref:`Mesh`, :ref:`TileSet`, :ref:`BitMap`, :ref:`Animation`, :ref:`Sample`, :ref:`PolygonPathFinder`, :ref:`Shader`, :ref:`World`, :ref:`SampleLibrary`, :ref:`World2D`, :ref:`Font`, :ref:`SpriteFrames`, :ref:`MeshLibrary`, :ref:`Curve3D`, :ref:`NavigationPolygon`, :ref:`MultiMesh`, :ref:`CanvasItemMaterial`, :ref:`PackedDataContainer`, :ref:`NavigationMesh` +**Inherited By:** :ref:`Theme`, :ref:`AudioStream`, :ref:`EventStream`, :ref:`CubeMap`, :ref:`DynamicFontData`, :ref:`Translation`, :ref:`Curve2D`, :ref:`Shape`, :ref:`Shape2D`, :ref:`Shader`, :ref:`ColorRamp`, :ref:`StyleBox`, :ref:`Environment`, :ref:`Material`, :ref:`VideoStream`, :ref:`RoomBounds`, :ref:`PackedScene`, :ref:`Texture`, :ref:`Script`, :ref:`OccluderPolygon2D`, :ref:`Mesh`, :ref:`TileSet`, :ref:`ShortCut`, :ref:`BitMap`, :ref:`Animation`, :ref:`Sample`, :ref:`PolygonPathFinder`, :ref:`BakedLight`, :ref:`World`, :ref:`SampleLibrary`, :ref:`World2D`, :ref:`Font`, :ref:`SpriteFrames`, :ref:`MeshLibrary`, :ref:`Curve3D`, :ref:`NavigationPolygon`, :ref:`EditorSettings`, :ref:`MultiMesh`, :ref:`CanvasItemMaterial`, :ref:`PackedDataContainer`, :ref:`NavigationMesh` **Category:** Core diff --git a/classes/class_resourceimportmetadata.rst b/classes/class_resourceimportmetadata.rst index 87480aa27..599c3f1d8 100644 --- a/classes/class_resourceimportmetadata.rst +++ b/classes/class_resourceimportmetadata.rst @@ -37,7 +37,9 @@ Member Functions +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_editor` **(** :ref:`String` name **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_option` **(** :ref:`String` key, var value **)** | +| void | :ref:`set_option` **(** :ref:`String` key, :ref:`Variant` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_source_md5` **(** :ref:`int` idx, :ref:`String` md5 **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ Member Function Description @@ -81,6 +83,10 @@ Member Function Description .. _class_ResourceImportMetadata_set_option: -- void **set_option** **(** :ref:`String` key, var value **)** +- void **set_option** **(** :ref:`String` key, :ref:`Variant` value **)** + +.. _class_ResourceImportMetadata_set_source_md5: + +- void **set_source_md5** **(** :ref:`int` idx, :ref:`String` md5 **)** diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index aae30a16d..4959cb9e0 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -27,6 +27,8 @@ Member Functions +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Resource` | :ref:`load` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` p_no_cache=false **)** | +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ResourceImportMetadata` | :ref:`load_import_metadata` **(** :ref:`String` path **)** | ++--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ResourceInteractiveLoader` | :ref:`load_interactive` **(** :ref:`String` path, :ref:`String` type_hint="" **)** | +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_abort_on_missing_resources` **(** :ref:`bool` abort **)** | @@ -58,6 +60,10 @@ Return the list of recognized extensions for a resource type. - :ref:`Resource` **load** **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` p_no_cache=false **)** +.. _class_ResourceLoader_load_import_metadata: + +- :ref:`ResourceImportMetadata` **load_import_metadata** **(** :ref:`String` path **)** + .. _class_ResourceLoader_load_interactive: - :ref:`ResourceInteractiveLoader` **load_interactive** **(** :ref:`String` path, :ref:`String` type_hint="" **)** diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index bfa5eee5e..edd1ff2cb 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -31,6 +31,8 @@ Member Functions +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_size` **(** **)** const | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_total_character_count` **(** **)** const | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_v_scroll` **(** **)** | @@ -65,7 +67,7 @@ Member Functions +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_list` **(** :ref:`int` type **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_meta` **(** var data **)** | +| void | :ref:`push_meta` **(** :ref:`Variant` data **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_table` **(** :ref:`int` columns **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -151,6 +153,12 @@ Member Function Description - :ref:`int` **get_tab_size** **(** **)** const +.. _class_RichTextLabel_get_text: + +- :ref:`String` **get_text** **(** **)** + +Returns the raw text, stripping out the formatting information. + .. _class_RichTextLabel_get_total_character_count: - :ref:`int` **get_total_character_count** **(** **)** const @@ -223,7 +231,7 @@ Return true if selecting the text inside this richtext is allowed. .. _class_RichTextLabel_push_meta: -- void **push_meta** **(** var data **)** +- void **push_meta** **(** :ref:`Variant` data **)** .. _class_RichTextLabel_push_table: diff --git a/classes/class_rid.rst b/classes/class_rid.rst index a1ad6113e..6c879670a 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -11,7 +11,7 @@ RID Brief Description ----------------- - +Handle for a :ref:`Resource`'s unique ID. Member Functions ---------------- @@ -22,6 +22,11 @@ Member Functions | :ref:`int` | :ref:`get_id` **(** **)** | +------------------------+--------------------------------------------------------------------------+ +Description +----------- + +The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`VisualServer`. + Member Function Description --------------------------- @@ -29,8 +34,12 @@ Member Function Description - :ref:`RID` **RID** **(** :ref:`Object` from **)** +Create a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0. + .. _class_RID_get_id: - :ref:`int` **get_id** **(** **)** +Retrieve the ID of the referenced resource. + diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index 55d7f7e58..4451bb3af 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -21,7 +21,9 @@ Member Functions +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_integrate_forces` **(** :ref:`Physics2DDirectBodyState` state **)** virtual | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`apply_impulse` **(** :ref:`Vector2` pos, :ref:`Vector2` impulse **)** | +| void | :ref:`add_force` **(** :ref:`Vector2` offset, :ref:`Vector2` force **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_impulse` **(** :ref:`Vector2` offset, :ref:`Vector2` impulse **)** | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_angular_damp` **(** **)** const | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -29,6 +31,8 @@ Member Functions +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_applied_force` **(** **)** const | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_applied_torque` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_bounce` **(** **)** const | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_colliding_bodies` **(** **)** const | @@ -39,6 +43,8 @@ Member Functions +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_gravity_scale` **(** **)** const | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_inertia` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_linear_damp` **(** **)** const | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_linear_velocity` **(** **)** const | @@ -65,6 +71,8 @@ Member Functions +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_applied_force` **(** :ref:`Vector2` force **)** | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_applied_torque` **(** :ref:`float` torque **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_axis_velocity` **(** :ref:`Vector2` axis_velocity **)** | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bounce` **(** :ref:`float` bounce **)** | @@ -79,6 +87,8 @@ Member Functions +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_gravity_scale` **(** :ref:`float` gravity_scale **)** | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_inertia` **(** :ref:`float` inertia **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_linear_velocity` **(** :ref:`Vector2` linear_velocity **)** | @@ -136,11 +146,17 @@ Member Function Description Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but :ref:`set_use_custom_integrator` allows you to disable the default behavior and do fully custom force integration for a body. +.. _class_RigidBody2D_add_force: + +- void **add_force** **(** :ref:`Vector2` offset, :ref:`Vector2` force **)** + +Add a positioned force to the applied force and torque. As with :ref:`apply_impulse`, both the force and the offset from the body origin are in global coordinates. + .. _class_RigidBody2D_apply_impulse: -- void **apply_impulse** **(** :ref:`Vector2` pos, :ref:`Vector2` impulse **)** +- void **apply_impulse** **(** :ref:`Vector2` offset, :ref:`Vector2` impulse **)** -Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. +Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates. .. _class_RigidBody2D_get_angular_damp: @@ -160,6 +176,12 @@ Return the body angular velocity. This changes by physics granularity. See :ref: Return the applied force vector. +.. _class_RigidBody2D_get_applied_torque: + +- :ref:`float` **get_applied_torque** **(** **)** const + +Return the torque which is being applied to this body. + .. _class_RigidBody2D_get_bounce: - :ref:`float` **get_bounce** **(** **)** const @@ -190,6 +212,12 @@ Return the body friction. Return the gravity factor. +.. _class_RigidBody2D_get_inertia: + +- :ref:`float` **get_inertia** **(** **)** const + +Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a ``_ready`` function: it apparently has not been auto-computed yet. + .. _class_RigidBody2D_get_linear_damp: - :ref:`float` **get_linear_damp** **(** **)** const @@ -268,6 +296,12 @@ Set the body angular velocity. Can be used sporadically, but **DON'T SET THIS IN Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly. +.. _class_RigidBody2D_set_applied_torque: + +- void **set_applied_torque** **(** :ref:`float` torque **)** + +Set a constant torque which will be applied to this body. + .. _class_RigidBody2D_set_axis_velocity: - void **set_axis_velocity** **(** :ref:`Vector2` axis_velocity **)** @@ -314,6 +348,12 @@ Set the body friction, from 0 (frictionless) to 1 (full friction). Set the gravity factor. This factor multiplies gravity intensity just for this body. +.. _class_RigidBody2D_set_inertia: + +- void **set_inertia** **(** :ref:`float` inertia **)** + +Set the body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it. + .. _class_RigidBody2D_set_linear_damp: - void **set_linear_damp** **(** :ref:`float` linear_damp **)** diff --git a/classes/class_sample.rst b/classes/class_sample.rst index f0805ce13..53d8b1687 100644 --- a/classes/class_sample.rst +++ b/classes/class_sample.rst @@ -128,13 +128,7 @@ Return whether the current sample was created as stereo. Set sample data. Data must be little endian, no matter the host platform, and exactly as long as to fit all samples. The length of this array can be calculated as follows: -Get the sample length (:ref:`get_length`). - -If the sample format is FORMAT_PCM16, multiply it by 2. - -If the sample format is FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4. - -If the sample is stereo (:ref:`is_stereo`), multiply it by 2. +Get the sample length (:ref:`get_length`). If the sample format is FORMAT_PCM16, multiply it by 2. If the sample format is FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4. If the sample is stereo (:ref:`is_stereo`), multiply it by 2. .. _class_Sample_set_loop_begin: diff --git a/classes/class_samplelibrary.rst b/classes/class_samplelibrary.rst index b512318d9..2f4333566 100644 --- a/classes/class_samplelibrary.rst +++ b/classes/class_samplelibrary.rst @@ -23,6 +23,8 @@ Member Functions +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Sample` | :ref:`get_sample` **(** :ref:`String` name **)** const | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_sample_list` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_sample` **(** :ref:`String` name **)** const | +------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_sample` **(** :ref:`String` name **)** | @@ -56,6 +58,10 @@ Add a sample to the library, with a given text ID. Return the sample from the library matching the given text ID. Return null if the sample is not found. +.. _class_SampleLibrary_get_sample_list: + +- :ref:`Array` **get_sample_list** **(** **)** const + .. _class_SampleLibrary_has_sample: - :ref:`bool` **has_sample** **(** :ref:`String` name **)** const diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index a059d77e5..ba16c06c3 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -18,69 +18,71 @@ Brief Description Member Functions ---------------- -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_group` **(** :ref:`int` flags, :ref:`String` group, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`change_scene` **(** :ref:`String` path **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`change_scene_to` **(** :ref:`PackedScene` packed_scene **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`get_current_scene` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_edited_scene_root` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_frame` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_node_count` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_nodes_in_group` **(** :ref:`String` group **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Viewport` | :ref:`get_root` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_group` **(** :ref:`String` name **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_debugging_collisions_hint` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_debugging_navigation_hint` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_editor_hint` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_paused` **(** **)** const | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`notify_group` **(** :ref:`int` call_flags, :ref:`String` group, :ref:`int` notification **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_delete` **(** :ref:`Object` obj **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`quit` **(** **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`reload_current_scene` **(** **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_auto_accept_quit` **(** :ref:`bool` enabled **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_current_scene` **(** :ref:`Node` child_node **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_debug_collisions_hint` **(** :ref:`bool` enable **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_debug_navigation_hint` **(** :ref:`bool` enable **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_edited_scene_root` **(** :ref:`Object` scene **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_editor_hint` **(** :ref:`bool` enable **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_group` **(** :ref:`int` call_flags, :ref:`String` group, :ref:`String` property, var value **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_input_as_handled` **(** **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_pause` **(** :ref:`bool` enable **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_screen_stretch` **(** :ref:`int` mode, :ref:`int` aspect, :ref:`Vector2` minsize **)** | -+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call_group` **(** :ref:`int` flags, :ref:`String` group, :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`change_scene` **(** :ref:`String` path **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`change_scene_to` **(** :ref:`PackedScene` packed_scene **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_current_scene` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_edited_scene_root` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_node_count` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_nodes_in_group` **(** :ref:`String` group **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Viewport` | :ref:`get_root` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_group` **(** :ref:`String` name **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_debugging_collisions_hint` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_debugging_navigation_hint` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editor_hint` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`notify_group` **(** :ref:`int` call_flags, :ref:`String` group, :ref:`int` notification **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_delete` **(** :ref:`Object` obj **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`quit` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`reload_current_scene` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_auto_accept_quit` **(** :ref:`bool` enabled **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_scene` **(** :ref:`Node` child_node **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_debug_collisions_hint` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_debug_navigation_hint` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_edited_scene_root` **(** :ref:`Object` scene **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editor_hint` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_group` **(** :ref:`int` call_flags, :ref:`String` group, :ref:`String` property, :ref:`Variant` value **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_input_as_handled` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pause` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_screen_stretch` **(** :ref:`int` mode, :ref:`int` aspect, :ref:`Vector2` minsize **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- +- **files_dropped** **(** :ref:`StringArray` files, :ref:`int` screen **)** - **fixed_frame** **(** **)** - **idle_frame** **(** **)** +- **node_configuration_warning_changed** **(** :ref:`Object` node **)** - **node_removed** **(** :ref:`Object` node **)** - **screen_resized** **(** **)** - **tree_changed** **(** **)** @@ -105,7 +107,7 @@ Member Function Description .. _class_SceneTree_call_group: -- void **call_group** **(** :ref:`int` flags, :ref:`String` group, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** +- void **call_group** **(** :ref:`int` flags, :ref:`String` group, :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** .. _class_SceneTree_change_scene: @@ -201,7 +203,7 @@ Member Function Description .. _class_SceneTree_set_group: -- void **set_group** **(** :ref:`int` call_flags, :ref:`String` group, :ref:`String` property, var value **)** +- void **set_group** **(** :ref:`int` call_flags, :ref:`String` group, :ref:`String` property, :ref:`Variant` value **)** .. _class_SceneTree_set_input_as_handled: diff --git a/classes/class_script.rst b/classes/class_script.rst index 96b5eef97..361729b72 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -29,7 +29,7 @@ Member Functions +------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`instance_has` **(** :ref:`Object` base_object **)** const | +------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`reload` **(** **)** | +| :ref:`int` | :ref:`reload` **(** :ref:`bool` keep_state=false **)** | +------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_source_code` **(** :ref:`String` source **)** | +------------------------------+------------------------------------------------------------------------------------------------------------+ @@ -68,9 +68,7 @@ Return true if a given object uses an instance of this script. .. _class_Script_reload: -- :ref:`int` **reload** **(** **)** - -Reload the script. This will fail if there are existing instances. +- :ref:`int` **reload** **(** :ref:`bool` keep_state=false **)** .. _class_Script_set_source_code: diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 77b9c9a59..72ccd7bd4 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -60,25 +60,25 @@ Return current vertical scroll value. - :ref:`bool` **is_h_scroll_enabled** **(** **)** const -Return true if horizontal scrool is allowed. +Return true if horizontal scroll is allowed. .. _class_ScrollContainer_is_v_scroll_enabled: - :ref:`bool` **is_v_scroll_enabled** **(** **)** const -Return true if vertical scrool is allowed. +Return true if vertical scroll is allowed. .. _class_ScrollContainer_set_enable_h_scroll: - void **set_enable_h_scroll** **(** :ref:`bool` enable **)** -Set allows horizontal scrool. +Set allows horizontal scroll. .. _class_ScrollContainer_set_enable_v_scroll: - void **set_enable_v_scroll** **(** :ref:`bool` enable **)** -Set allows vertical scrool. +Set allows vertical scroll. .. _class_ScrollContainer_set_h_scroll: diff --git a/classes/class_shadergraph.rst b/classes/class_shadergraph.rst index 5a7a37bc4..037b7d719 100644 --- a/classes/class_shadergraph.rst +++ b/classes/class_shadergraph.rst @@ -45,7 +45,7 @@ Member Functions +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`default_get_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id **)** | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`default_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id, var value **)** | +| void | :ref:`default_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id, :ref:`Variant` value **)** | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`disconnect_node` **(** :ref:`int` shader_type, :ref:`int` src_id, :ref:`int` src_slot, :ref:`int` dst_id, :ref:`int` dst_slot **)** | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -63,7 +63,7 @@ Member Functions +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`node_get_pos` **(** :ref:`int` shader_type, :ref:`int` id **)** const | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`node_get_state` **(** :ref:`int` shader_type, :ref:`int` id **)** const | +| :ref:`Variant` | :ref:`node_get_state` **(** :ref:`int` shader_type, :ref:`int` id **)** const | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`node_get_type` **(** :ref:`int` shader_type, :ref:`int` id **)** const | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -71,7 +71,7 @@ Member Functions +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`node_set_pos` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector2` pos **)** | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`node_set_state` **(** :ref:`int` shader_type, :ref:`int` id, var state **)** | +| void | :ref:`node_set_state` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Variant` state **)** | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`rgb_const_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | +------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -320,7 +320,7 @@ Member Function Description .. _class_ShaderGraph_default_set_value: -- void **default_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id, var value **)** +- void **default_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id, :ref:`Variant` value **)** .. _class_ShaderGraph_disconnect_node: @@ -356,7 +356,7 @@ Member Function Description .. _class_ShaderGraph_node_get_state: -- Variant **node_get_state** **(** :ref:`int` shader_type, :ref:`int` id **)** const +- :ref:`Variant` **node_get_state** **(** :ref:`int` shader_type, :ref:`int` id **)** const .. _class_ShaderGraph_node_get_type: @@ -372,7 +372,7 @@ Member Function Description .. _class_ShaderGraph_node_set_state: -- void **node_set_state** **(** :ref:`int` shader_type, :ref:`int` id, var state **)** +- void **node_set_state** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Variant` state **)** .. _class_ShaderGraph_rgb_const_node_get_value: diff --git a/classes/class_shadermaterial.rst b/classes/class_shadermaterial.rst index 0eb421e60..8b4928f9e 100644 --- a/classes/class_shadermaterial.rst +++ b/classes/class_shadermaterial.rst @@ -18,15 +18,15 @@ Brief Description Member Functions ---------------- -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Shader` | :ref:`get_shader` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`get_shader_param` **(** :ref:`String` param **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_shader` **(** :ref:`Shader` shader **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_shader_param` **(** :ref:`String` param, Variant value **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shader` | :ref:`get_shader` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_shader_param` **(** :ref:`String` param **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader` **(** :ref:`Shader` shader **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader_param` **(** :ref:`String` param, :ref:`Variant` value **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- @@ -37,7 +37,7 @@ Member Function Description .. _class_ShaderMaterial_get_shader_param: -- Variant **get_shader_param** **(** :ref:`String` param **)** const +- :ref:`Variant` **get_shader_param** **(** :ref:`String` param **)** const .. _class_ShaderMaterial_set_shader: @@ -45,6 +45,6 @@ Member Function Description .. _class_ShaderMaterial_set_shader_param: -- void **set_shader_param** **(** :ref:`String` param, Variant value **)** +- void **set_shader_param** **(** :ref:`String` param, :ref:`Variant` value **)** diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst index 84bacd56c..6c5ec48d8 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -20,19 +20,19 @@ Base class for all 2D Shapes. Member Functions ---------------- -+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`collide` **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`collide_and_get_contacts` **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`collide_with_motion` **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`collide_with_motion_and_get_contacts` **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_custom_solver_bias` **(** **)** const | -+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_solver_bias` **(** :ref:`float` bias **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`collide` **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`collide_and_get_contacts` **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`collide_with_motion` **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`collide_with_motion_and_get_contacts` **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_custom_solver_bias` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_solver_bias` **(** :ref:`float` bias **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -52,7 +52,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th .. _class_Shape2D_collide_and_get_contacts: -- Variant **collide_and_get_contacts** **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** +- :ref:`Variant` **collide_and_get_contacts** **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** Return a list of the points where this shape touches another. If there are no collisions, the list is empty. @@ -68,7 +68,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th .. _class_Shape2D_collide_with_motion_and_get_contacts: -- Variant **collide_with_motion_and_get_contacts** **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** +- :ref:`Variant` **collide_with_motion_and_get_contacts** **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty. diff --git a/classes/class_shortcut.rst b/classes/class_shortcut.rst new file mode 100644 index 000000000..fbdbff695 --- /dev/null +++ b/classes/class_shortcut.rst @@ -0,0 +1,56 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_ShortCut: + +ShortCut +======== + +**Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_as_text` **(** **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`InputEvent` | :ref:`get_shortcut` **(** **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_shortcut` **(** :ref:`InputEvent` event **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid` **(** **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shortcut` **(** :ref:`InputEvent` event **)** | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ShortCut_get_as_text: + +- :ref:`String` **get_as_text** **(** **)** const + +.. _class_ShortCut_get_shortcut: + +- :ref:`InputEvent` **get_shortcut** **(** **)** const + +.. _class_ShortCut_is_shortcut: + +- :ref:`bool` **is_shortcut** **(** :ref:`InputEvent` event **)** const + +.. _class_ShortCut_is_valid: + +- :ref:`bool` **is_valid** **(** **)** const + +.. _class_ShortCut_set_shortcut: + +- void **set_shortcut** **(** :ref:`InputEvent` event **)** + + diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index 7362693e2..846b2ceef 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -8,7 +8,7 @@ Spatial **Inherits:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`Joint`, :ref:`RayCast`, :ref:`Camera`, :ref:`BoneAttachment`, :ref:`CollisionShape`, :ref:`Path`, :ref:`VisualInstance`, :ref:`VehicleWheel`, :ref:`Position3D`, :ref:`ProximityGroup`, :ref:`SpatialPlayer`, :ref:`WorldEnvironment`, :ref:`PathFollow`, :ref:`NavigationMeshInstance`, :ref:`VisibilityNotifier`, :ref:`Navigation`, :ref:`CollisionPolygon`, :ref:`GridMap`, :ref:`Skeleton`, :ref:`CollisionObject` +**Inherited By:** :ref:`Joint`, :ref:`RayCast`, :ref:`Camera`, :ref:`BoneAttachment`, :ref:`CollisionShape`, :ref:`Path`, :ref:`VisualInstance`, :ref:`VehicleWheel`, :ref:`Position3D`, :ref:`ProximityGroup`, :ref:`SpatialPlayer`, :ref:`WorldEnvironment`, :ref:`PathFollow`, :ref:`NavigationMeshInstance`, :ref:`Listener`, :ref:`InverseKinematics`, :ref:`VisibilityNotifier`, :ref:`Navigation`, :ref:`CollisionPolygon`, :ref:`GridMap`, :ref:`Skeleton`, :ref:`CollisionObject` **Category:** Core @@ -20,83 +20,83 @@ Base class for all 3D nodes. Member Functions ---------------- -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| SpatialGizmo | :ref:`get_gizmo` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform` | :ref:`get_global_transform` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_parent_spatial` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_rotation` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_rotation_deg` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_scale` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform` | :ref:`get_transform` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_translation` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`World` | :ref:`get_world` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_rotate` **(** :ref:`Vector3` normal, :ref:`float` radians **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`hide` **(** **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_hidden` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_set_as_toplevel` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_visible` **(** **)** const | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`look_at_from_pos` **(** :ref:`Vector3` pos, :ref:`Vector3` target, :ref:`Vector3` up **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`orthonormalize` **(** **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate` **(** :ref:`Vector3` normal, :ref:`float` radians **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_x` **(** :ref:`float` radians **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_y` **(** :ref:`float` radians **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rotate_z` **(** :ref:`float` radians **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_as_toplevel` **(** :ref:`bool` enable **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gizmo` **(** SpatialGizmo gizmo **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_global_transform` **(** :ref:`Transform` global **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_identity` **(** **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_rotation` **(** :ref:`Vector3` rotation_rad **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_rotation_deg` **(** :ref:`Vector3` rotation_deg **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scale` **(** :ref:`Vector3` scale **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_transform` **(** :ref:`Transform` local **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_translation` **(** :ref:`Vector3` translation **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`show` **(** **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`translate` **(** :ref:`Vector3` offset **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_gizmo` **(** **)** | -+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SpatialGizmo` | :ref:`get_gizmo` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_global_transform` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_parent_spatial` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_rotation` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_rotation_deg` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_scale` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_transform` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_translation` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World` | :ref:`get_world` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_rotate` **(** :ref:`Vector3` normal, :ref:`float` radians **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hide` **(** **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_hidden` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_set_as_toplevel` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_visible` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`look_at_from_pos` **(** :ref:`Vector3` pos, :ref:`Vector3` target, :ref:`Vector3` up **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`orthonormalize` **(** **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate` **(** :ref:`Vector3` normal, :ref:`float` radians **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_x` **(** :ref:`float` radians **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_y` **(** :ref:`float` radians **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_z` **(** :ref:`float` radians **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_toplevel` **(** :ref:`bool` enable **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gizmo` **(** :ref:`SpatialGizmo` gizmo **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_global_transform` **(** :ref:`Transform` global **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_identity` **(** **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotation` **(** :ref:`Vector3` rotation_rad **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotation_deg` **(** :ref:`Vector3` rotation_deg **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scale` **(** :ref:`Vector3` scale **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transform` **(** :ref:`Transform` local **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_translation` **(** :ref:`Vector3` translation **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`show` **(** **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`translate` **(** :ref:`Vector3` offset **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_gizmo` **(** **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -121,7 +121,7 @@ Member Function Description .. _class_Spatial_get_gizmo: -- SpatialGizmo **get_gizmo** **(** **)** const +- :ref:`SpatialGizmo` **get_gizmo** **(** **)** const .. _class_Spatial_get_global_transform: @@ -223,7 +223,7 @@ Return the local transform, relative to the bone parent. .. _class_Spatial_set_gizmo: -- void **set_gizmo** **(** SpatialGizmo gizmo **)** +- void **set_gizmo** **(** :ref:`SpatialGizmo` gizmo **)** .. _class_Spatial_set_global_transform: diff --git a/classes/class_spatialgizmo.rst b/classes/class_spatialgizmo.rst new file mode 100644 index 000000000..a57636bbd --- /dev/null +++ b/classes/class_spatialgizmo.rst @@ -0,0 +1,19 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_SpatialGizmo: + +SpatialGizmo +============ + +**Inherits:** :ref:`Reference` **<** :ref:`Object` + +**Inherited By:** :ref:`EditorSpatialGizmo` + +**Category:** Core + +Brief Description +----------------- + + + diff --git a/classes/class_sprite.rst b/classes/class_sprite.rst index d4d35d02a..6773c5de6 100644 --- a/classes/class_sprite.rst +++ b/classes/class_sprite.rst @@ -68,6 +68,7 @@ Signals ------- - **frame_changed** **(** **)** +- **texture_changed** **(** **)** Description ----------- diff --git a/classes/class_spriteframes.rst b/classes/class_spriteframes.rst index a6cb6c10b..a97e86d52 100644 --- a/classes/class_spriteframes.rst +++ b/classes/class_spriteframes.rst @@ -18,19 +18,37 @@ Sprite frame library for AnimatedSprite. Member Functions ---------------- -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_frame` **(** :ref:`Object` frame, :ref:`int` atpos=-1 **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_frame` **(** :ref:`int` idx **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_frame_count` **(** **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_frame` **(** :ref:`int` idx **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_frame` **(** :ref:`int` idx, :ref:`Object` txt **)** | -+------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_animation` **(** :ref:`String` anim **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_frame` **(** :ref:`String` anim, :ref:`Object` frame, :ref:`int` atpos=-1 **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** :ref:`String` anim **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_all` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_animation_loop` **(** :ref:`String` anim **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_animation_speed` **(** :ref:`String` anim **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_frame` **(** :ref:`String` anim, :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame_count` **(** :ref:`String` anim **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_animation` **(** :ref:`String` anim **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_animation` **(** :ref:`String` anim **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_frame` **(** :ref:`String` anim, :ref:`int` idx **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rename_animation` **(** :ref:`String` anim, :ref:`String` newname **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_animation_loop` **(** :ref:`String` anim, :ref:`bool` loop **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_animation_speed` **(** :ref:`String` anim, :ref:`float` speed **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_frame` **(** :ref:`String` anim, :ref:`int` idx, :ref:`Object` txt **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -40,38 +58,64 @@ Sprite frame library for :ref:`AnimatedSprite`. Member Function Description --------------------------- +.. _class_SpriteFrames_add_animation: + +- void **add_animation** **(** :ref:`String` anim **)** + .. _class_SpriteFrames_add_frame: -- void **add_frame** **(** :ref:`Object` frame, :ref:`int` atpos=-1 **)** - -Add a frame (texture). +- void **add_frame** **(** :ref:`String` anim, :ref:`Object` frame, :ref:`int` atpos=-1 **)** .. _class_SpriteFrames_clear: -- void **clear** **(** **)** +- void **clear** **(** :ref:`String` anim **)** -Clear the frames. +.. _class_SpriteFrames_clear_all: + +- void **clear_all** **(** **)** + +.. _class_SpriteFrames_get_animation_loop: + +- :ref:`bool` **get_animation_loop** **(** :ref:`String` anim **)** const + +.. _class_SpriteFrames_get_animation_speed: + +- :ref:`float` **get_animation_speed** **(** :ref:`String` anim **)** const .. _class_SpriteFrames_get_frame: -- :ref:`Object` **get_frame** **(** :ref:`int` idx **)** const - -Return a texture (frame). +- :ref:`Object` **get_frame** **(** :ref:`String` anim, :ref:`int` idx **)** const .. _class_SpriteFrames_get_frame_count: -- :ref:`int` **get_frame_count** **(** **)** const +- :ref:`int` **get_frame_count** **(** :ref:`String` anim **)** const -Return the amount of frames. +.. _class_SpriteFrames_has_animation: + +- :ref:`bool` **has_animation** **(** :ref:`String` anim **)** const + +.. _class_SpriteFrames_remove_animation: + +- void **remove_animation** **(** :ref:`String` anim **)** .. _class_SpriteFrames_remove_frame: -- void **remove_frame** **(** :ref:`int` idx **)** +- void **remove_frame** **(** :ref:`String` anim, :ref:`int` idx **)** -Remove a frame +.. _class_SpriteFrames_rename_animation: + +- void **rename_animation** **(** :ref:`String` anim, :ref:`String` newname **)** + +.. _class_SpriteFrames_set_animation_loop: + +- void **set_animation_loop** **(** :ref:`String` anim, :ref:`bool` loop **)** + +.. _class_SpriteFrames_set_animation_speed: + +- void **set_animation_speed** **(** :ref:`String` anim, :ref:`float` speed **)** .. _class_SpriteFrames_set_frame: -- void **set_frame** **(** :ref:`int` idx, :ref:`Object` txt **)** +- void **set_frame** **(** :ref:`String` anim, :ref:`int` idx, :ref:`Object` txt **)** diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index 00e02b6ed..95d720856 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -20,71 +20,71 @@ Abstraction and base class for stream-based protocols. Member Functions ---------------- -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_16` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_32` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_64` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_8` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_available_bytes` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_data` **(** :ref:`int` bytes **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_double` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_float` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_partial_data` **(** :ref:`int` bytes **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string` **(** :ref:`int` bytes **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_u16` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_u32` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_u64` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_u8` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_utf8_string` **(** :ref:`int` bytes **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`get_var` **(** **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_big_endian_enabled` **(** **)** const | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_16` **(** :ref:`int` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_32` **(** :ref:`int` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_64` **(** :ref:`int` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_8` **(** :ref:`int` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`put_data` **(** :ref:`RawArray` data **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_double` **(** :ref:`float` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_float` **(** :ref:`float` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`put_partial_data` **(** :ref:`RawArray` data **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_u16` **(** :ref:`int` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_u32` **(** :ref:`int` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_u64` **(** :ref:`int` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_u8` **(** :ref:`int` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_utf8_string` **(** :ref:`String` val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`put_var` **(** Variant val **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_big_endian` **(** :ref:`bool` enable **)** | -+------------------------------+---------------------------------------------------------------------------------------------------------------+ ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_16` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_32` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_64` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_8` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_available_bytes` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_data` **(** :ref:`int` bytes **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_double` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_float` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_partial_data` **(** :ref:`int` bytes **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_string` **(** :ref:`int` bytes **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_u16` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_u32` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_u64` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_u8` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_utf8_string` **(** :ref:`int` bytes **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_var` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_big_endian_enabled` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_16` **(** :ref:`int` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_32` **(** :ref:`int` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_64` **(** :ref:`int` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_8` **(** :ref:`int` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`put_data` **(** :ref:`RawArray` data **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_double` **(** :ref:`float` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_float` **(** :ref:`float` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`put_partial_data` **(** :ref:`RawArray` data **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_u16` **(** :ref:`int` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_u32` **(** :ref:`int` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_u64` **(** :ref:`int` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_u8` **(** :ref:`int` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_utf8_string` **(** :ref:`String` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_var` **(** :ref:`Variant` val **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_big_endian` **(** :ref:`bool` enable **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -186,7 +186,7 @@ Get an utf8 string with byte-length "bytes" from the stream (this decodes the st .. _class_StreamPeer_get_var: -- Variant **get_var** **(** **)** +- :ref:`Variant` **get_var** **(** **)** Get a Variant from the stream. @@ -276,7 +276,7 @@ Put a zero-terminated utf8 string into the stream. .. _class_StreamPeer_put_var: -- void **put_var** **(** Variant val **)** +- void **put_var** **(** :ref:`Variant` val **)** Put a Variant into the stream. diff --git a/classes/class_string.rst b/classes/class_string.rst index 89cab2937..d85bcb5d7 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -21,6 +21,8 @@ Member Functions +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`begins_with` **(** :ref:`String` text **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`bigrams` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`c_escape` **(** **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`c_unescape` **(** **)** | @@ -31,6 +33,10 @@ Member Functions +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`empty` **(** **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`ends_with` **(** :ref:`String` text **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase` **(** :ref:`int` pos, :ref:`int` chars **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`extension` **(** **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find` **(** :ref:`String` what, :ref:`int` from=0 **)** | @@ -53,6 +59,10 @@ Member Functions +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_rel_path` **(** **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_subsequence_of` **(** :ref:`String` text **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_subsequence_ofi` **(** :ref:`String` text **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid_float` **(** **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid_html_color` **(** **)** | @@ -101,6 +111,12 @@ Member Functions +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`right` **(** :ref:`int` pos **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`sha256_buffer` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`sha256_text` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`similarity` **(** :ref:`String` text **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringArray` | :ref:`split` **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** | +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RealArray` | :ref:`split_floats` **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** | @@ -146,6 +162,12 @@ If the string is a path to a file, return the path to the file without the exten Return true if the strings begins with the given string. +.. _class_String_bigrams: + +- :ref:`StringArray` **bigrams** **(** **)** + +Return the bigrams (pairs of consecutive letters) of this string. + .. _class_String_c_escape: - :ref:`String` **c_escape** **(** **)** @@ -176,6 +198,18 @@ Perform a case-sensitive comparison to another string, return -1 if less, 0 if e Return true if the string is empty. +.. _class_String_ends_with: + +- :ref:`bool` **ends_with** **(** :ref:`String` text **)** + +Return true if the strings ends with the given string. + +.. _class_String_erase: + +- void **erase** **(** :ref:`int` pos, :ref:`int` chars **)** + +Erase ``chars`` characters from the string starting from ``pos``. + .. _class_String_extension: - :ref:`String` **extension** **(** **)** @@ -242,6 +276,18 @@ If the string is a path to a file or directory, return true if the path is absol If the string is a path to a file or directory, return true if the path is relative. +.. _class_String_is_subsequence_of: + +- :ref:`bool` **is_subsequence_of** **(** :ref:`String` text **)** + +Check whether this string is a subsequence of the given string. + +.. _class_String_is_subsequence_ofi: + +- :ref:`bool` **is_subsequence_ofi** **(** :ref:`String` text **)** + +Check whether this string is a subsequence of the given string, without considering case. + .. _class_String_is_valid_float: - :ref:`bool` **is_valid_float** **(** **)** @@ -386,6 +432,22 @@ Perform a search for a substring, but start from the end of the string instead o Return the right side of the string from a given position. +.. _class_String_sha256_buffer: + +- :ref:`RawArray` **sha256_buffer** **(** **)** + +.. _class_String_sha256_text: + +- :ref:`String` **sha256_text** **(** **)** + +Return the SHA-256 hash of the string as a string. + +.. _class_String_similarity: + +- :ref:`float` **similarity** **(** :ref:`String` text **)** + +Return the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. + .. _class_String_split: - :ref:`StringArray` **split** **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** diff --git a/classes/class_stringarray.rst b/classes/class_stringarray.rst index ec7c4557a..6b9ca3815 100644 --- a/classes/class_stringarray.rst +++ b/classes/class_stringarray.rst @@ -16,17 +16,27 @@ String Array. Member Functions ---------------- -+----------------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`StringArray` | :ref:`StringArray` **(** :ref:`Array` from **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_back` **(** :ref:`String` string **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` idx **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` idx, :ref:`String` string **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** | -+----------------------------------------+---------------------------------------------------------------------------------------------------------------+ ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`StringArray` **(** :ref:`Array` from **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append` **(** :ref:`String` string **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_array` **(** :ref:`StringArray` array **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`String` string **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invert` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`String` string **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove` **(** :ref:`int` idx **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`String` string **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -42,12 +52,42 @@ Member Function Description Create from a generic array. +.. _class_StringArray_append: + +- void **append** **(** :ref:`String` string **)** + +Append an element at the end of the array (alias of :ref:`push_back`). + +.. _class_StringArray_append_array: + +- void **append_array** **(** :ref:`StringArray` array **)** + +Append an :ref:`StringArray` at the end of this array. + +.. _class_StringArray_insert: + +- :ref:`int` **insert** **(** :ref:`int` idx, :ref:`String` string **)** + +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + +.. _class_StringArray_invert: + +- void **invert** **(** **)** + +Reverse the order of the elements in the array (so first element will now be the last). + .. _class_StringArray_push_back: - void **push_back** **(** :ref:`String` string **)** Append a string element at end of the array. +.. _class_StringArray_remove: + +- void **remove** **(** :ref:`int` idx **)** + +Remove an element from the array by index. + .. _class_StringArray_resize: - void **resize** **(** :ref:`int` idx **)** diff --git a/classes/class_styleboxtexture.rst b/classes/class_styleboxtexture.rst index 80e63abbb..4b359ec02 100644 --- a/classes/class_styleboxtexture.rst +++ b/classes/class_styleboxtexture.rst @@ -25,6 +25,8 @@ Member Functions +--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_margin_size` **(** :ref:`int` margin **)** const | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_region_rect` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_texture` **(** **)** const | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_draw_center` **(** :ref:`bool` enable **)** | @@ -33,9 +35,16 @@ Member Functions +--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_margin_size` **(** :ref:`int` margin, :ref:`float` size **)** | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_region_rect` **(** :ref:`Rect2` region **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_texture` **(** :ref:`Texture` texture **)** | +--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +Signals +------- + +- **texture_changed** **(** **)** + Description ----------- @@ -56,6 +65,10 @@ Member Function Description - :ref:`float` **get_margin_size** **(** :ref:`int` margin **)** const +.. _class_StyleBoxTexture_get_region_rect: + +- :ref:`Rect2` **get_region_rect** **(** **)** const + .. _class_StyleBoxTexture_get_texture: - :ref:`Texture` **get_texture** **(** **)** const @@ -72,6 +85,10 @@ Member Function Description - void **set_margin_size** **(** :ref:`int` margin, :ref:`float` size **)** +.. _class_StyleBoxTexture_set_region_rect: + +- void **set_region_rect** **(** :ref:`Rect2` region **)** + .. _class_StyleBoxTexture_set_texture: - void **set_texture** **(** :ref:`Texture` texture **)** diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index f8f0ba82f..fc45a8397 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -18,39 +18,43 @@ Helper tool to create geometry. Member Functions ---------------- -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_bones` **(** :ref:`IntArray` bones **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_color` **(** :ref:`Color` color **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_normal` **(** :ref:`Vector3` normal **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_smooth_group` **(** :ref:`bool` smooth **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_tangent` **(** :ref:`Plane` tangent **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_uv` **(** :ref:`Vector2` uv **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_uv2` **(** :ref:`Vector2` uv2 **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_vertex` **(** :ref:`Vector3` vertex **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_weights` **(** :ref:`RealArray` weights **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`begin` **(** :ref:`int` primitive **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`Mesh` | :ref:`commit` **(** :ref:`Mesh` existing=NULL **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`deindex` **(** **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`generate_normals` **(** **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`index` **(** **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_material` **(** :ref:`Material` material **)** | -+--------------------------+------------------------------------------------------------------------------------------------------------+ ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_bones` **(** :ref:`IntArray` bones **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_color` **(** :ref:`Color` color **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_index` **(** :ref:`int` index **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_normal` **(** :ref:`Vector3` normal **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_smooth_group` **(** :ref:`bool` smooth **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_tangent` **(** :ref:`Plane` tangent **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_triangle_fan` **(** :ref:`Vector3Array` vertexes, :ref:`Vector2Array` uvs=Vector2Array([]), :ref:`ColorArray` colors=ColorArray([ColorArray]), :ref:`Vector2Array` uv2s=Vector2Array([]), :ref:`Vector3Array` normals=Vector3Array([]), :ref:`Array` tangents=Array() **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_uv` **(** :ref:`Vector2` uv **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_uv2` **(** :ref:`Vector2` uv2 **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_vertex` **(** :ref:`Vector3` vertex **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_weights` **(** :ref:`RealArray` weights **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`begin` **(** :ref:`int` primitive **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Mesh` | :ref:`commit` **(** :ref:`Mesh` existing=NULL **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`deindex` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`generate_normals` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`index` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_material` **(** :ref:`Material` material **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -68,6 +72,10 @@ Member Function Description - void **add_color** **(** :ref:`Color` color **)** +.. _class_SurfaceTool_add_index: + +- void **add_index** **(** :ref:`int` index **)** + .. _class_SurfaceTool_add_normal: - void **add_normal** **(** :ref:`Vector3` normal **)** @@ -80,6 +88,10 @@ Member Function Description - void **add_tangent** **(** :ref:`Plane` tangent **)** +.. _class_SurfaceTool_add_triangle_fan: + +- void **add_triangle_fan** **(** :ref:`Vector3Array` vertexes, :ref:`Vector2Array` uvs=Vector2Array([]), :ref:`ColorArray` colors=ColorArray([ColorArray]), :ref:`Vector2Array` uv2s=Vector2Array([]), :ref:`Vector3Array` normals=Vector3Array([]), :ref:`Array` tangents=Array() **)** + .. _class_SurfaceTool_add_uv: - void **add_uv** **(** :ref:`Vector2` uv **)** diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 9b6062488..6e802eb63 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -18,89 +18,106 @@ Multiline text editing control. Member Functions ---------------- -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_color_region` **(** :ref:`String` begin_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_keyword_color` **(** :ref:`String` keyword, :ref:`Color` color **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_colors` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_undo_history` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`copy` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`cursor_get_blink_enabled` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`cursor_get_blink_speed` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`cursor_get_column` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`cursor_get_line` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cursor_set_blink_enabled` **(** :ref:`bool` enable **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cursor_set_blink_speed` **(** :ref:`float` blink_speed **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cursor_set_column` **(** :ref:`int` column, :ref:`bool` adjust_viewport=false **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cursor_set_line` **(** :ref:`int` line, :ref:`bool` adjust_viewport=false **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cut` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_line` **(** :ref:`int` line **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_line_count` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_from_column` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_from_line` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_selection_text` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_to_column` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selection_to_line` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_text` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_word_under_cursor` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`insert_text_at_cursor` **(** :ref:`String` text **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_selection_active` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_syntax_coloring_enabled` **(** **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`paste` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`redo` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`IntArray` | :ref:`search` **(** :ref:`String` flags, :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line **)** const | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select` **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`select_all` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_bg_color` **(** :ref:`Color` color **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_max_chars` **(** :ref:`int` amount **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_readonly` **(** :ref:`bool` enable **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_symbol_color` **(** :ref:`Color` color **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_syntax_coloring` **(** :ref:`bool` enable **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_text` **(** :ref:`String` text **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_wrap` **(** :ref:`bool` enable **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`undo` **(** **)** | -+----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_color_region` **(** :ref:`String` begin_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_keyword_color` **(** :ref:`String` keyword, :ref:`Color` color **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_colors` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_undo_history` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`copy` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`cursor_get_blink_enabled` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cursor_get_blink_speed` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`cursor_get_column` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`cursor_get_line` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`cursor_is_block_mode` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_blink_enabled` **(** :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_blink_speed` **(** :ref:`float` blink_speed **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_block_mode` **(** :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_column` **(** :ref:`int` column, :ref:`bool` adjust_viewport=false **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_line` **(** :ref:`int` line, :ref:`bool` adjust_viewport=false **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cut` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_line` **(** :ref:`int` line **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_line_count` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PopupMenu` | :ref:`get_menu` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selection_from_column` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selection_from_line` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_selection_text` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selection_to_column` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selection_to_line` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_word_under_cursor` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`insert_text_at_cursor` **(** :ref:`String` text **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_highlight_all_occurrences_enabled` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selection_active` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_show_line_numbers_enabled` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_syntax_coloring_enabled` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`menu_option` **(** :ref:`int` arg0 **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`paste` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`redo` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`search` **(** :ref:`String` flags, :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select_all` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_bg_color` **(** :ref:`Color` color **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_highlight_all_occurrences` **(** :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_chars` **(** :ref:`int` amount **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_readonly` **(** :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_show_line_numbers` **(** :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_symbol_color` **(** :ref:`Color` color **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_syntax_coloring` **(** :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`String` text **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_wrap` **(** :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`undo` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- +- **breakpoint_toggled** **(** :ref:`int` row **)** - **cursor_changed** **(** **)** - **request_completion** **(** **)** - **text_changed** **(** **)** @@ -111,6 +128,13 @@ Numeric Constants - **SEARCH_MATCH_CASE** = **1** --- Match case when searching. - **SEARCH_WHOLE_WORDS** = **2** --- Match whole words when searching. - **SEARCH_BACKWARDS** = **4** --- Search from end to beginning. +- **MENU_CUT** = **0** +- **MENU_COPY** = **1** +- **MENU_PASTE** = **2** +- **MENU_CLEAR** = **3** +- **MENU_SELECT_ALL** = **4** +- **MENU_UNDO** = **5** +- **MENU_MAX** = **6** Description ----------- @@ -174,6 +198,12 @@ Return the column the editing cursor is at. Return the line the editing cursor is at. +.. _class_TextEdit_cursor_is_block_mode: + +- :ref:`bool` **cursor_is_block_mode** **(** **)** const + +Gets whether the text editor caret is in block mode. + .. _class_TextEdit_cursor_set_blink_enabled: - void **cursor_set_blink_enabled** **(** :ref:`bool` enable **)** @@ -186,6 +216,12 @@ Set the text editor caret to blink. Set the text editor caret blink speed. Cannot be less then or equal to 0. +.. _class_TextEdit_cursor_set_block_mode: + +- void **cursor_set_block_mode** **(** :ref:`bool` enable **)** + +Set the text editor caret to block mode. + .. _class_TextEdit_cursor_set_column: - void **cursor_set_column** **(** :ref:`int` column, :ref:`bool` adjust_viewport=false **)** @@ -212,6 +248,10 @@ Return the text of a specific line. Return the amount of total lines in the text. +.. _class_TextEdit_get_menu: + +- :ref:`PopupMenu` **get_menu** **(** **)** const + .. _class_TextEdit_get_selection_from_column: - :ref:`int` **get_selection_from_column** **(** **)** const @@ -258,18 +298,34 @@ Return the whole text. Insert a given text at the cursor position. +.. _class_TextEdit_is_highlight_all_occurrences_enabled: + +- :ref:`bool` **is_highlight_all_occurrences_enabled** **(** **)** const + +Returns true if highlight all occurrences is enabled. + .. _class_TextEdit_is_selection_active: - :ref:`bool` **is_selection_active** **(** **)** const Return true if the selection is active. +.. _class_TextEdit_is_show_line_numbers_enabled: + +- :ref:`bool` **is_show_line_numbers_enabled** **(** **)** const + +Returns true if line numbers are enabled. + .. _class_TextEdit_is_syntax_coloring_enabled: - :ref:`bool` **is_syntax_coloring_enabled** **(** **)** const Return true if the syntax coloring is enabled. +.. _class_TextEdit_menu_option: + +- void **menu_option** **(** :ref:`int` arg0 **)** + .. _class_TextEdit_paste: - void **paste** **(** **)** @@ -306,6 +362,12 @@ Select all the text. Set a custom background color. A background color with alpha==0 disables this. +.. _class_TextEdit_set_highlight_all_occurrences: + +- void **set_highlight_all_occurrences** **(** :ref:`bool` enable **)** + +Set to enable highlighting all occurrences of the current selection. + .. _class_TextEdit_set_max_chars: - void **set_max_chars** **(** :ref:`int` amount **)** @@ -318,6 +380,12 @@ Set the maximum amount of characters editable. Set the text editor as read-only. Text can be displayed but not edited. +.. _class_TextEdit_set_show_line_numbers: + +- void **set_show_line_numbers** **(** :ref:`bool` enable **)** + +Set to enable showing line numbers. + .. _class_TextEdit_set_symbol_color: - void **set_symbol_color** **(** :ref:`Color` color **)** diff --git a/classes/class_textureframe.rst b/classes/class_textureframe.rst index 6e694009f..7c28cab23 100644 --- a/classes/class_textureframe.rst +++ b/classes/class_textureframe.rst @@ -18,19 +18,34 @@ Control Frame that draws a texture. Member Functions ---------------- -+------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_modulate` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_texture` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_expand` **(** **)** const | -+------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_expand` **(** :ref:`bool` enable **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | -+------------------------------+-------------------------------------------------------------------------------------------------------+ ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_modulate` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_stretch_mode` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_texture` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_expand` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_expand` **(** :ref:`bool` enable **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stretch_mode` **(** :ref:`int` stretch_mode **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **STRETCH_SCALE_ON_EXPAND** = **0** +- **STRETCH_SCALE** = **1** +- **STRETCH_TILE** = **2** +- **STRETCH_KEEP** = **3** +- **STRETCH_KEEP_CENTERED** = **4** +- **STRETCH_KEEP_ASPECT** = **5** +- **STRETCH_KEEP_ASPECT_CENTERED** = **6** Description ----------- @@ -44,6 +59,10 @@ Member Function Description - :ref:`Color` **get_modulate** **(** **)** const +.. _class_TextureFrame_get_stretch_mode: + +- :ref:`int` **get_stretch_mode** **(** **)** const + .. _class_TextureFrame_get_texture: - :ref:`Object` **get_texture** **(** **)** const @@ -60,6 +79,10 @@ Member Function Description - void **set_modulate** **(** :ref:`Color` modulate **)** +.. _class_TextureFrame_set_stretch_mode: + +- void **set_stretch_mode** **(** :ref:`int` stretch_mode **)** + .. _class_TextureFrame_set_texture: - void **set_texture** **(** :ref:`Object` texture **)** diff --git a/classes/class_theme.rst b/classes/class_theme.rst index 9a3de1211..66e03f74d 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -53,6 +53,8 @@ Member Functions +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringArray` | :ref:`get_stylebox_list` **(** :ref:`String` type **)** const | +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_stylebox_types` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringArray` | :ref:`get_type_list` **(** :ref:`String` type **)** const | +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_color` **(** :ref:`String` name, :ref:`String` type **)** const | @@ -83,7 +85,7 @@ Description Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any :ref:`Control`, and it and its children will automatically use it. -Theme resources can be alternatively loaded by writing them in a .theme file, see wiki for more info. +Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info. Member Function Description --------------------------- @@ -156,6 +158,10 @@ Member Function Description - :ref:`StringArray` **get_stylebox_list** **(** :ref:`String` type **)** const +.. _class_Theme_get_stylebox_types: + +- :ref:`StringArray` **get_stylebox_types** **(** **)** const + .. _class_Theme_get_type_list: - :ref:`StringArray` **get_type_list** **(** :ref:`String` type **)** const diff --git a/classes/class_thread.rst b/classes/class_thread.rst index 27d45eccb..fb33247a8 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -18,15 +18,15 @@ A unit of execution in a process. Member Functions ---------------- -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_id` **(** **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_active` **(** **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Error | :ref:`start` **(** :ref:`Object` instance, :ref:`String` method, var userdata=NULL, :ref:`int` priority=1 **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Variant | :ref:`wait_to_finish` **(** **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_id` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_active` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`start` **(** :ref:`Object` instance, :ref:`String` method, :ref:`Variant` userdata=NULL, :ref:`int` priority=1 **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`wait_to_finish` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- @@ -57,7 +57,7 @@ Whether this thread is currently active, an active Thread cannot start work on a .. _class_Thread_start: -- Error **start** **(** :ref:`Object` instance, :ref:`String` method, var userdata=NULL, :ref:`int` priority=1 **)** +- Error **start** **(** :ref:`Object` instance, :ref:`String` method, :ref:`Variant` userdata=NULL, :ref:`int` priority=1 **)** Start a new :ref:`Thread`, it will run "method" on object "instance" using "userdata" as an argument and running with "priority", one of PRIORITY\_\* enum. @@ -65,7 +65,7 @@ Returns OK on success, or ERR_CANT_CREATE on failure. .. _class_Thread_wait_to_finish: -- Variant **wait_to_finish** **(** **)** +- :ref:`Variant` **wait_to_finish** **(** **)** Joins the :ref:`Thread` and waits for it to finish. Returns what the method called returned. diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 3e50ad0bf..c1b2ec370 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -123,6 +123,7 @@ Numeric Constants - **HALF_OFFSET_DISABLED** = **2** --- Half offset disabled. - **TILE_ORIGIN_TOP_LEFT** = **0** --- Tile origin at its top-left corner. - **TILE_ORIGIN_CENTER** = **1** --- Tile origin at its center. +- **TILE_ORIGIN_BOTTOM_LEFT** = **2** Description ----------- @@ -320,17 +321,13 @@ Set tiles to be centered in y coordinate. (by default this is false and they are - void **set_collision_bounce** **(** :ref:`float` value **)** -Set the collision bounce parameter. - -Allowable values range from 0 to 1. +Set the collision bounce parameter. Allowable values range from 0 to 1. .. _class_TileMap_set_collision_friction: - void **set_collision_friction** **(** :ref:`float` value **)** -Set the collision friction parameter. - -Allowable values range from 0 to 1. +Set the collision friction parameter. Allowable values range from 0 to 1. .. _class_TileMap_set_collision_layer: diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 6fa4ba373..4bd507b9f 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -13,7 +13,7 @@ Timer Brief Description ----------------- - +A simple Timer node. Member Functions ---------------- @@ -27,8 +27,12 @@ Member Functions +----------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_autostart` **(** **)** const | +----------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_active` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_one_shot` **(** **)** const | +----------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_active` **(** :ref:`bool` active **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_autostart` **(** :ref:`bool` enable **)** | +----------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_one_shot` **(** :ref:`bool` enable **)** | @@ -85,12 +89,24 @@ Return the wait time in seconds. Return true if set to automatically start when entering the scene. +.. _class_Timer_is_active: + +- :ref:`bool` **is_active** **(** **)** const + +Return if the timer is active or not. + .. _class_Timer_is_one_shot: - :ref:`bool` **is_one_shot** **(** **)** const Return true if configured as one-shot. +.. _class_Timer_set_active: + +- void **set_active** **(** :ref:`bool` active **)** + +Set whether the timer is active or not. An inactive timer will be paused until it is activated again. + .. _class_Timer_set_autostart: - void **set_autostart** **(** :ref:`bool` enable **)** diff --git a/classes/class_tree.rst b/classes/class_tree.rst index f12cb2047..e76fda37b 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -18,59 +18,75 @@ Brief Description Member Functions ---------------- -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`are_column_titles_visible` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=NULL **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`ensure_cursor_is_visible` **(** **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_columns` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_edited` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_edited_column` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1 **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_pressed_button` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_root` **(** **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_scroll` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`TreeItem` | :ref:`get_selected` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_selected_column` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_folding_hidden` **(** **)** const | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_min_width` **(** :ref:`int` column, :ref:`int` min_width **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_column_titles_visible` **(** :ref:`bool` visible **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_columns` **(** :ref:`int` amount **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_hide_folding` **(** :ref:`bool` hide **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_hide_root` **(** :ref:`bool` enable **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | -+----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`are_column_titles_visible` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=NULL **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`ensure_cursor_is_visible` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_allow_rmb_select` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_column_at_pos` **(** :ref:`Vector2` pos **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_columns` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_drop_mode_flags` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_edited` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_edited_column` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1 **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_item_at_pos` **(** :ref:`Vector2` pos **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_pressed_button` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_root` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scroll` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_selected` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selected_column` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_single_select_cell_editing_only_when_already_selected` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_folding_hidden` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_allow_rmb_select` **(** :ref:`bool` allow **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_column_min_width` **(** :ref:`int` column, :ref:`int` min_width **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_column_titles_visible` **(** :ref:`bool` visible **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_columns` **(** :ref:`int` amount **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_drop_mode_flags` **(** :ref:`int` flags **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hide_folding` **(** :ref:`bool` hide **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hide_root` **(** :ref:`bool` enable **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_single_select_cell_editing_only_when_already_selected` **(** :ref:`bool` enable **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -78,9 +94,11 @@ Signals - **button_pressed** **(** :ref:`Object` item, :ref:`int` column, :ref:`int` id **)** - **cell_selected** **(** **)** - **custom_popup_edited** **(** :ref:`bool` arrow_clicked **)** +- **empty_tree_rmb_selected** **(** :ref:`Vector2` pos **)** - **item_activated** **(** **)** - **item_collapsed** **(** :ref:`Object` item **)** - **item_edited** **(** **)** +- **item_rmb_selected** **(** :ref:`Vector2` pos **)** - **item_selected** **(** **)** - **multi_selected** **(** :ref:`Object` item, :ref:`int` column, :ref:`bool` selected **)** @@ -90,6 +108,9 @@ Numeric Constants - **SELECT_SINGLE** = **0** - **SELECT_ROW** = **1** - **SELECT_MULTI** = **2** +- **DROP_MODE_DISABLED** = **0** +- **DROP_MODE_ON_ITEM** = **1** +- **DROP_MODE_INBETWEEN** = **2** Member Function Description --------------------------- @@ -110,6 +131,14 @@ Member Function Description - void **ensure_cursor_is_visible** **(** **)** +.. _class_Tree_get_allow_rmb_select: + +- :ref:`bool` **get_allow_rmb_select** **(** **)** const + +.. _class_Tree_get_column_at_pos: + +- :ref:`int` **get_column_at_pos** **(** :ref:`Vector2` pos **)** const + .. _class_Tree_get_column_title: - :ref:`String` **get_column_title** **(** :ref:`int` column **)** const @@ -126,6 +155,10 @@ Member Function Description - :ref:`Rect2` **get_custom_popup_rect** **(** **)** const +.. _class_Tree_get_drop_mode_flags: + +- :ref:`int` **get_drop_mode_flags** **(** **)** const + .. _class_Tree_get_edited: - :ref:`TreeItem` **get_edited** **(** **)** const @@ -138,6 +171,10 @@ Member Function Description - :ref:`Rect2` **get_item_area_rect** **(** :ref:`TreeItem` item, :ref:`int` column=-1 **)** const +.. _class_Tree_get_item_at_pos: + +- :ref:`TreeItem` **get_item_at_pos** **(** :ref:`Vector2` pos **)** const + .. _class_Tree_get_next_selected: - :ref:`TreeItem` **get_next_selected** **(** :ref:`TreeItem` from **)** @@ -162,10 +199,18 @@ Member Function Description - :ref:`int` **get_selected_column** **(** **)** const +.. _class_Tree_get_single_select_cell_editing_only_when_already_selected: + +- :ref:`bool` **get_single_select_cell_editing_only_when_already_selected** **(** **)** const + .. _class_Tree_is_folding_hidden: - :ref:`bool` **is_folding_hidden** **(** **)** const +.. _class_Tree_set_allow_rmb_select: + +- void **set_allow_rmb_select** **(** :ref:`bool` allow **)** + .. _class_Tree_set_column_expand: - void **set_column_expand** **(** :ref:`int` column, :ref:`bool` expand **)** @@ -186,6 +231,10 @@ Member Function Description - void **set_columns** **(** :ref:`int` amount **)** +.. _class_Tree_set_drop_mode_flags: + +- void **set_drop_mode_flags** **(** :ref:`int` flags **)** + .. _class_Tree_set_hide_folding: - void **set_hide_folding** **(** :ref:`bool` hide **)** @@ -198,4 +247,8 @@ Member Function Description - void **set_select_mode** **(** :ref:`int` mode **)** +.. _class_Tree_set_single_select_cell_editing_only_when_already_selected: + +- void **set_single_select_cell_editing_only_when_already_selected** **(** :ref:`bool` enable **)** + diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index 599cb3567..e35a57ecc 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -85,13 +85,15 @@ Member Functions +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`select` **(** :ref:`int` column **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_button` **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Texture` button **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cell_mode` **(** :ref:`int` column, :ref:`int` mode **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_checked` **(** :ref:`int` column, :ref:`bool` checked **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_collapsed` **(** :ref:`bool` enable **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_custom_bg_color` **(** :ref:`int` column, :ref:`Color` color **)** | +| void | :ref:`set_custom_bg_color` **(** :ref:`int` column, :ref:`Color` color, :ref:`bool` just_outline=false **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_custom_color` **(** :ref:`int` column, :ref:`Color` color **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -105,7 +107,7 @@ Member Functions +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_icon_region` **(** :ref:`int` column, :ref:`Rect2` region **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_metadata` **(** :ref:`int` column, var meta **)** | +| void | :ref:`set_metadata` **(** :ref:`int` column, :ref:`Variant` meta **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_range` **(** :ref:`int` column, :ref:`float` value **)** | +--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -124,8 +126,9 @@ Numeric Constants - **CELL_MODE_STRING** = **0** - **CELL_MODE_CHECK** = **1** - **CELL_MODE_RANGE** = **2** -- **CELL_MODE_ICON** = **3** -- **CELL_MODE_CUSTOM** = **4** +- **CELL_MODE_RANGE_EXPRESSION** = **3** +- **CELL_MODE_ICON** = **4** +- **CELL_MODE_CUSTOM** = **5** Member Function Description --------------------------- @@ -262,6 +265,10 @@ Member Function Description - void **select** **(** :ref:`int` column **)** +.. _class_TreeItem_set_button: + +- void **set_button** **(** :ref:`int` column, :ref:`int` button_idx, :ref:`Texture` button **)** + .. _class_TreeItem_set_cell_mode: - void **set_cell_mode** **(** :ref:`int` column, :ref:`int` mode **)** @@ -276,7 +283,7 @@ Member Function Description .. _class_TreeItem_set_custom_bg_color: -- void **set_custom_bg_color** **(** :ref:`int` column, :ref:`Color` color **)** +- void **set_custom_bg_color** **(** :ref:`int` column, :ref:`Color` color, :ref:`bool` just_outline=false **)** .. _class_TreeItem_set_custom_color: @@ -304,7 +311,7 @@ Member Function Description .. _class_TreeItem_set_metadata: -- void **set_metadata** **(** :ref:`int` column, var meta **)** +- void **set_metadata** **(** :ref:`int` column, :ref:`Variant` meta **)** .. _class_TreeItem_set_range: diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 01af29d91..e35e27c3a 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -18,63 +18,63 @@ Node useful for animations with unknown start and end points. Member Functions ---------------- -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`follow_method` **(** :ref:`Object` object, :ref:`String` method, var initial_val, :ref:`Object` target, :ref:`String` target_method, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`follow_property` **(** :ref:`Object` object, :ref:`String` property, var initial_val, :ref:`Object` target, :ref:`String` target_property, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_runtime` **(** **)** const | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_speed` **(** **)** const | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tween_process_mode` **(** **)** const | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interpolate_callback` **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interpolate_deferred_callback` **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interpolate_method` **(** :ref:`Object` object, :ref:`String` method, var initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`interpolate_property` **(** :ref:`Object` object, :ref:`String` property, var initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_active` **(** **)** const | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_repeat` **(** **)** const | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`remove` **(** :ref:`Object` object, :ref:`String` key **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`remove_all` **(** **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`reset` **(** :ref:`Object` object, :ref:`String` key **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`reset_all` **(** **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`resume` **(** :ref:`Object` object, :ref:`String` key **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`resume_all` **(** **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`seek` **(** :ref:`float` time **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_active` **(** :ref:`bool` active **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_repeat` **(** :ref:`bool` repeat **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_speed` **(** :ref:`float` speed **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tween_process_mode` **(** :ref:`int` mode **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`start` **(** **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`stop` **(** :ref:`Object` object, :ref:`String` key **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`stop_all` **(** **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`targeting_method` **(** :ref:`Object` object, :ref:`String` method, :ref:`Object` initial, :ref:`String` initial_method, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`targeting_property` **(** :ref:`Object` object, :ref:`String` property, :ref:`Object` initial, :ref:`String` initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`tell` **(** **)** const | -+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`follow_method` **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` initial_val, :ref:`Object` target, :ref:`String` target_method, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`follow_property` **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` initial_val, :ref:`Object` target, :ref:`String` target_property, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_runtime` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_speed` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tween_process_mode` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interpolate_callback` **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL, :ref:`Variant` arg5=NULL **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interpolate_deferred_callback` **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL, :ref:`Variant` arg5=NULL **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interpolate_method` **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` initial_val, :ref:`Variant` final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interpolate_property` **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` initial_val, :ref:`Variant` final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_active` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_repeat` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`remove` **(** :ref:`Object` object, :ref:`String` key **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`remove_all` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`reset` **(** :ref:`Object` object, :ref:`String` key **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`reset_all` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`resume` **(** :ref:`Object` object, :ref:`String` key **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`resume_all` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`seek` **(** :ref:`float` time **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_active` **(** :ref:`bool` active **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_repeat` **(** :ref:`bool` repeat **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_speed` **(** :ref:`float` speed **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tween_process_mode` **(** :ref:`int` mode **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`start` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`stop` **(** :ref:`Object` object, :ref:`String` key **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`stop_all` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`targeting_method` **(** :ref:`Object` object, :ref:`String` method, :ref:`Object` initial, :ref:`String` initial_method, :ref:`Variant` final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`targeting_property` **(** :ref:`Object` object, :ref:`String` property, :ref:`Object` initial, :ref:`String` initial_val, :ref:`Variant` final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tell` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -114,7 +114,7 @@ Because it is easy to get it wrong, here is a quick usage example: :: var tween = get_node("Tween") - tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) + tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor. @@ -126,7 +126,7 @@ Member Function Description .. _class_Tween_follow_method: -- :ref:`bool` **follow_method** **(** :ref:`Object` object, :ref:`String` method, var initial_val, :ref:`Object` target, :ref:`String` target_method, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** +- :ref:`bool` **follow_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` initial_val, :ref:`Object` target, :ref:`String` target_method, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** Follow ``method`` of ``object`` and apply the returned value on ``target_method`` of ``target``, beginning from ``initial_val`` for ``times_in_sec`` seconds, ``delay`` later. Methods are animated by calling them with consequitive values. @@ -134,7 +134,7 @@ Follow ``method`` of ``object`` and apply the returned value on ``target_method` .. _class_Tween_follow_property: -- :ref:`bool` **follow_property** **(** :ref:`Object` object, :ref:`String` property, var initial_val, :ref:`Object` target, :ref:`String` target_property, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** +- :ref:`bool` **follow_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` initial_val, :ref:`Object` target, :ref:`String` target_property, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** Follow ``property`` of ``object`` and apply it on ``target_property`` of ``target``, beginning from ``initial_val`` for ``times_in_sec`` seconds, ``delay`` seconds later. Note that ``target:target_property`` would equal ``object:property`` at the end of the tween. @@ -160,19 +160,19 @@ Returns the process mode that has been set from editor GUI or :ref:`set_tween_pr .. _class_Tween_interpolate_callback: -- :ref:`bool` **interpolate_callback** **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL **)** +- :ref:`bool` **interpolate_callback** **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL, :ref:`Variant` arg5=NULL **)** Call ``callback`` of ``object`` after ``times_in_sec``. ``arg1``-``arg5`` are arguments to be passed to the callback. .. _class_Tween_interpolate_deferred_callback: -- :ref:`bool` **interpolate_deferred_callback** **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL **)** +- :ref:`bool` **interpolate_deferred_callback** **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL, :ref:`Variant` arg5=NULL **)** Call ``callback`` of ``object`` after ``times_in_sec`` on the main thread (similar to :ref:`methog Object.call_deferred). [code`arg1``-``arg5`` are arguments to be passed to the callback. .. _class_Tween_interpolate_method: -- :ref:`bool` **interpolate_method** **(** :ref:`Object` object, :ref:`String` method, var initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** +- :ref:`bool` **interpolate_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` initial_val, :ref:`Variant` final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** Animate ``method`` of ``object`` from ``initial_val`` to ``final_val`` for ``times_in_sec`` seconds, ``delay`` seconds later. Methods are animated by calling them with consecuitive values. @@ -180,7 +180,7 @@ Animate ``method`` of ``object`` from ``initial_val`` to ``final_val`` for ``tim .. _class_Tween_interpolate_property: -- :ref:`bool` **interpolate_property** **(** :ref:`Object` object, :ref:`String` property, var initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** +- :ref:`bool` **interpolate_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` initial_val, :ref:`Variant` final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** Animate ``property`` of ``object`` from ``initial_val`` to ``final_val`` for ``times_in_sec`` seconds, ``delay`` seconds later. @@ -284,7 +284,7 @@ Stop animating all tweens. .. _class_Tween_targeting_method: -- :ref:`bool` **targeting_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Object` initial, :ref:`String` initial_method, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** +- :ref:`bool` **targeting_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Object` initial, :ref:`String` initial_method, :ref:`Variant` final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** Animate ``method`` of ``object`` from the value returned by ``initial.initial_method`` to ``final_val`` for ``times_in_sec`` seconds, ``delay`` seconds later. Methods are animated by calling them with consecuitive values. @@ -292,7 +292,7 @@ Animate ``method`` of ``object`` from the value returned by ``initial.initial_me .. _class_Tween_targeting_property: -- :ref:`bool` **targeting_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Object` initial, :ref:`String` initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** +- :ref:`bool` **targeting_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Object` initial, :ref:`String` initial_val, :ref:`Variant` final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** Animate ``property`` of ``object`` from the current value of the ``initial_val`` property of ``initial`` to ``final_val`` for ``times_in_sec`` seconds, ``delay`` seconds later. diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index 0473d6766..bfcbe7646 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -13,80 +13,115 @@ UndoRedo Brief Description ----------------- - +Helper to manage UndoRedo in the editor or custom tools. Member Functions ---------------- -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_method` **(** :ref:`Object` object, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_property` **(** :ref:`Object` object, :ref:`String` property, Variant value **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_do_reference` **(** :ref:`Object` object **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_method` **(** :ref:`Object` object, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_property` **(** :ref:`Object` object, :ref:`String` property, Variant value **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_undo_reference` **(** :ref:`Object` object **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_history` **(** **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`commit_action` **(** **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_action` **(** :ref:`String` name, :ref:`bool` mergeable=false **)** | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_current_action_name` **(** **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_version` **(** **)** const | -+------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_method` **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_property` **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` value **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_reference` **(** :ref:`Object` object **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_method` **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_property` **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` value **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_reference` **(** :ref:`Object` object **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_history` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`commit_action` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_action` **(** :ref:`String` name, :ref:`bool` mergeable=false **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_action_name` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_version` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Helper to maange UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists. + +Common behavior is to create an action, then add do/undo calls to functions or property changes, then commiting the action. Member Function Description --------------------------- .. _class_UndoRedo_add_do_method: -- void **add_do_method** **(** :ref:`Object` object, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** +- void **add_do_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** + +Add a call to a method in a given object with custom + +arguments. .. _class_UndoRedo_add_do_property: -- void **add_do_property** **(** :ref:`Object` object, :ref:`String` property, Variant value **)** +- void **add_do_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` value **)** + +Set a property with a custom value. .. _class_UndoRedo_add_do_reference: - void **add_do_reference** **(** :ref:`Object` object **)** +Add a 'do' reference that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources. + .. _class_UndoRedo_add_undo_method: -- void **add_undo_method** **(** :ref:`Object` object, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** +- void **add_undo_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Variant` arg0=NULL, :ref:`Variant` arg1=NULL, :ref:`Variant` arg2=NULL, :ref:`Variant` arg3=NULL, :ref:`Variant` arg4=NULL **)** + +Add a call to an undo method in a given object with custom arguments. Undo calls are used to revert 'do' calls. .. _class_UndoRedo_add_undo_property: -- void **add_undo_property** **(** :ref:`Object` object, :ref:`String` property, Variant value **)** +- void **add_undo_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Variant` value **)** + +Undo setting of a property with a custom value. .. _class_UndoRedo_add_undo_reference: - void **add_undo_reference** **(** :ref:`Object` object **)** +Add an 'undo' reference that will be erased if the 'undo' history is lost. This is useful mostly for nodes rmoved with the 'do' call (not the 'undo' call!). + .. _class_UndoRedo_clear_history: - void **clear_history** **(** **)** +Clear the undo/redo history and associated + +references. + .. _class_UndoRedo_commit_action: - void **commit_action** **(** **)** +Commit the action. All 'do' methods/properties are called/set when this function is called. + .. _class_UndoRedo_create_action: - void **create_action** **(** :ref:`String` name, :ref:`bool` mergeable=false **)** +Create a new action. After this is called, do all your calls to :ref:`add_do_method`, :ref:`add_undo_method`, :ref:`add_do_property` and :ref:`add_undo_property`. + .. _class_UndoRedo_get_current_action_name: - :ref:`String` **get_current_action_name** **(** **)** const +Get the name of the current action. + .. _class_UndoRedo_get_version: - :ref:`int` **get_version** **(** **)** const +Get the version, each time a new action is commited, the version number of the UndoRedo is increased automatically. + +This is useful mostly to check if something changed from a saved version. + diff --git a/classes/class_variant.rst b/classes/class_variant.rst new file mode 100644 index 000000000..93e3bff10 --- /dev/null +++ b/classes/class_variant.rst @@ -0,0 +1,15 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. + +.. _class_Variant: + +Variant +======= + +**Category:** Core + +Brief Description +----------------- + + + diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index b70c5d746..08911ae11 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -19,6 +19,8 @@ Member Functions +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`Vector2` **(** :ref:`float` x, :ref:`float` y **)** | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`abs` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`angle` **(** **)** | +--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`angle_to` **(** :ref:`Vector2` to **)** | @@ -80,6 +82,10 @@ Member Function Description Constructs a new Vector2 from the given x and y. +.. _class_Vector2_abs: + +- :ref:`Vector2` **abs** **(** **)** + .. _class_Vector2_angle: - :ref:`float` **angle** **(** **)** diff --git a/classes/class_vector2array.rst b/classes/class_vector2array.rst index 91c200e66..7e14da69b 100644 --- a/classes/class_vector2array.rst +++ b/classes/class_vector2array.rst @@ -16,17 +16,27 @@ An Array of Vector2. Member Functions ---------------- -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2Array` | :ref:`Vector2Array` **(** :ref:`Array` from **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_back` **(** :ref:`Vector2` vector2 **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` idx **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`Vector2Array` **(** :ref:`Array` from **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append` **(** :ref:`Vector2` vector2 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_array` **(** :ref:`Vector2Array` array **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invert` **(** **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`Vector2` vector2 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove` **(** :ref:`int` idx **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -42,12 +52,42 @@ Member Function Description Construct a new :ref:`Vector2Array`. Optionally, you can pass in an Array that will be converted. +.. _class_Vector2Array_append: + +- void **append** **(** :ref:`Vector2` vector2 **)** + +Append an element at the end of the array (alias of :ref:`push_back`). + +.. _class_Vector2Array_append_array: + +- void **append_array** **(** :ref:`Vector2Array` array **)** + +Append an :ref:`Vector2Array` at the end of this array. + +.. _class_Vector2Array_insert: + +- :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** + +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + +.. _class_Vector2Array_invert: + +- void **invert** **(** **)** + +Reverse the order of the elements in the array (so first element will now be the last). + .. _class_Vector2Array_push_back: - void **push_back** **(** :ref:`Vector2` vector2 **)** Insert a :ref:`Vector2` at the end. +.. _class_Vector2Array_remove: + +- void **remove** **(** :ref:`int` idx **)** + +Remove an element from the array by index. + .. _class_Vector2Array_resize: - void **resize** **(** :ref:`int` idx **)** diff --git a/classes/class_vector3array.rst b/classes/class_vector3array.rst index eaf2332e2..dad69d82a 100644 --- a/classes/class_vector3array.rst +++ b/classes/class_vector3array.rst @@ -16,17 +16,27 @@ An Array of Vector3. Member Functions ---------------- -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3Array` | :ref:`Vector3Array` **(** :ref:`Array` from **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_back` **(** :ref:`Vector3` vector3 **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`resize` **(** :ref:`int` idx **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set` **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** | -+------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`Vector3Array` **(** :ref:`Array` from **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append` **(** :ref:`Vector3` vector3 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_array` **(** :ref:`Vector3Array` array **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invert` **(** **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`Vector3` vector3 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove` **(** :ref:`int` idx **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -42,12 +52,42 @@ Member Function Description Construct a new Vector3Array. Optionally, you can pass in an Array that will be converted. +.. _class_Vector3Array_append: + +- void **append** **(** :ref:`Vector3` vector3 **)** + +Append an element at the end of the array (alias of :ref:`push_back`). + +.. _class_Vector3Array_append_array: + +- void **append_array** **(** :ref:`Vector3Array` array **)** + +Append an :ref:`Vector3Array` at the end of this array. + +.. _class_Vector3Array_insert: + +- :ref:`int` **insert** **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** + +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + +.. _class_Vector3Array_invert: + +- void **invert** **(** **)** + +Reverse the order of the elements in the array (so first element will now be the last). + .. _class_Vector3Array_push_back: - void **push_back** **(** :ref:`Vector3` vector3 **)** Insert a Vector3 at the end. +.. _class_Vector3Array_remove: + +- void **remove** **(** :ref:`int` idx **)** + +Remove an element from the array by index. + .. _class_Vector3Array_resize: - void **resize** **(** :ref:`int` idx **)** diff --git a/classes/class_vehiclebody.rst b/classes/class_vehiclebody.rst index 3877f54c5..8db73e814 100644 --- a/classes/class_vehiclebody.rst +++ b/classes/class_vehiclebody.rst @@ -18,27 +18,29 @@ Brief Description Member Functions ---------------- -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_brake` **(** **)** const | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_engine_force` **(** **)** const | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_friction` **(** **)** const | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_mass` **(** **)** const | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_steering` **(** **)** const | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_brake` **(** :ref:`float` brake **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_engine_force` **(** :ref:`float` engine_force **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_friction` **(** :ref:`float` friction **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_mass` **(** :ref:`float` mass **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_steering` **(** :ref:`float` steering **)** | -+----------------------------+------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_brake` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_engine_force` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_friction` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_linear_velocity` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_mass` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_steering` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_brake` **(** :ref:`float` brake **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_engine_force` **(** :ref:`float` engine_force **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_friction` **(** :ref:`float` friction **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mass` **(** :ref:`float` mass **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_steering` **(** :ref:`float` steering **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- @@ -55,6 +57,17 @@ Member Function Description - :ref:`float` **get_friction** **(** **)** const +.. _class_VehicleBody_get_linear_velocity: + +- :ref:`Vector3` **get_linear_velocity** **(** **)** const + +Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example: + +:: + + # vehicle is an instance of VehicleBody + var speed = vehicle.get_linear_velocity().length() + .. _class_VehicleBody_get_mass: - :ref:`float` **get_mass** **(** **)** const diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 03e762ce7..7bc56a529 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -18,115 +18,117 @@ Creates a sub-view into the screen. Member Functions ---------------- -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`World` | :ref:`find_world` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`World2D` | :ref:`find_world_2d` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Camera` | :ref:`get_camera` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Matrix32` | :ref:`get_canvas_transform` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Matrix32` | :ref:`get_final_transform` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Matrix32` | :ref:`get_global_canvas_transform` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_mouse_pos` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_physics_object_picking` **(** **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_rect` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_render_target_clear_on_new_frame` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_render_target_filter` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_render_target_gen_mipmaps` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RenderTargetTexture` | :ref:`get_render_target_texture` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_render_target_update_mode` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_render_target_vflip` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_screen_capture` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_size_override` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`get_viewport` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_visible_rect` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`World` | :ref:`get_world` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`gui_has_modal_stack` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_transparent_background` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`input` **(** :ref:`InputEvent` local_event **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_audio_listener` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_audio_listener_2d` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_input_disabled` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_set_as_render_target` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_size_override_enabled` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_size_override_stretch_enabled` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_using_own_world` **(** **)** const | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`queue_screen_capture` **(** **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`render_target_clear` **(** **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_as_audio_listener` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_as_audio_listener_2d` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_as_render_target` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_canvas_transform` **(** :ref:`Matrix32` xform **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_disable_input` **(** :ref:`bool` disable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_global_canvas_transform` **(** :ref:`Matrix32` xform **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_physics_object_picking` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_rect` **(** :ref:`Rect2` rect **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_render_target_clear_on_new_frame` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_render_target_filter` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_render_target_gen_mipmaps` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_render_target_to_screen_rect` **(** :ref:`Rect2` rect **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_render_target_update_mode` **(** :ref:`int` mode **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_render_target_vflip` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_size_override` **(** :ref:`bool` enable, :ref:`Vector2` size=Vector2(-1,-1), :ref:`Vector2` margin=Vector2(0,0) **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_size_override_stretch` **(** :ref:`bool` enabled **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_transparent_background` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_own_world` **(** :ref:`bool` enable **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_world` **(** :ref:`World` world **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`unhandled_input` **(** :ref:`InputEvent` local_event **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_worlds` **(** **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`warp_mouse` **(** :ref:`Vector2` to_pos **)** | -+--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World` | :ref:`find_world` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World2D` | :ref:`find_world_2d` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Camera` | :ref:`get_camera` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_canvas_transform` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_final_transform` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_global_canvas_transform` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_mouse_pos` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_physics_object_picking` **(** **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_rect` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_render_target_clear_on_new_frame` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_render_target_filter` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_render_target_gen_mipmaps` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RenderTargetTexture` | :ref:`get_render_target_texture` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_render_target_update_mode` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_render_target_vflip` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_screen_capture` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_size_override` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_viewport` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_visible_rect` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World` | :ref:`get_world` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`gui_get_drag_data` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`gui_has_modal_stack` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_transparent_background` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input` **(** :ref:`InputEvent` local_event **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_audio_listener` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_audio_listener_2d` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_input_disabled` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_set_as_render_target` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_size_override_enabled` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_size_override_stretch_enabled` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_own_world` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_screen_capture` **(** **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`render_target_clear` **(** **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_audio_listener` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_audio_listener_2d` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_render_target` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_canvas_transform` **(** :ref:`Matrix32` xform **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disable_input` **(** :ref:`bool` disable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_global_canvas_transform` **(** :ref:`Matrix32` xform **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_physics_object_picking` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rect` **(** :ref:`Rect2` rect **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_clear_on_new_frame` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_filter` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_gen_mipmaps` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_to_screen_rect` **(** :ref:`Rect2` rect **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_update_mode` **(** :ref:`int` mode **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_vflip` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_size_override` **(** :ref:`bool` enable, :ref:`Vector2` size=Vector2((-1, -1)), :ref:`Vector2` margin=Vector2((0, 0)) **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_size_override_stretch` **(** :ref:`bool` enabled **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transparent_background` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_own_world` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_world` **(** :ref:`World` world **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unhandled_input` **(** :ref:`InputEvent` local_event **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_worlds` **(** **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`warp_mouse` **(** :ref:`Vector2` to_pos **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -279,6 +281,12 @@ Return the final, visible rect in global screen coordinates. Return the 3D world of the viewport. +.. _class_Viewport_gui_get_drag_data: + +- :ref:`Variant` **gui_get_drag_data** **(** **)** const + +Returs the drag data from the GUI, that was previously returned by :ref:`Control.get_drag_data`. + .. _class_Viewport_gui_has_modal_stack: - :ref:`bool` **gui_has_modal_stack** **(** **)** const @@ -435,7 +443,7 @@ Set whether the render target should be flipped on the Y axis. .. _class_Viewport_set_size_override: -- void **set_size_override** **(** :ref:`bool` enable, :ref:`Vector2` size=Vector2(-1,-1), :ref:`Vector2` margin=Vector2(0,0) **)** +- void **set_size_override** **(** :ref:`bool` enable, :ref:`Vector2` size=Vector2((-1, -1)), :ref:`Vector2` margin=Vector2((0, 0)) **)** Set the size of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to ``(-1, -1)``, it won't update the size. diff --git a/classes/class_visibilityenabler2d.rst b/classes/class_visibilityenabler2d.rst index 4e8b4a4bc..15c9d4107 100644 --- a/classes/class_visibilityenabler2d.rst +++ b/classes/class_visibilityenabler2d.rst @@ -30,9 +30,10 @@ Numeric Constants - **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody2D` nodes. - **ENABLER_PAUSE_ANIMATIONS** = **0** --- This enabler will pause :ref:`AnimationPlayer` nodes. - **ENABLER_PAUSE_PARTICLES** = **2** --- This enabler will stop :ref:`Particles2D` nodes. +- **ENABLER_PAUSE_ANIMATED_SPRITES** = **5** - **ENABLER_PARENT_PROCESS** = **3** --- This enabler will stop the parent's _process function. - **ENABLER_PARENT_FIXED_PROCESS** = **4** --- This enabler will stop the parent's _fixed_process function. -- **ENABLER_MAX** = **5** +- **ENABLER_MAX** = **6** Description ----------- diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index dacd0132c..2c8841cbc 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -39,7 +39,7 @@ Member Functions +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_rect` **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`Color` arg2 **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_style_box` **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`RealArray` arg3, :ref:`Color` arg4=Color(1,1,1,1) **)** | +| void | :ref:`canvas_item_add_style_box` **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`Rect2` arg2, :ref:`RID` arg3, :ref:`RealArray` arg4, :ref:`Color` arg5=Color(1,1,1,1) **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_texture_rect` **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`bool` arg3, :ref:`Color` arg4=Color(1,1,1,1), :ref:`bool` arg5=false **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -75,7 +75,7 @@ Member Functions +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`cursor_set_rotation` **(** :ref:`float` arg0, :ref:`int` arg1 **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cursor_set_texture` **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`int` arg2 **)** | +| void | :ref:`cursor_set_texture` **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`int` arg2, :ref:`Rect2` arg3 **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`cursor_set_visible` **(** :ref:`bool` arg0, :ref:`int` arg1 **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -167,7 +167,7 @@ Member Functions +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`material_set_line_width` **(** :ref:`RID` arg0, :ref:`float` arg1 **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`material_set_param` **(** :ref:`RID` arg0, :ref:`String` arg1, var arg2 **)** | +| void | :ref:`material_set_param` **(** :ref:`RID` arg0, :ref:`String` arg1, :ref:`Variant` arg2 **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`material_set_shader` **(** :ref:`RID` shader, :ref:`RID` arg1 **)** | +------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -512,7 +512,7 @@ Member Function Description .. _class_VisualServer_canvas_item_add_style_box: -- void **canvas_item_add_style_box** **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`RealArray` arg3, :ref:`Color` arg4=Color(1,1,1,1) **)** +- void **canvas_item_add_style_box** **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`Rect2` arg2, :ref:`RID` arg3, :ref:`RealArray` arg4, :ref:`Color` arg5=Color(1,1,1,1) **)** .. _class_VisualServer_canvas_item_add_texture_rect: @@ -584,7 +584,7 @@ Member Function Description .. _class_VisualServer_cursor_set_texture: -- void **cursor_set_texture** **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`int` arg2 **)** +- void **cursor_set_texture** **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`int` arg2, :ref:`Rect2` arg3 **)** .. _class_VisualServer_cursor_set_visible: @@ -768,7 +768,7 @@ Member Function Description .. _class_VisualServer_material_set_param: -- void **material_set_param** **(** :ref:`RID` arg0, :ref:`String` arg1, var arg2 **)** +- void **material_set_param** **(** :ref:`RID` arg0, :ref:`String` arg1, :ref:`Variant` arg2 **)** .. _class_VisualServer_material_set_shader: diff --git a/classes/class_world2d.rst b/classes/class_world2d.rst index 20afbc43d..fe3ad1c06 100644 --- a/classes/class_world2d.rst +++ b/classes/class_world2d.rst @@ -40,16 +40,24 @@ Member Function Description - :ref:`RID` **get_canvas** **(** **)** +Retrieve the :ref:`RID` of this world's canvas resource. Used by the :ref:`VisualServer` for 2D drawing. + .. _class_World2D_get_direct_space_state: - :ref:`Physics2DDirectSpaceState` **get_direct_space_state** **(** **)** +Retrieve the state of this world's physics space. This allows arbitrary querying for collision. + .. _class_World2D_get_sound_space: - :ref:`RID` **get_sound_space** **(** **)** +Retrieve the :ref:`RID` of this world's sound space resource. Used by the :ref:`SpatialSound2DServer` for 2D spatial audio. + .. _class_World2D_get_space: - :ref:`RID` **get_space** **(** **)** +Retrieve the :ref:`RID` of this world's physics space resource. Used by the :ref:`Physics2DServer` for 2D physics, treating it as both a space and an area. +