From e2662b0d0f3aa595b0f63d54826c55429cdeec7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 7 Nov 2017 11:11:44 +0100 Subject: [PATCH] classref: Sync with current master branch --- classes/class_@gdscript.rst | 50 ++++ classes/class_@global scope.rst | 300 +++++++++---------- classes/class_area.rst | 2 +- classes/class_area2d.rst | 2 +- classes/class_arraymesh.rst | 2 +- classes/class_arvranchor.rst | 2 +- classes/class_arvrcontroller.rst | 4 +- classes/class_arvrorigin.rst | 4 +- classes/class_arvrpositionaltracker.rst | 8 +- classes/class_arvrserver.rst | 4 +- classes/class_astar.rst | 42 ++- classes/class_audioeffectbandlimitfilter.rst | 5 + classes/class_audioeffectbandpassfilter.rst | 5 + classes/class_audioeffectfilter.rst | 17 +- classes/class_audioeffecthighpassfilter.rst | 5 + classes/class_audioeffectlowpassfilter.rst | 5 + classes/class_audioeffectnotchfilter.rst | 5 + classes/class_basebutton.rst | 18 +- classes/class_bitmapfont.rst | 4 +- classes/class_camera2d.rst | 22 +- classes/class_canvasitem.rst | 2 +- classes/class_canvaslayer.rst | 2 +- classes/class_capsuleshape2d.rst | 8 +- classes/class_concavepolygonshape2d.rst | 2 +- classes/class_conetwistjoint.rst | 4 +- classes/class_container.rst | 2 +- classes/class_control.rst | 4 +- classes/class_convexpolygonshape2d.rst | 2 +- classes/class_cubemap.rst | 27 +- classes/class_curve2d.rst | 6 +- classes/class_dampedspringjoint2d.rst | 8 +- classes/class_dictionary.rst | 4 +- classes/class_editorimportplugin.rst | 4 +- classes/class_editorplugin.rst | 1 + classes/class_editorscript.rst | 4 +- classes/class_engine.rst | 2 +- classes/class_environment.rst | 57 +++- classes/class_funcref.rst | 2 +- classes/class_geometry.rst | 54 ++++ classes/class_giprobe.rst | 1 + classes/class_groovejoint2d.rst | 4 +- classes/class_httpclient.rst | 22 +- classes/class_image.rst | 104 ++++++- classes/class_imagetexture.rst | 18 +- classes/class_inputeventjoypadmotion.rst | 2 +- classes/class_inputmap.rst | 2 +- classes/class_joint2d.rst | 8 +- classes/class_jsonparseresult.rst | 2 +- classes/class_kinematicbody.rst | 2 +- classes/class_kinematicbody2d.rst | 2 +- classes/class_light.rst | 1 + classes/class_lineedit.rst | 89 +++--- classes/class_linkbutton.rst | 2 +- classes/class_mainloop.rst | 3 +- classes/class_mutex.rst | 6 +- classes/class_networkedmultiplayerpeer.rst | 4 +- classes/class_node.rst | 22 +- classes/class_node2d.rst | 46 +-- classes/class_nodepath.rst | 4 +- classes/class_occluderpolygon2d.rst | 19 +- classes/class_optionbutton.rst | 2 +- classes/class_os.rst | 2 +- classes/class_packetpeerudp.rst | 6 +- classes/class_parallaxbackground.rst | 14 +- classes/class_parallaxlayer.rst | 10 +- classes/class_path2d.rst | 6 +- classes/class_performance.rst | 2 +- classes/class_physics2ddirectspacestate.rst | 2 +- classes/class_physics2dserver.rst | 1 + classes/class_physicsdirectspacestate.rst | 2 +- classes/class_physicsserver.rst | 2 +- classes/class_poolbytearray.rst | 8 +- classes/class_poolcolorarray.rst | 2 +- classes/class_poolintarray.rst | 2 +- classes/class_poolvector2array.rst | 4 +- classes/class_poolvector3array.rst | 2 +- classes/class_quat.rst | 26 +- classes/class_raycast.rst | 106 ++++--- classes/class_raycast2d.rst | 114 +++---- classes/class_rect2.rst | 28 +- classes/class_rect3.rst | 44 +-- classes/class_remotetransform.rst | 19 +- classes/class_remotetransform2d.rst | 19 +- classes/class_resource.rst | 4 +- classes/class_resourceloader.rst | 2 +- classes/class_richtextlabel.rst | 39 ++- classes/class_rigidbody.rst | 4 +- classes/class_rigidbody2d.rst | 4 +- classes/class_script.rst | 6 - classes/class_semaphore.rst | 4 +- classes/class_spatial.rst | 2 +- classes/class_streampeer.rst | 6 +- classes/class_streampeerssl.rst | 6 +- classes/class_streampeertcp.rst | 8 +- classes/class_string.rst | 168 +++++++---- classes/class_surfacetool.rst | 4 +- classes/class_tabcontainer.rst | 50 ++-- classes/class_tabs.rst | 2 +- classes/class_textedit.rst | 16 + classes/class_texture.rst | 2 +- classes/class_thread.rst | 8 +- classes/class_transform2d.rst | 6 +- classes/class_translationserver.rst | 6 + classes/class_treeitem.rst | 2 +- classes/class_tween.rst | 4 +- classes/class_vector3.rst | 24 +- classes/class_visibilityenabler.rst | 2 +- classes/class_visibilityenabler2d.rst | 4 +- classes/class_visualserver.rst | 1 - classes/class_worldenvironment.rst | 2 +- 110 files changed, 1175 insertions(+), 698 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 5516ae971..2c2fd5e14 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -168,6 +168,10 @@ Member Functions +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`weakref` **(** :ref:`Object` obj **)** | +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`wrapf` **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** | ++------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`wrapi` **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** | ++------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`GDFunctionState` | :ref:`yield` **(** :ref:`Object` object, :ref:`String` signal **)** | +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1050,6 +1054,52 @@ Returns a weak reference to an object. A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it. +.. _class_@GDScript_wrapf: + +- :ref:`float` **wrapf** **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** + +Wraps float ``value`` between ``min`` and ``max``. + +Usable for creating loop-alike behavior or infinite surfaces. + +:: + + # a is 0.5 + a = wrapf(10.5, 0.0, 10.0) + +:: + + # a is 9.5 + a = wrapf(-0.5, 0.0, 10.0) + +:: + + # infinite loop between 0.0 and 0.99 + f = wrapf(f + 0.1, 0.0, 1.0) + +.. _class_@GDScript_wrapi: + +- :ref:`int` **wrapi** **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** + +Wraps integer ``value`` between ``min`` and ``max``. + +Usable for creating loop-alike behavior or infinite surfaces. + +:: + + # a is 0 + a = wrapi(10, 0, 10) + +:: + + # a is 9 + a = wrapi(-1, 0, 10) + +:: + + # infinite loop between 0 and 9 + frame = wrapi(frame + 1, 0, 10) + .. _class_@GDScript_yield: - :ref:`GDFunctionState` **yield** **(** :ref:`Object` object, :ref:`String` signal **)** diff --git a/classes/class_@global scope.rst b/classes/class_@global scope.rst index ef1cd68ce..0a6668ef6 100644 --- a/classes/class_@global scope.rst +++ b/classes/class_@global scope.rst @@ -39,7 +39,7 @@ Member Variables .. _class_@Global Scope_GodotSharp: -- :ref:`GodotSharp` **GodotSharp** +- :ref:`GodotSharp` **GodotSharp** - :ref:`GodotSharp` singleton .. _class_@Global Scope_IP: @@ -55,7 +55,7 @@ Member Variables .. _class_@Global Scope_JSON: -- :ref:`JSON` **JSON** +- :ref:`JSON` **JSON** - :ref:`JSON` singleton .. _class_@Global Scope_Marshalls: @@ -124,8 +124,8 @@ Numeric Constants - **KEY_DELETE** = **16777224** --- Delete Key - **KEY_PAUSE** = **16777225** --- Pause Key - **KEY_PRINT** = **16777226** --- Printscreen Key -- **KEY_SYSREQ** = **16777227** -- **KEY_CLEAR** = **16777228** +- **KEY_SYSREQ** = **16777227** --- System Request Key +- **KEY_CLEAR** = **16777228** --- Clear Key - **KEY_HOME** = **16777229** --- Home Key - **KEY_END** = **16777230** --- End Key - **KEY_LEFT** = **16777231** --- Left Arrow Key @@ -136,7 +136,7 @@ Numeric Constants - **KEY_PAGEDOWN** = **16777236** --- Pagedown Key - **KEY_SHIFT** = **16777237** --- Shift Key - **KEY_CONTROL** = **16777238** --- Control Key -- **KEY_META** = **16777239** +- **KEY_META** = **16777239** --- Meta Key - **KEY_ALT** = **16777240** --- Alt Key - **KEY_CAPSLOCK** = **16777241** --- Capslock Key - **KEY_NUMLOCK** = **16777242** --- Numlock Key @@ -172,14 +172,14 @@ Numeric Constants - **KEY_KP_7** = **16777357** --- Number 7 on Numpad - **KEY_KP_8** = **16777358** --- Number 8 on Numpad - **KEY_KP_9** = **16777359** --- Number 9 on Numpad -- **KEY_SUPER_L** = **16777260** --- Super Left key (windows key) -- **KEY_SUPER_R** = **16777261** --- Super Left key (windows key) +- **KEY_SUPER_L** = **16777260** --- Left Super Key (Windows Key) +- **KEY_SUPER_R** = **16777261** --- Right Super Key (Windows Key) - **KEY_MENU** = **16777262** --- Context menu key -- **KEY_HYPER_L** = **16777263** -- **KEY_HYPER_R** = **16777264** +- **KEY_HYPER_L** = **16777263** --- Left Hyper Key +- **KEY_HYPER_R** = **16777264** --- Right Hyper Key - **KEY_HELP** = **16777265** --- Help key -- **KEY_DIRECTION_L** = **16777266** -- **KEY_DIRECTION_R** = **16777267** +- **KEY_DIRECTION_L** = **16777266** --- Left Direction Key +- **KEY_DIRECTION_R** = **16777267** --- Right Direction Key - **KEY_BACK** = **16777280** --- Back key - **KEY_FORWARD** = **16777281** --- Forward key - **KEY_STOP** = **16777282** --- Stop key @@ -187,11 +187,11 @@ Numeric Constants - **KEY_VOLUMEDOWN** = **16777284** --- Volume down key - **KEY_VOLUMEMUTE** = **16777285** --- Mute volume key - **KEY_VOLUMEUP** = **16777286** --- Volume up key -- **KEY_BASSBOOST** = **16777287** -- **KEY_BASSUP** = **16777288** -- **KEY_BASSDOWN** = **16777289** -- **KEY_TREBLEUP** = **16777290** -- **KEY_TREBLEDOWN** = **16777291** +- **KEY_BASSBOOST** = **16777287** --- Bass Boost Key +- **KEY_BASSUP** = **16777288** --- Bass Up Key +- **KEY_BASSDOWN** = **16777289** --- Bass Down Key +- **KEY_TREBLEUP** = **16777290** --- Treble Up Key +- **KEY_TREBLEDOWN** = **16777291** --- Treble Down Key - **KEY_MEDIAPLAY** = **16777292** --- Media play key - **KEY_MEDIASTOP** = **16777293** --- Media stop key - **KEY_MEDIAPREVIOUS** = **16777294** --- Previous song key @@ -200,27 +200,27 @@ Numeric Constants - **KEY_HOMEPAGE** = **16777297** --- Home page key - **KEY_FAVORITES** = **16777298** --- Favorites key - **KEY_SEARCH** = **16777299** --- Search key -- **KEY_STANDBY** = **16777300** -- **KEY_OPENURL** = **16777301** -- **KEY_LAUNCHMAIL** = **16777302** -- **KEY_LAUNCHMEDIA** = **16777303** -- **KEY_LAUNCH0** = **16777304** -- **KEY_LAUNCH1** = **16777305** -- **KEY_LAUNCH2** = **16777306** -- **KEY_LAUNCH3** = **16777307** -- **KEY_LAUNCH4** = **16777308** -- **KEY_LAUNCH5** = **16777309** -- **KEY_LAUNCH6** = **16777310** -- **KEY_LAUNCH7** = **16777311** -- **KEY_LAUNCH8** = **16777312** -- **KEY_LAUNCH9** = **16777313** -- **KEY_LAUNCHA** = **16777314** -- **KEY_LAUNCHB** = **16777315** -- **KEY_LAUNCHC** = **16777316** -- **KEY_LAUNCHD** = **16777317** -- **KEY_LAUNCHE** = **16777318** -- **KEY_LAUNCHF** = **16777319** -- **KEY_UNKNOWN** = **33554431** +- **KEY_STANDBY** = **16777300** --- Standby Key +- **KEY_OPENURL** = **16777301** --- Open URL / Launch Browser Key +- **KEY_LAUNCHMAIL** = **16777302** --- Launch Mail Key +- **KEY_LAUNCHMEDIA** = **16777303** --- Launch Media Key +- **KEY_LAUNCH0** = **16777304** --- Launch Shortcut 0 Key +- **KEY_LAUNCH1** = **16777305** --- Launch Shortcut 1 Key +- **KEY_LAUNCH2** = **16777306** --- Launch Shortcut 2 Key +- **KEY_LAUNCH3** = **16777307** --- Launch Shortcut 3 Key +- **KEY_LAUNCH4** = **16777308** --- Launch Shortcut 4 Key +- **KEY_LAUNCH5** = **16777309** --- Launch Shortcut 5 Key +- **KEY_LAUNCH6** = **16777310** --- Launch Shortcut 6 Key +- **KEY_LAUNCH7** = **16777311** --- Launch Shortcut 7 Key +- **KEY_LAUNCH8** = **16777312** --- Launch Shortcut 8 Key +- **KEY_LAUNCH9** = **16777313** --- Launch Shortcut 9 Key +- **KEY_LAUNCHA** = **16777314** --- Launch Shortcut A Key +- **KEY_LAUNCHB** = **16777315** --- Launch Shortcut B Key +- **KEY_LAUNCHC** = **16777316** --- Launch Shortcut C Key +- **KEY_LAUNCHD** = **16777317** --- Launch Shortcut D Key +- **KEY_LAUNCHE** = **16777318** --- Launch Shortcut E Key +- **KEY_LAUNCHF** = **16777319** --- Launch Shortcut F Key +- **KEY_UNKNOWN** = **33554431** --- Unknown Key - **KEY_SPACE** = **32** --- Space Key - **KEY_EXCLAM** = **33** --- ! key - **KEY_QUOTEDBL** = **34** --- " key @@ -285,7 +285,7 @@ Numeric Constants - **KEY_BRACKETRIGHT** = **93** --- ] key - **KEY_ASCIICIRCUM** = **94** --- ^ key - **KEY_UNDERSCORE** = **95** --- \_ key -- **KEY_QUOTELEFT** = **96** +- **KEY_QUOTELEFT** = **96** --- Left Quote Key - **KEY_BRACELEFT** = **123** --- { key - **KEY_BAR** = **124** --- | key - **KEY_BRACERIGHT** = **125** --- } key @@ -295,7 +295,7 @@ Numeric Constants - **KEY_CENT** = **162** --- ¢ key - **KEY_STERLING** = **163** - **KEY_CURRENCY** = **164** -- **KEY_YEN** = **165** +- **KEY_YEN** = **165** --- Yen Key - **KEY_BROKENBAR** = **166** --- ¦ key - **KEY_SECTION** = **167** --- § key - **KEY_DIAERESIS** = **168** --- ¨ key @@ -305,66 +305,66 @@ Numeric Constants - **KEY_NOTSIGN** = **172** --- » key - **KEY_HYPHEN** = **173** --- ‐ key - **KEY_REGISTERED** = **174** --- ® key -- **KEY_MACRON** = **175** +- **KEY_MACRON** = **175** --- Macron Key - **KEY_DEGREE** = **176** --- ° key - **KEY_PLUSMINUS** = **177** --- ± key - **KEY_TWOSUPERIOR** = **178** --- ² key - **KEY_THREESUPERIOR** = **179** --- ³ key - **KEY_ACUTE** = **180** --- ´ key - **KEY_MU** = **181** --- µ key -- **KEY_PARAGRAPH** = **182** +- **KEY_PARAGRAPH** = **182** --- Paragraph Key - **KEY_PERIODCENTERED** = **183** --- · key - **KEY_CEDILLA** = **184** --- ¬ key -- **KEY_ONESUPERIOR** = **185** -- **KEY_MASCULINE** = **186** -- **KEY_GUILLEMOTRIGHT** = **187** -- **KEY_ONEQUARTER** = **188** +- **KEY_ONESUPERIOR** = **185** --- ¹ key +- **KEY_MASCULINE** = **186** --- ♂ key +- **KEY_GUILLEMOTRIGHT** = **187** --- » key +- **KEY_ONEQUARTER** = **188** --- ¼ key - **KEY_ONEHALF** = **189** --- ½ key -- **KEY_THREEQUARTERS** = **190** -- **KEY_QUESTIONDOWN** = **191** -- **KEY_AGRAVE** = **192** -- **KEY_AACUTE** = **193** -- **KEY_ACIRCUMFLEX** = **194** -- **KEY_ATILDE** = **195** -- **KEY_ADIAERESIS** = **196** -- **KEY_ARING** = **197** -- **KEY_AE** = **198** -- **KEY_CCEDILLA** = **199** -- **KEY_EGRAVE** = **200** -- **KEY_EACUTE** = **201** -- **KEY_ECIRCUMFLEX** = **202** -- **KEY_EDIAERESIS** = **203** -- **KEY_IGRAVE** = **204** -- **KEY_IACUTE** = **205** -- **KEY_ICIRCUMFLEX** = **206** -- **KEY_IDIAERESIS** = **207** -- **KEY_ETH** = **208** -- **KEY_NTILDE** = **209** -- **KEY_OGRAVE** = **210** -- **KEY_OACUTE** = **211** -- **KEY_OCIRCUMFLEX** = **212** -- **KEY_OTILDE** = **213** -- **KEY_ODIAERESIS** = **214** -- **KEY_MULTIPLY** = **215** -- **KEY_OOBLIQUE** = **216** -- **KEY_UGRAVE** = **217** -- **KEY_UACUTE** = **218** -- **KEY_UCIRCUMFLEX** = **219** -- **KEY_UDIAERESIS** = **220** -- **KEY_YACUTE** = **221** -- **KEY_THORN** = **222** -- **KEY_SSHARP** = **223** -- **KEY_DIVISION** = **247** -- **KEY_YDIAERESIS** = **255** -- **KEY_CODE_MASK** = **33554431** -- **KEY_MODIFIER_MASK** = **-16777216** -- **KEY_MASK_SHIFT** = **33554432** -- **KEY_MASK_ALT** = **67108864** -- **KEY_MASK_META** = **134217728** -- **KEY_MASK_CTRL** = **268435456** -- **KEY_MASK_CMD** = **268435456** -- **KEY_MASK_KPAD** = **536870912** -- **KEY_MASK_GROUP_SWITCH** = **1073741824** +- **KEY_THREEQUARTERS** = **190** --- ¾ key +- **KEY_QUESTIONDOWN** = **191** --- ¿ key +- **KEY_AGRAVE** = **192** --- à key +- **KEY_AACUTE** = **193** --- á key +- **KEY_ACIRCUMFLEX** = **194** --- â key +- **KEY_ATILDE** = **195** --- ã key +- **KEY_ADIAERESIS** = **196** --- ä key +- **KEY_ARING** = **197** --- å key +- **KEY_AE** = **198** --- æ key +- **KEY_CCEDILLA** = **199** --- ç key +- **KEY_EGRAVE** = **200** --- è key +- **KEY_EACUTE** = **201** --- é key +- **KEY_ECIRCUMFLEX** = **202** --- ê key +- **KEY_EDIAERESIS** = **203** --- ë key +- **KEY_IGRAVE** = **204** --- ì key +- **KEY_IACUTE** = **205** --- í key +- **KEY_ICIRCUMFLEX** = **206** --- î key +- **KEY_IDIAERESIS** = **207** --- ë key +- **KEY_ETH** = **208** --- ð key +- **KEY_NTILDE** = **209** --- ñ key +- **KEY_OGRAVE** = **210** --- ò key +- **KEY_OACUTE** = **211** --- ó key +- **KEY_OCIRCUMFLEX** = **212** --- ô key +- **KEY_OTILDE** = **213** --- õ key +- **KEY_ODIAERESIS** = **214** --- ö key +- **KEY_MULTIPLY** = **215** --- × key +- **KEY_OOBLIQUE** = **216** --- ø key +- **KEY_UGRAVE** = **217** --- ù key +- **KEY_UACUTE** = **218** --- ú key +- **KEY_UCIRCUMFLEX** = **219** --- û key +- **KEY_UDIAERESIS** = **220** --- ü key +- **KEY_YACUTE** = **221** --- ý key +- **KEY_THORN** = **222** --- þ key +- **KEY_SSHARP** = **223** --- ß key +- **KEY_DIVISION** = **247** --- ÷ key +- **KEY_YDIAERESIS** = **255** --- ÿ key +- **KEY_CODE_MASK** = **33554431** --- Key Code Mask +- **KEY_MODIFIER_MASK** = **-16777216** --- Modifier Key Mask +- **KEY_MASK_SHIFT** = **33554432** --- Shift Key Mask +- **KEY_MASK_ALT** = **67108864** --- Alt Key Mask +- **KEY_MASK_META** = **134217728** --- Meta Key Mask +- **KEY_MASK_CTRL** = **268435456** --- CTRL Key Mask +- **KEY_MASK_CMD** = **268435456** --- CMD Key Mask +- **KEY_MASK_KPAD** = **536870912** --- Keypad Key Mask +- **KEY_MASK_GROUP_SWITCH** = **1073741824** --- Group Switch Key Mask - **BUTTON_LEFT** = **1** --- Left Mouse Button - **BUTTON_RIGHT** = **2** --- Right Mouse Button - **BUTTON_MIDDLE** = **3** --- Middle Mouse Button @@ -372,9 +372,9 @@ Numeric Constants - **BUTTON_WHEEL_DOWN** = **5** --- Mouse wheel down - **BUTTON_WHEEL_LEFT** = **6** --- Mouse wheel left button - **BUTTON_WHEEL_RIGHT** = **7** --- Mouse wheel right button -- **BUTTON_MASK_LEFT** = **1** -- **BUTTON_MASK_RIGHT** = **2** -- **BUTTON_MASK_MIDDLE** = **4** +- **BUTTON_MASK_LEFT** = **1** --- Left Mouse Button Mask +- **BUTTON_MASK_RIGHT** = **2** --- Right Mouse Button Mask +- **BUTTON_MASK_MIDDLE** = **4** --- Middle Mouse Button Mask - **JOY_BUTTON_0** = **0** --- Joypad Button 0 - **JOY_BUTTON_1** = **1** --- Joypad Button 1 - **JOY_BUTTON_2** = **2** --- Joypad Button 2 @@ -400,10 +400,10 @@ Numeric Constants - **JOY_XBOX_A** = **0** --- XBOX controller A button - **JOY_XBOX_X** = **2** --- XBOX controller X button - **JOY_XBOX_Y** = **3** --- XBOX controller Y button -- **JOY_DS_A** = **1** -- **JOY_DS_B** = **0** -- **JOY_DS_X** = **3** -- **JOY_DS_Y** = **2** +- **JOY_DS_A** = **1** --- DualShock controller A button +- **JOY_DS_B** = **0** --- DualShock controller B button +- **JOY_DS_X** = **3** --- DualShock controller X button +- **JOY_DS_Y** = **2** --- DualShock controller Y button - **JOY_SELECT** = **10** --- Joypad Button Select - **JOY_START** = **11** --- Joypad Button Start - **JOY_DPAD_UP** = **12** --- Joypad DPad Up @@ -429,50 +429,50 @@ Numeric Constants - **JOY_ANALOG_LY** = **1** --- Joypad Left Stick Vertical Axis - **JOY_ANALOG_RX** = **2** --- Joypad Right Stick Horizontal Axis - **JOY_ANALOG_RY** = **3** --- Joypad Right Stick Vertical Axis -- **JOY_ANALOG_L2** = **6** -- **JOY_ANALOG_R2** = **7** -- **OK** = **0** --- Functions that return Error return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout. -- **FAILED** = **1** --- Generic fail return error. -- **ERR_UNAVAILABLE** = **2** -- **ERR_UNCONFIGURED** = **3** -- **ERR_UNAUTHORIZED** = **4** -- **ERR_PARAMETER_RANGE_ERROR** = **5** -- **ERR_OUT_OF_MEMORY** = **6** -- **ERR_FILE_NOT_FOUND** = **7** -- **ERR_FILE_BAD_DRIVE** = **8** -- **ERR_FILE_BAD_PATH** = **9** -- **ERR_FILE_NO_PERMISSION** = **10** -- **ERR_FILE_ALREADY_IN_USE** = **11** -- **ERR_FILE_CANT_OPEN** = **12** -- **ERR_FILE_CANT_WRITE** = **13** -- **ERR_FILE_CANT_READ** = **14** -- **ERR_FILE_UNRECOGNIZED** = **15** -- **ERR_FILE_CORRUPT** = **16** -- **ERR_FILE_MISSING_DEPENDENCIES** = **17** -- **ERR_FILE_EOF** = **18** -- **ERR_CANT_OPEN** = **19** -- **ERR_CANT_CREATE** = **20** -- **ERR_PARSE_ERROR** = **43** -- **ERR_QUERY_FAILED** = **21** -- **ERR_ALREADY_IN_USE** = **22** -- **ERR_LOCKED** = **23** -- **ERR_TIMEOUT** = **24** -- **ERR_CANT_ACQUIRE_RESOURCE** = **28** -- **ERR_INVALID_DATA** = **30** -- **ERR_INVALID_PARAMETER** = **31** -- **ERR_ALREADY_EXISTS** = **32** -- **ERR_DOES_NOT_EXIST** = **33** -- **ERR_DATABASE_CANT_READ** = **34** -- **ERR_DATABASE_CANT_WRITE** = **35** -- **ERR_COMPILATION_FAILED** = **36** -- **ERR_METHOD_NOT_FOUND** = **37** -- **ERR_LINK_FAILED** = **38** -- **ERR_SCRIPT_FAILED** = **39** -- **ERR_CYCLIC_LINK** = **40** -- **ERR_BUSY** = **44** -- **ERR_HELP** = **46** -- **ERR_BUG** = **47** -- **ERR_WTF** = **49** +- **JOY_ANALOG_L2** = **6** --- Joypad Left Analog Trigger +- **JOY_ANALOG_R2** = **7** --- Joypad Right Analog Trigger +- **OK** = **0** --- Functions that return Error return OK when no error occured. Most functions don't return errors and/or just print errors to STDOUT. +- **FAILED** = **1** --- Generic error. +- **ERR_UNAVAILABLE** = **2** --- Unavailable error +- **ERR_UNCONFIGURED** = **3** --- Unconfigured error +- **ERR_UNAUTHORIZED** = **4** --- Unauthorized error +- **ERR_PARAMETER_RANGE_ERROR** = **5** --- Parameter range error +- **ERR_OUT_OF_MEMORY** = **6** --- Out of memory (OOM) error +- **ERR_FILE_NOT_FOUND** = **7** --- File: Not found error +- **ERR_FILE_BAD_DRIVE** = **8** --- File: Bad drive error +- **ERR_FILE_BAD_PATH** = **9** --- File: Bad path error +- **ERR_FILE_NO_PERMISSION** = **10** --- File: No permission error +- **ERR_FILE_ALREADY_IN_USE** = **11** --- File: Already in use error +- **ERR_FILE_CANT_OPEN** = **12** --- File: Can't open error +- **ERR_FILE_CANT_WRITE** = **13** --- File: Can't write error +- **ERR_FILE_CANT_READ** = **14** --- File: Can't read error +- **ERR_FILE_UNRECOGNIZED** = **15** --- File: Unrecognized error +- **ERR_FILE_CORRUPT** = **16** --- File: Corrupt error +- **ERR_FILE_MISSING_DEPENDENCIES** = **17** --- File: Missing dependencies error +- **ERR_FILE_EOF** = **18** --- File: End of file (EOF) error +- **ERR_CANT_OPEN** = **19** --- Can't open error +- **ERR_CANT_CREATE** = **20** --- Can't create error +- **ERR_PARSE_ERROR** = **43** --- Parse error +- **ERR_QUERY_FAILED** = **21** --- Query failed error +- **ERR_ALREADY_IN_USE** = **22** --- Already in use error +- **ERR_LOCKED** = **23** --- Locked error +- **ERR_TIMEOUT** = **24** --- Timeout error +- **ERR_CANT_ACQUIRE_RESOURCE** = **28** --- Can't acquire resource error +- **ERR_INVALID_DATA** = **30** --- Invalid data error +- **ERR_INVALID_PARAMETER** = **31** --- Invalid parameter error +- **ERR_ALREADY_EXISTS** = **32** --- Already exists error +- **ERR_DOES_NOT_EXIST** = **33** --- Does not exist error +- **ERR_DATABASE_CANT_READ** = **34** --- Database: Read error +- **ERR_DATABASE_CANT_WRITE** = **35** --- Database: Write error +- **ERR_COMPILATION_FAILED** = **36** --- Compilation failed error +- **ERR_METHOD_NOT_FOUND** = **37** --- Method not found error +- **ERR_LINK_FAILED** = **38** --- Linking failed error +- **ERR_SCRIPT_FAILED** = **39** --- Script failed error +- **ERR_CYCLIC_LINK** = **40** --- Cycling link (import cycle) error +- **ERR_BUSY** = **44** --- Busy error +- **ERR_HELP** = **46** --- Help error +- **ERR_BUG** = **47** --- Bug error +- **ERR_WTF** = **49** --- WTF error (something probably went really wrong) - **PROPERTY_HINT_NONE** = **0** --- No hint for edited property. - **PROPERTY_HINT_RANGE** = **1** --- Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats. - **PROPERTY_HINT_EXP_RANGE** = **2** --- Hints that the string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats. @@ -492,8 +492,8 @@ Numeric Constants - **PROPERTY_HINT_RESOURCE_TYPE** = **17** --- String property is a resource, so open the resource popup menu when edited. - **PROPERTY_HINT_MULTILINE_TEXT** = **18** - **PROPERTY_HINT_COLOR_NO_ALPHA** = **19** -- **PROPERTY_HINT_IMAGE_COMPRESS_LOSSY** = **20** -- **PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS** = **21** +- **PROPERTY_HINT_IMAGE_COMPRESS_LOSSY** = **20** --- Hints that the image is compressed using lossy compression. +- **PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS** = **21** --- Hints that the image is compressed using lossless compression. - **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** @@ -511,14 +511,14 @@ Numeric Constants - **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_NORMAL** = **1** --- Flag for normal method +- **METHOD_FLAG_EDITOR** = **2** --- Flag for editor method - **METHOD_FLAG_NOSCRIPT** = **4** -- **METHOD_FLAG_CONST** = **8** +- **METHOD_FLAG_CONST** = **8** --- Flag for constant method - **METHOD_FLAG_REVERSE** = **16** -- **METHOD_FLAG_VIRTUAL** = **32** -- **METHOD_FLAG_FROM_SCRIPT** = **64** -- **METHOD_FLAGS_DEFAULT** = **1** +- **METHOD_FLAG_VIRTUAL** = **32** --- Flag for virtual method +- **METHOD_FLAG_FROM_SCRIPT** = **64** --- Flag for method from script +- **METHOD_FLAGS_DEFAULT** = **1** --- Default method flags - **TYPE_NIL** = **0** --- Variable is of type nil (only applied for null). - **TYPE_BOOL** = **1** --- Variable is of type :ref:`bool`. - **TYPE_INT** = **2** --- Variable is of type :ref:`int`. @@ -546,7 +546,7 @@ Numeric Constants - **TYPE_VECTOR2_ARRAY** = **24** --- Variable is of type :ref:`PoolVector2Array`. - **TYPE_VECTOR3_ARRAY** = **25** --- Variable is of type :ref:`PoolVector3Array`. - **TYPE_COLOR_ARRAY** = **26** --- Variable is of type :ref:`PoolColorArray`. -- **TYPE_MAX** = **27** +- **TYPE_MAX** = **27** --- Marker for end of type constants. Description ----------- diff --git a/classes/class_area.rst b/classes/class_area.rst index b8484ac80..d354fcaa9 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -316,7 +316,7 @@ Return the linear damp rate. - :ref:`Array` **get_overlapping_areas** **(** **)** const -Returns a list of intersecting :ref:`Area`\ s. +Returns a list of intersecting ``Area``s. .. _class_Area_get_overlapping_bodies: diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 0418597ea..7d89b5d00 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -284,7 +284,7 @@ Return the linear damp rate. - :ref:`Array` **get_overlapping_areas** **(** **)** const -Returns a list of intersecting :ref:`Area2D`\ s. +Returns a list of intersecting ``Area2D``s. .. _class_Area2D_get_overlapping_bodies: diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 6d70b51eb..45604eddb 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -135,7 +135,7 @@ Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_ - :ref:`int` **get_surface_count** **(** **)** const -Return the amount of surfaces that the :ref:`ArrayMesh` holds. +Return the amount of surfaces that the ``ArrayMesh`` holds. .. _class_ArrayMesh_regen_normalmaps: diff --git a/classes/class_arvranchor.rst b/classes/class_arvranchor.rst index 0f40c1484..a29aec3d4 100644 --- a/classes/class_arvranchor.rst +++ b/classes/class_arvranchor.rst @@ -38,7 +38,7 @@ Member Variables .. _class_ARVRAnchor_anchor_id: -- :ref:`int` **anchor_id** +- :ref:`int` **anchor_id** - The anchor's id. You can set this before the anchor itself exists. The first anchor gets an id of ``1``, the second an id of ``2``, etc. When anchors get removed, the engine can then assign the corresponding id to new anchors. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merges them. Description diff --git a/classes/class_arvrcontroller.rst b/classes/class_arvrcontroller.rst index b947e7a72..a70a74d79 100644 --- a/classes/class_arvrcontroller.rst +++ b/classes/class_arvrcontroller.rst @@ -58,7 +58,7 @@ Member Variables .. _class_ARVRController_controller_id: -- :ref:`int` **controller_id** +- :ref:`int` **controller_id** - The controller's id. The first controller that the :ref:`ARVRServer` detects will have id 1, the second id 2, the third id 3, etc. When a controller is turned off, it's slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off. Description @@ -89,6 +89,8 @@ If active, returns the name of the associated controller if provided by the AR/V - :ref:`int` **get_hand** **(** **)** const +Returns the hand holding this controller, if known. See TRACKER\_\* constants in :ref:`ARVRPositionalTracker`. + .. _class_ARVRController_get_is_active: - :ref:`bool` **get_is_active** **(** **)** const diff --git a/classes/class_arvrorigin.rst b/classes/class_arvrorigin.rst index 562a11e76..b4347807e 100644 --- a/classes/class_arvrorigin.rst +++ b/classes/class_arvrorigin.rst @@ -30,7 +30,9 @@ Member Variables .. _class_ARVROrigin_world_scale: -- :ref:`float` **world_scale** +- :ref:`float` **world_scale** - Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world. + +Note that this method is a passthrough to the :ref:`ARVRServer` itself. Description diff --git a/classes/class_arvrpositionaltracker.rst b/classes/class_arvrpositionaltracker.rst index d54bac662..1e43f23a2 100644 --- a/classes/class_arvrpositionaltracker.rst +++ b/classes/class_arvrpositionaltracker.rst @@ -42,9 +42,9 @@ Member Functions Numeric Constants ----------------- -- **TRACKER_HAND_UNKNOWN** = **0** -- **TRACKER_LEFT_HAND** = **1** -- **TRACKER_RIGHT_HAND** = **2** +- **TRACKER_HAND_UNKNOWN** = **0** --- The hand this tracker is held in is unknown or not applicable. +- **TRACKER_LEFT_HAND** = **1** --- This tracker is the left hand controller. +- **TRACKER_RIGHT_HAND** = **2** --- This tracker is the right hand controller. Description ----------- @@ -62,6 +62,8 @@ Member Function Description - :ref:`int` **get_hand** **(** **)** const +Returns the hand holding this tracker, if known. See TRACKER\_\* constants. + .. _class_ARVRPositionalTracker_get_joy_id: - :ref:`int` **get_joy_id** **(** **)** const diff --git a/classes/class_arvrserver.rst b/classes/class_arvrserver.rst index 729cd9bd6..b3333f14d 100644 --- a/classes/class_arvrserver.rst +++ b/classes/class_arvrserver.rst @@ -78,7 +78,7 @@ Member Variables .. _class_ARVRServer_world_scale: -- :ref:`float` **world_scale** +- :ref:`float` **world_scale** - Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world. Numeric Constants @@ -87,8 +87,8 @@ Numeric Constants - **TRACKER_CONTROLLER** = **1** --- Our tracker tracks the location of a controller. - **TRACKER_BASESTATION** = **2** --- Our tracker tracks the location of a base station. - **TRACKER_ANCHOR** = **4** --- Our tracker tracks the location and size of an AR anchor. -- **TRACKER_UNKNOWN** = **128** --- Used internally if we haven't set the tracker type yet. - **TRACKER_ANY_KNOWN** = **127** --- Used internally to filter trackers of any known type. +- **TRACKER_UNKNOWN** = **128** --- Used internally if we haven't set the tracker type yet. - **TRACKER_ANY** = **255** --- Used internally to select all trackers. Description diff --git a/classes/class_astar.rst b/classes/class_astar.rst index 0506c88ca..0a8660c26 100644 --- a/classes/class_astar.rst +++ b/classes/class_astar.rst @@ -54,6 +54,12 @@ Member Functions +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_point` **(** :ref:`int` id **)** | +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector3` position **)** | ++--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | ++--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolIntArray` | :ref:`get_point_connections` **(** :ref:`int` id **)** | ++--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -89,6 +95,8 @@ Adds a new point at the given position with the given identifier. The algorithm as.add_point(1, Vector3(1,0,0), 4) # Adds the point (1,0,0) with weight_scale=4 and id=1 +If there already exists a point for the given id, its position and weight scale are updated to the given values. + .. _class_AStar_are_points_connected: - :ref:`bool` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id **)** const @@ -127,7 +135,7 @@ Deletes the segment between the given points. - :ref:`int` **get_available_point_id** **(** **)** const -Returns an id with no point associated to it. +Returns the next available point id with no point associated to it. .. _class_AStar_get_closest_point: @@ -213,4 +221,36 @@ Returns whether a point associated with the given id exists. Removes the point associated with the given id from the points pool. +.. _class_AStar_set_point_position: + +- void **set_point_position** **(** :ref:`int` id, :ref:`Vector3` position **)** + +Sets the position for the point with the given id. + +.. _class_AStar_set_point_weight_scale: + +- void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** + +Sets the ``weight_scale`` for the point with the given id. + +.. _class_AStar_get_point_connections: + +- :ref:`PoolIntArray` **get_point_connections** **(** :ref:`int` id **)** + +Returns an array with the ids of the points that form the connect with the given point. + +:: + + var as = AStar.new() + + as.add_point(1, Vector3(0,0,0)) + as.add_point(2, Vector3(0,1,0)) + as.add_point(3, Vector3(1,1,0)) + as.add_point(4, Vector3(2,0,0)) + + as.connect_points(1, 2, true) + as.connect_points(1, 3, true) + + var neighbors = as.get_point_connections(1) # returns [2, 3] + diff --git a/classes/class_audioeffectbandlimitfilter.rst b/classes/class_audioeffectbandlimitfilter.rst index 1d9b6018d..be71891a6 100644 --- a/classes/class_audioeffectbandlimitfilter.rst +++ b/classes/class_audioeffectbandlimitfilter.rst @@ -14,5 +14,10 @@ AudioEffectBandLimitFilter Brief Description ----------------- +Adds a band limit filter to the Audio Bus. +Description +----------- + +Limits the frequencies in a range around the :ref:`cutoff_hz` and allows frequencies outside of this range to pass. diff --git a/classes/class_audioeffectbandpassfilter.rst b/classes/class_audioeffectbandpassfilter.rst index 114a73001..b775a4f3e 100644 --- a/classes/class_audioeffectbandpassfilter.rst +++ b/classes/class_audioeffectbandpassfilter.rst @@ -14,5 +14,10 @@ AudioEffectBandPassFilter Brief Description ----------------- +Adds a band pass filter to the Audio Bus. +Description +----------- + +Attenuates the frequencies inside of a range around the :ref:`cutoff_hz` and cuts frequencies outside of this band. diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index 61a496fa5..f6b0b2941 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -16,7 +16,7 @@ AudioEffectFilter Brief Description ----------------- - +Adds a filter to the Audio Bus. Member Functions ---------------- @@ -44,19 +44,19 @@ Member Variables .. _class_AudioEffectFilter_cutoff_hz: -- :ref:`float` **cutoff_hz** +- :ref:`float` **cutoff_hz** - Threshold frequency for the filter. - .. _class_AudioEffectFilter_dB: + .. _class_AudioEffectFilter_db: -- :ref:`int` **dB** +- :ref:`int` **db** .. _class_AudioEffectFilter_gain: -- :ref:`float` **gain** +- :ref:`float` **gain** - Gain amount of the frequencies after the filter. .. _class_AudioEffectFilter_resonance: -- :ref:`float` **resonance** +- :ref:`float` **resonance** - Amount of boost in the overtones near the cutoff frequency. Numeric Constants @@ -67,6 +67,11 @@ Numeric Constants - **FILTER_18DB** = **2** - **FILTER_24DB** = **3** +Description +----------- + +Allows frequencies other than the :ref:`cutoff_hz` to pass. + Member Function Description --------------------------- diff --git a/classes/class_audioeffecthighpassfilter.rst b/classes/class_audioeffecthighpassfilter.rst index ef103de5b..93f47ae39 100644 --- a/classes/class_audioeffecthighpassfilter.rst +++ b/classes/class_audioeffecthighpassfilter.rst @@ -14,5 +14,10 @@ AudioEffectHighPassFilter Brief Description ----------------- +Adds a high pass filter to the Audio Bus. +Description +----------- + +Cuts frequencies lower than the :ref:`cutoff_hz` and allows higher frequencies to pass. diff --git a/classes/class_audioeffectlowpassfilter.rst b/classes/class_audioeffectlowpassfilter.rst index b3ca30f63..b76c7594b 100644 --- a/classes/class_audioeffectlowpassfilter.rst +++ b/classes/class_audioeffectlowpassfilter.rst @@ -14,5 +14,10 @@ AudioEffectLowPassFilter Brief Description ----------------- +Adds a low pass filter to the Audio Bus. +Description +----------- + +Cuts frequencies higher than the :ref:`cutoff_hz` and allows lower frequencies to pass. diff --git a/classes/class_audioeffectnotchfilter.rst b/classes/class_audioeffectnotchfilter.rst index 6ce00a044..00f3532d3 100644 --- a/classes/class_audioeffectnotchfilter.rst +++ b/classes/class_audioeffectnotchfilter.rst @@ -14,5 +14,10 @@ AudioEffectNotchFilter Brief Description ----------------- +Adds a notch filter to the Audio Bus. +Description +----------- + +Attenuates frequencies in a narrow band around the :ref:`cutoff_hz` and cuts frequencies outside of this range. diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index 92542ceba..889182471 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -16,7 +16,7 @@ BaseButton Brief Description ----------------- -Provides a base class for different kinds of buttons. +Base class for different kinds of buttons. Member Functions ---------------- @@ -92,31 +92,31 @@ Member Variables .. _class_BaseButton_action_mode: -- :ref:`int` **action_mode** +- :ref:`int` **action_mode** - Determines when the button is considered clicked, one of the ACTION_MODE\_\* constants. .. _class_BaseButton_disabled: -- :ref:`bool` **disabled** +- :ref:`bool` **disabled** - If ``true`` the button is in disabled state and can't be clicked or toggled. .. _class_BaseButton_enabled_focus_mode: -- :ref:`int` **enabled_focus_mode** +- :ref:`int` **enabled_focus_mode** - Focus access mode to use when switching between enabled/disabled (see :ref:`Control.set_focus_mode` and :ref:`disabled`). .. _class_BaseButton_group: -- :ref:`ButtonGroup` **group** +- :ref:`ButtonGroup` **group** - :ref:`ButtonGroup` associated to the button. .. _class_BaseButton_pressed: -- :ref:`bool` **pressed** +- :ref:`bool` **pressed** - If ``true`` the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active). .. _class_BaseButton_shortcut: -- :ref:`ShortCut` **shortcut** +- :ref:`ShortCut` **shortcut** - Shortcut associated to the button. .. _class_BaseButton_toggle_mode: -- :ref:`bool` **toggle_mode** +- :ref:`bool` **toggle_mode** - If ``true`` the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. Numeric Constants @@ -132,7 +132,7 @@ Numeric Constants Description ----------- -BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesn't display anything). Other types of buttons inherit from it. +BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it. Member Function Description --------------------------- diff --git a/classes/class_bitmapfont.rst b/classes/class_bitmapfont.rst index 1a40facad..2e0367005 100644 --- a/classes/class_bitmapfont.rst +++ b/classes/class_bitmapfont.rst @@ -99,13 +99,13 @@ Adds a character to the font, where ``character`` is the unicode value, ``textur - void **add_kerning_pair** **(** :ref:`int` char_a, :ref:`int` char_b, :ref:`int` kerning **)** -Adds 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. +Adds a kerning pair to the ``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 **)** -Adds a texture to the :ref:`BitmapFont`. +Adds a texture to the ``BitmapFont``. .. _class_BitmapFont_clear: diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 471e60951..789008523 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -114,7 +114,7 @@ Member Variables .. _class_Camera2D_current: -- :ref:`bool` **current** - If ``true`` this camera is the active camera for the current scene. Only one camera can be current, so setting a different camera ``current`` will disable this one. +- :ref:`bool` **current** - If ``true`` the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera ``current`` will disable this one. .. _class_Camera2D_drag_margin_bottom: @@ -122,7 +122,7 @@ Member Variables .. _class_Camera2D_drag_margin_h_enabled: -- :ref:`bool` **drag_margin_h_enabled** +- :ref:`bool` **drag_margin_h_enabled** - If ``true`` the camera only moves when reaching the horizontal drag margins. If ``false`` the camera moves horizontally regardless of margins. Default value: ``true``. .. _class_Camera2D_drag_margin_left: @@ -138,19 +138,19 @@ Member Variables .. _class_Camera2D_drag_margin_v_enabled: -- :ref:`bool` **drag_margin_v_enabled** +- :ref:`bool` **drag_margin_v_enabled** - If ``true`` the camera only moves when reaching the vertical drag margins. If ``false`` the camera moves vertically regardless of margins. Default value: ``true``. .. _class_Camera2D_editor_draw_drag_margin: -- :ref:`bool` **editor_draw_drag_margin** +- :ref:`bool` **editor_draw_drag_margin** - If ``true`` draws the camera's drag margin rectangle in the editor. Default value: ``false`` .. _class_Camera2D_editor_draw_limits: -- :ref:`bool` **editor_draw_limits** +- :ref:`bool` **editor_draw_limits** - If ``true`` draws the camera's limits rectangle in the editor. Default value: ``true`` .. _class_Camera2D_editor_draw_screen: -- :ref:`bool` **editor_draw_screen** +- :ref:`bool` **editor_draw_screen** - If ``true`` draws the camera's screen rectangle in the editor. Default value: ``false`` .. _class_Camera2D_limit_bottom: @@ -166,7 +166,7 @@ Member Variables .. _class_Camera2D_limit_smoothed: -- :ref:`bool` **limit_smoothed** +- :ref:`bool` **limit_smoothed** - If ``true`` the camera smoothly stops when reaches its limits. Default value: ``false`` .. _class_Camera2D_limit_top: @@ -178,15 +178,15 @@ Member Variables .. _class_Camera2D_rotating: -- :ref:`bool` **rotating** +- :ref:`bool` **rotating** - If ``true`` the camera rotates with the target. Default value: ``false`` .. _class_Camera2D_smoothing_enabled: -- :ref:`bool` **smoothing_enabled** +- :ref:`bool` **smoothing_enabled** - If ``true`` the camera smoothly moves towards the target at :ref:`smoothing_speed`. Default value: ``false`` .. _class_Camera2D_smoothing_speed: -- :ref:`float` **smoothing_speed** +- :ref:`float` **smoothing_speed** - Speed in pixels per second of the camera's smoothing effect when :ref:`smoothing_enabled` is ``true`` .. _class_Camera2D_zoom: @@ -196,8 +196,8 @@ Member Variables Numeric Constants ----------------- -- **ANCHOR_MODE_DRAG_CENTER** = **1** - **ANCHOR_MODE_FIXED_TOP_LEFT** = **0** +- **ANCHOR_MODE_DRAG_CENTER** = **1** Description ----------- diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 3e244317e..6f5fafbf7 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -215,11 +215,11 @@ Numeric Constants - **BLEND_MODE_SUB** = **2** --- Subtractive blending mode. - **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode. - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. +- **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Canvas item transform has changed. Only received if requested. - **NOTIFICATION_DRAW** = **30** --- CanvasItem is requested to draw. - **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- Canvas item visibility has changed. - **NOTIFICATION_ENTER_CANVAS** = **32** --- Canvas item has entered the canvas. - **NOTIFICATION_EXIT_CANVAS** = **33** --- Canvas item has exited the canvas. -- **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Canvas item transform has changed. Only received if requested. Description ----------- diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 451b5cc75..d2e412e30 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -76,7 +76,7 @@ Member Variables Description ----------- -Canvas drawing layer. :ref:`CanvasItem` nodes that are direct or indirect children of a :ref:`CanvasLayer` will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a :ref:`CanvasLayer` with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). +Canvas drawing layer. :ref:`CanvasItem` nodes that are direct or indirect children of a ``CanvasLayer`` will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a ``CanvasLayer`` with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). Member Function Description --------------------------- diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index 0addc3a71..b2e80b543 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -53,24 +53,24 @@ Member Function Description - :ref:`float` **get_height** **(** **)** const -Return the height of the :ref:`CapsuleShape2D`. +Return the height of the ``CapsuleShape2D``. .. _class_CapsuleShape2D_get_radius: - :ref:`float` **get_radius** **(** **)** const -Return the radius of the :ref:`CapsuleShape2D`. +Return the radius of the ``CapsuleShape2D``. .. _class_CapsuleShape2D_set_height: - void **set_height** **(** :ref:`float` height **)** -Set the height of the :ref:`CapsuleShape2D`. +Set the height of the ``CapsuleShape2D``. .. _class_CapsuleShape2D_set_radius: - void **set_radius** **(** :ref:`float` radius **)** -Set the radius of the :ref:`CapsuleShape2D`. +Set the radius of the ``CapsuleShape2D``. diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index d4afc2e6d..74394f026 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -38,7 +38,7 @@ Description Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for :ref:`RigidBody2D` nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. -The main difference between a :ref:`ConvexPolygonShape2D` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. +The main difference between a :ref:`ConvexPolygonShape2D` and a ``ConcavePolygonShape2D`` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. Member Function Description --------------------------- diff --git a/classes/class_conetwistjoint.rst b/classes/class_conetwistjoint.rst index 7850a7517..008fb9699 100644 --- a/classes/class_conetwistjoint.rst +++ b/classes/class_conetwistjoint.rst @@ -48,7 +48,7 @@ The higher, the faster. The swing span defines, how much rotation will not get corrected allong the swing axis. -Could be defined as looseness in the :ref:`ConeTwistJoint`. +Could be defined as looseness in the ``ConeTwistJoint``. If below 0.05, this behaviour is locked. Default value: ``PI/4``. @@ -66,7 +66,7 @@ Numeric Constants The swing span defines, how much rotation will not get corrected allong the swing axis. -Could be defined as looseness in the :ref:`ConeTwistJoint`. +Could be defined as looseness in the ``ConeTwistJoint``. If below 0.05, this behaviour is locked. Default value: ``PI/4``. - **PARAM_TWIST_SPAN** = **1** --- Twist is the rotation around the twist axis, this value defined how far the joint can twist. diff --git a/classes/class_container.rst b/classes/class_container.rst index 2756bfefe..88dde173a 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -45,7 +45,7 @@ Numeric Constants Description ----------- -Base node for containers. A :ref:`Container` contains other controls and automatically arranges them in a certain way. +Base node for containers. A ``Container`` contains other controls and automatically arranges them in a certain way. A Control can inherit this to create custom container classes. diff --git a/classes/class_control.rst b/classes/class_control.rst index 2ace34951..843a0e5ff 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -440,11 +440,11 @@ Numeric Constants - **PRESET_HCENTER_WIDE** = **14** --- Snap all 4 anchors to a horizontal line that cuts the parent container in half. Use with :ref:`set_anchors_preset`. - **PRESET_WIDE** = **15** --- Snap all 4 anchors to the respective corners of the parent container. Set all 4 margins to 0 after you applied this preset and the ``Control`` will fit its parent container. Use with :ref:`set_anchors_preset`. - **PRESET_MODE_MINSIZE** = **0** -- **PRESET_MODE_KEEP_HEIGHT** = **2** - **PRESET_MODE_KEEP_WIDTH** = **1** +- **PRESET_MODE_KEEP_HEIGHT** = **2** - **PRESET_MODE_KEEP_SIZE** = **3** -- **SIZE_EXPAND** = **2** --- Tells the parent :ref:`Container` to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See :ref:`size_flags_stretch_ratio`. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. - **SIZE_FILL** = **1** --- Tells the parent :ref:`Container` to expand the bounds of this node to fill all the available space without pushing any other node. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. +- **SIZE_EXPAND** = **2** --- Tells the parent :ref:`Container` to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See :ref:`size_flags_stretch_ratio`. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. - **SIZE_EXPAND_FILL** = **3** --- Sets the node's size flags to both fill and expand. See the 2 constants above for more information. - **SIZE_SHRINK_CENTER** = **4** --- Tells the parent :ref:`Container` to center the node in itself. It centers the ``Control`` based on its bounding box, so it doesn't work with the fill or expand size flags. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. - **SIZE_SHRINK_END** = **8** --- Tells the parent :ref:`Container` to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index ad532278c..80c128128 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -40,7 +40,7 @@ Description Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). -The main difference between a :ref:`ConvexPolygonShape2D` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. +The main difference between a ``ConvexPolygonShape2D`` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. Member Function Description --------------------------- diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index 649a9ebcd..a1bebecef 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -14,7 +14,7 @@ CubeMap Brief Description ----------------- - +A CubeMap is a 6 sided 3D texture. Member Functions ---------------- @@ -41,6 +41,18 @@ Member Functions | void | :ref:`set_storage` **(** :ref:`int` mode **)** | +----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +Member Variables +---------------- + + .. _class_CubeMap_lossy_storage_quality: + +- :ref:`float` **lossy_storage_quality** - The lossy storage quality of the CubeMap if the storage mode is set to STORAGE_COMPRESS_LOSSY. + + .. _class_CubeMap_storage_mode: + +- :ref:`int` **storage_mode** - The CubeMap's storage mode. See ``STORAGE\_\*`` constants. + + Numeric Constants ----------------- @@ -58,6 +70,11 @@ Numeric Constants - **FLAG_FILTER** = **4** - **FLAGS_DEFAULT** = **7** +Description +----------- + +A CubeMap is a 6 sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. + Member Function Description --------------------------- @@ -69,6 +86,8 @@ Member Function Description - :ref:`int` **get_height** **(** **)** const +Returns the CubeMap's height. + .. _class_CubeMap_get_lossy_storage_quality: - :ref:`float` **get_lossy_storage_quality** **(** **)** const @@ -77,6 +96,8 @@ Member Function Description - :ref:`Image` **get_side** **(** :ref:`int` side **)** const +Returns an :ref:`Image` for a side of the CubeMap using one of the ``SIDE\_\*`` constants or an integer 0-5. + .. _class_CubeMap_get_storage: - :ref:`int` **get_storage** **(** **)** const @@ -85,6 +106,8 @@ Member Function Description - :ref:`int` **get_width** **(** **)** const +Returns the CubeMap's width. + .. _class_CubeMap_set_flags: - void **set_flags** **(** :ref:`int` flags **)** @@ -97,6 +120,8 @@ Member Function Description - void **set_side** **(** :ref:`int` side, :ref:`Image` image **)** +Sets an :ref:`Image` for a side of the CubeMap using one of the ``SIDE\_\*`` constants or an integer 0-5. + .. _class_CubeMap_set_storage: - void **set_storage** **(** :ref:`int` mode **)** diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index d0cabd0d2..59b6cc83c 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -62,11 +62,11 @@ Member Variables .. _class_Curve2D__data: -- :ref:`Dictionary` **_data** +- :ref:`Dictionary` **_data** - The points describing the curve. Value is a :ref:`Dictionary` with the keys ``in``, ``out``, and ``pos``. The key pos is the position of a vertex of the curve, the key in is the vector from that position to the control point before this vertex, the key out is the vector from that position to the controlpoint after this vertex. .. _class_Curve2D_bake_interval: -- :ref:`float` **bake_interval** +- :ref:`float` **bake_interval** - The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points` or :ref:`get_baked_length` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. Description @@ -91,6 +91,8 @@ If "at_position" is given, the point is inserted before the point number "at_pos - void **clear_points** **(** **)** +Removes all points from the curve. + .. _class_Curve2D_get_bake_interval: - :ref:`float` **get_bake_interval** **(** **)** const diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index 724fc3738..1d6c5c73a 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -42,19 +42,19 @@ Member Variables .. _class_DampedSpringJoint2D_damping: -- :ref:`float` **damping** +- :ref:`float` **damping** - The spring joint's damping ratio. A value between ``0`` and ``1``. When the two bodies move into different directions the system tries to align them to the spring axis again. A high ``damping`` value forces the attached bodies to align faster. Default value: ``1`` .. _class_DampedSpringJoint2D_length: -- :ref:`float` **length** +- :ref:`float` **length** - The spring joint's maximum length. The two attached bodies cannot stretch it past this value. Default value: ``50`` .. _class_DampedSpringJoint2D_rest_length: -- :ref:`float` **rest_length** +- :ref:`float` **rest_length** - When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. Default value: ``0`` .. _class_DampedSpringJoint2D_stiffness: -- :ref:`float` **stiffness** +- :ref:`float` **stiffness** - The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. Default value: ``20`` Description diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index c306c9e47..dc7601f5d 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -85,7 +85,7 @@ Return a hashed integer value representing the dictionary contents. - :ref:`Array` **keys** **(** **)** -Return the list of keys in the :ref:`Dictionary`. +Return the list of keys in the ``Dictionary``. .. _class_Dictionary_size: @@ -97,6 +97,6 @@ Return the size of the dictionary (in pairs). - :ref:`Array` **values** **(** **)** -Return the list of values in the :ref:`Dictionary`. +Return the list of values in the ``Dictionary``. diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index 68a56362a..64a6b8d90 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -86,8 +86,8 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr return [{"name": "my_option", "default_value": false}] func load(src, dst, opts, r_platform_variants, r_gen_files): - var f = File.new() - if f.open(src, File.READ) != OK: + var file = File.new() + if file.open(src, File.READ) != OK: return FAILED var mesh = Mesh.new() diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index ce26ed602..01f7e983c 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -124,6 +124,7 @@ Numeric Constants - **CONTAINER_SPATIAL_EDITOR_BOTTOM** = **3** - **CONTAINER_CANVAS_EDITOR_MENU** = **4** - **CONTAINER_CANVAS_EDITOR_SIDE** = **5** +- **CONTAINER_CANVAS_EDITOR_BOTTOM** = **6** - **CONTAINER_PROPERTY_EDITOR_BOTTOM** = **7** - **DOCK_SLOT_LEFT_UL** = **0** - **DOCK_SLOT_LEFT_BL** = **1** diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 18c37f870..dc3eb43fc 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -42,9 +42,9 @@ Example script: extends EditorScript func _run(): - print("Hello from the Godot Editor!") + print("Hello from the Godot Editor!") -Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot \*Output\* dock. +Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot *Output* dock. Member Function Description --------------------------- diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 014cb9863..b8999d67e 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -50,7 +50,7 @@ Member Functions Description ----------- -The :ref:`Engine` class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others. +The ``Engine`` class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others. Member Function Description --------------------------- diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 579fafa40..2dd5df7d8 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -94,14 +94,20 @@ Member Functions +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_ssao_bias` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_ssao_blur` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_ssao_color` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_ssao_direct_light_affect` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_ssao_edge_sharpness` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_ssao_intensity` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_ssao_intensity2` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_ssao_quality` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_ssao_radius` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_ssao_radius2` **(** **)** const | @@ -150,8 +156,6 @@ Member Functions +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_glow_level_enabled` **(** :ref:`int` idx **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_ssao_blur_enabled` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_ssao_enabled` **(** **)** const | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_ssr_enabled` **(** **)** const | @@ -252,18 +256,22 @@ Member Functions +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ssao_bias` **(** :ref:`float` bias **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_ssao_blur` **(** :ref:`bool` enabled **)** | +| void | :ref:`set_ssao_blur` **(** :ref:`int` mode **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ssao_color` **(** :ref:`Color` color **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ssao_direct_light_affect` **(** :ref:`float` amount **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ssao_edge_sharpness` **(** :ref:`float` edge_sharpness **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ssao_enabled` **(** :ref:`bool` enabled **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ssao_intensity` **(** :ref:`float` intensity **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ssao_intensity2` **(** :ref:`float` intensity **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ssao_quality` **(** :ref:`int` quality **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ssao_radius` **(** :ref:`float` radius **)** | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ssao_radius2` **(** :ref:`float` radius **)** | @@ -558,12 +566,16 @@ Member Variables .. _class_Environment_ssao_blur: -- :ref:`bool` **ssao_blur** +- :ref:`int` **ssao_blur** .. _class_Environment_ssao_color: - :ref:`Color` **ssao_color** + .. _class_Environment_ssao_edge_sharpness: + +- :ref:`float` **ssao_edge_sharpness** + .. _class_Environment_ssao_enabled: - :ref:`bool` **ssao_enabled** @@ -580,6 +592,10 @@ Member Variables - :ref:`float` **ssao_light_affect** + .. _class_Environment_ssao_quality: + +- :ref:`int` **ssao_quality** + .. _class_Environment_ssao_radius: - :ref:`float` **ssao_radius** @@ -622,6 +638,13 @@ Numeric Constants - **DOF_BLUR_QUALITY_LOW** = **0** --- Low depth-of-field blur quality. - **DOF_BLUR_QUALITY_MEDIUM** = **1** --- Medium depth-of-field blur quality. - **DOF_BLUR_QUALITY_HIGH** = **2** --- High depth-of-field blur quality. +- **SSAO_BLUR_DISABLED** = **0** +- **SSAO_BLUR_1x1** = **1** +- **SSAO_BLUR_2x2** = **2** +- **SSAO_BLUR_3x3** = **3** +- **SSAO_QUALITY_LOW** = **0** +- **SSAO_QUALITY_MEDIUM** = **1** +- **SSAO_QUALITY_HIGH** = **2** Description ----------- @@ -789,6 +812,10 @@ Member Function Description - :ref:`float` **get_ssao_bias** **(** **)** const +.. _class_Environment_get_ssao_blur: + +- :ref:`int` **get_ssao_blur** **(** **)** const + .. _class_Environment_get_ssao_color: - :ref:`Color` **get_ssao_color** **(** **)** const @@ -797,6 +824,10 @@ Member Function Description - :ref:`float` **get_ssao_direct_light_affect** **(** **)** const +.. _class_Environment_get_ssao_edge_sharpness: + +- :ref:`float` **get_ssao_edge_sharpness** **(** **)** const + .. _class_Environment_get_ssao_intensity: - :ref:`float` **get_ssao_intensity** **(** **)** const @@ -805,6 +836,10 @@ Member Function Description - :ref:`float` **get_ssao_intensity2** **(** **)** const +.. _class_Environment_get_ssao_quality: + +- :ref:`int` **get_ssao_quality** **(** **)** const + .. _class_Environment_get_ssao_radius: - :ref:`float` **get_ssao_radius** **(** **)** const @@ -901,10 +936,6 @@ Member Function Description - :ref:`bool` **is_glow_level_enabled** **(** :ref:`int` idx **)** const -.. _class_Environment_is_ssao_blur_enabled: - -- :ref:`bool` **is_ssao_blur_enabled** **(** **)** const - .. _class_Environment_is_ssao_enabled: - :ref:`bool` **is_ssao_enabled** **(** **)** const @@ -1107,7 +1138,7 @@ Member Function Description .. _class_Environment_set_ssao_blur: -- void **set_ssao_blur** **(** :ref:`bool` enabled **)** +- void **set_ssao_blur** **(** :ref:`int` mode **)** .. _class_Environment_set_ssao_color: @@ -1117,6 +1148,10 @@ Member Function Description - void **set_ssao_direct_light_affect** **(** :ref:`float` amount **)** +.. _class_Environment_set_ssao_edge_sharpness: + +- void **set_ssao_edge_sharpness** **(** :ref:`float` edge_sharpness **)** + .. _class_Environment_set_ssao_enabled: - void **set_ssao_enabled** **(** :ref:`bool` enabled **)** @@ -1129,6 +1164,10 @@ Member Function Description - void **set_ssao_intensity2** **(** :ref:`float` intensity **)** +.. _class_Environment_set_ssao_quality: + +- void **set_ssao_quality** **(** :ref:`int` quality **)** + .. _class_Environment_set_ssao_radius: - void **set_ssao_radius** **(** :ref:`float` radius **)** diff --git a/classes/class_funcref.rst b/classes/class_funcref.rst index 9bc12ebcf..0cb2cda81 100644 --- a/classes/class_funcref.rst +++ b/classes/class_funcref.rst @@ -32,7 +32,7 @@ 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. +However, by creating a ``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 --------------------------- diff --git a/classes/class_geometry.rst b/classes/class_geometry.rst index bb2ecb1a9..3400d0360 100644 --- a/classes/class_geometry.rst +++ b/classes/class_geometry.rst @@ -60,6 +60,10 @@ Member Functions +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolIntArray` | :ref:`triangulate_polygon` **(** :ref:`PoolVector2Array` polygon **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolVector2Array` | :ref:`convex_hull_2d` **(** :ref:`PoolVector2Array` points **)** | ++--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolVector3Array` | :ref:`clip_polygon` **(** :ref:`PoolVector3Array` points, :ref:`Plane` plane **)** | ++--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- @@ -68,38 +72,56 @@ Member Function Description - :ref:`Array` **build_box_planes** **(** :ref:`Vector3` extents **)** +Returns an array with 6 :ref:`Plane`\ s that describe the sides of a box centered at the origin. The box size is defined by ``extents``, which represents one (positive) corner of the box (i.e. half its actual size). + .. _class_Geometry_build_capsule_planes: - :ref:`Array` **build_capsule_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, :ref:`int` axis=2 **)** +Returns an array of :ref:`Plane`\ s closely bounding a faceted capsule centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the side part of the capsule, whereas ``lats`` gives the number of latitudinal steps at the bottom and top of the capsule. The parameter ``axis`` describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). + .. _class_Geometry_build_cylinder_planes: - :ref:`Array` **build_cylinder_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` axis=2 **)** +Returns an array of :ref:`Plane`\ s closely bounding a faceted cylinder centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the round part of the cylinder. The parameter ``axis`` describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). + .. _class_Geometry_get_closest_point_to_segment: - :ref:`Vector3` **get_closest_point_to_segment** **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** +Returns the 3d point on the 3d segment (``s1``, ``s2``) that is closest to ``point``. The returned point will always be inside the specified segment. + .. _class_Geometry_get_closest_point_to_segment_2d: - :ref:`Vector2` **get_closest_point_to_segment_2d** **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** +Returns the 2d point on the 2d segment (``s1``, ``s2``) that is closest to ``point``. The returned point will always be inside the specified segment. + .. _class_Geometry_get_closest_point_to_segment_uncapped: - :ref:`Vector3` **get_closest_point_to_segment_uncapped** **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** +Returns the 3d point on the 3d line defined by (``s1``, ``s2``) that is closest to ``point``. The returned point can be inside the segment (``s1``, ``s2``) or outside of it, i.e. somewhere on the line extending from the segment. + .. _class_Geometry_get_closest_point_to_segment_uncapped_2d: - :ref:`Vector2` **get_closest_point_to_segment_uncapped_2d** **(** :ref:`Vector2` point, :ref:`Vector2` s1, :ref:`Vector2` s2 **)** +Returns the 2d point on the 2d line defined by (``s1``, ``s2``) that is closest to ``point``. The returned point can be inside the segment (``s1``, ``s2``) or outside of it, i.e. somewhere on the line extending from the segment. + .. _class_Geometry_get_closest_points_between_segments: - :ref:`PoolVector3Array` **get_closest_points_between_segments** **(** :ref:`Vector3` p1, :ref:`Vector3` p2, :ref:`Vector3` q1, :ref:`Vector3` q2 **)** +Given the two 3d segments (``p1``, ``p2``) and (``q1``, ``q2``), finds those two points on the two segments that are closest to each other. Returns a :ref:`PoolVector3Array` that contains this point on (``p1``, ``p2``) as well the accompanying point on (``q1``, ``q2``). + .. _class_Geometry_get_closest_points_between_segments_2d: - :ref:`PoolVector2Array` **get_closest_points_between_segments_2d** **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** +Given the two 2d segments (``p1``, ``p2``) and (``q1``, ``q2``), finds those two points on the two segments that are closest to each other. Returns a :ref:`PoolVector2Array` that contains this point on (``p1``, ``p2``) as well the accompanying point on (``q1``, ``q2``). + .. _class_Geometry_get_uv84_normal_bit: - :ref:`int` **get_uv84_normal_bit** **(** :ref:`Vector3` normal **)** @@ -108,40 +130,72 @@ Member Function Description - :ref:`Dictionary` **make_atlas** **(** :ref:`PoolVector2Array` sizes **)** +Given an array of :ref:`Vector2`\ s representing tiles, builds an atlas. The returned dictionary has two keys: ``points`` is a vector of :ref:`Vector2` that specifies the positions of each tile, ``size`` contains the overall size of the whole atlas as :ref:`Vector2`. + .. _class_Geometry_point_is_inside_triangle: - :ref:`bool` **point_is_inside_triangle** **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** const +Returns if ``point`` is inside the triangle specified by ``a``, ``b`` and ``c``. + .. _class_Geometry_ray_intersects_triangle: - :ref:`Variant` **ray_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** +Tests if the 3d ray starting at ``from`` with the direction of ``dir`` intersects the triangle specified by ``a``, ``b`` and ``c``. If yes, returns the point of intersection as :ref:`Vector3`. If no intersection takes place, an empty :ref:`Variant` is returned. + .. _class_Geometry_segment_intersects_circle: - :ref:`float` **segment_intersects_circle** **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_position, :ref:`float` circle_radius **)** +Given the 2d segment (``segment_from``, ``segment_to``), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position ``circle_position`` and has radius ``circle_radius``. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). + .. _class_Geometry_segment_intersects_convex: - :ref:`PoolVector3Array` **segment_intersects_convex** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** +Given a convex hull defined though the :ref:`Plane`\ s in the array ``planes``, tests if the segment (``from``, ``to``) intersects with that hull. If an intersection is found, returns a :ref:`PoolVector3Array` containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty. + .. _class_Geometry_segment_intersects_cylinder: - :ref:`PoolVector3Array` **segment_intersects_cylinder** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`float` height, :ref:`float` radius **)** +Checks if the segment (``from``, ``to``) intersects the cylinder with height ``height`` that is centered at the origin and has radius ``radius``. If no, returns an empty :ref:`PoolVector3Array`. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. + .. _class_Geometry_segment_intersects_segment_2d: - :ref:`Variant` **segment_intersects_segment_2d** **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** +Checks if the two segments (``from_a``, ``to_a``) and (``from_b``, ``to_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns an empty :ref:`Variant`. + .. _class_Geometry_segment_intersects_sphere: - :ref:`PoolVector3Array` **segment_intersects_sphere** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` sphere_position, :ref:`float` sphere_radius **)** +Checks if the segment (``from``, ``to``) intersects the sphere that is located at ``sphere_position`` and has radius ``sphere_radius``. If no, returns an empty :ref:`PoolVector3Array`. If yes, returns a :ref:`PoolVector3Array` containing the point of intersection and the sphere's normal at the point of intersection. + .. _class_Geometry_segment_intersects_triangle: - :ref:`Variant` **segment_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** +Tests if the segment (``from``, ``to``) intersects the triangle ``a``, ``b``, ``c``. If yes, returns the point of intersection as :ref:`Vector3`. If no intersection takes place, an empty :ref:`Variant` is returned. + .. _class_Geometry_triangulate_polygon: - :ref:`PoolIntArray` **triangulate_polygon** **(** :ref:`PoolVector2Array` polygon **)** +Triangulates the polygon specified by the points in ``polygon``. Returns a :ref:`PoolIntArray` where each triangle consists of three consecutive point indices into ``polygon`` (i.e. the returned array will have ``n \* 3`` elements, with ``n`` being the number of found triangles). If the triangulation did not succeed, an empty :ref:`PoolIntArray` is returned. + +.. _class_Geometry_convex_hull_2d: + +- :ref:`PoolVector2Array` **convex_hull_2d** **(** :ref:`PoolVector2Array` points **)** + +Given an array of :ref:`Vector2`\ s, returns the convex hull as a list of points in counter-clockwise order. The last point is the same as the first one. + +.. _class_Geometry_clip_polygon: + +- :ref:`PoolVector3Array` **clip_polygon** **(** :ref:`PoolVector3Array` points, :ref:`Plane` plane **)** + +Clips the polygon defined by the points in ``points`` against the ``plane`` and returns the points of the clipped polygon. + diff --git a/classes/class_giprobe.rst b/classes/class_giprobe.rst index e857bc301..f14c1eee0 100644 --- a/classes/class_giprobe.rst +++ b/classes/class_giprobe.rst @@ -115,6 +115,7 @@ Numeric Constants - **SUBDIV_64** = **0** - **SUBDIV_128** = **1** - **SUBDIV_256** = **2** +- **SUBDIV_512** = **3** - **SUBDIV_MAX** = **4** Member Function Description diff --git a/classes/class_groovejoint2d.rst b/classes/class_groovejoint2d.rst index 55697cac7..e8454a66c 100644 --- a/classes/class_groovejoint2d.rst +++ b/classes/class_groovejoint2d.rst @@ -34,11 +34,11 @@ Member Variables .. _class_GrooveJoint2D_initial_offset: -- :ref:`float` **initial_offset** +- :ref:`float` **initial_offset** - The body B's initial anchor position defined by the joint's origin and a local offset :ref:`initial_offset` along the joint's y axis (along the groove). Default value: ``25`` .. _class_GrooveJoint2D_length: -- :ref:`float` **length** +- :ref:`float` **length** - The groove's length. The groove is from the joint's origin towards :ref:`length` along the joint's local y axis. Default value: ``50`` Description diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index d02a0cfa5..62e0f84be 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -52,10 +52,6 @@ Member Functions +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`request_raw` **(** :ref:`int` method, :ref:`String` url, :ref:`PoolStringArray` headers, :ref:`PoolByteArray` body **)** | +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`send_body_data` **(** :ref:`PoolByteArray` 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 **)** | @@ -149,7 +145,7 @@ Member Function Description - void **close** **(** **)** -Cloces the current connection, allows for reusal of :ref:`HTTPClient`. +Cloces the current connection, allows for reusal of ``HTTPClient``. .. _class_HTTPClient_connect_to_host: @@ -205,7 +201,7 @@ Returns a STATUS\_\* enum constant. Need to call :ref:`poll` **has_response** **(** **)** const -Return whether this :ref:`HTTPClient` has a response available. +Return whether this ``HTTPClient`` has a response available. .. _class_HTTPClient_is_blocking_mode_enabled: @@ -217,7 +213,7 @@ Return whether blocking mode is enabled. - :ref:`bool` **is_response_chunked** **(** **)** const -Return whether this :ref:`HTTPClient` has a response that is chunked. +Return whether this ``HTTPClient`` has a response that is chunked. .. _class_HTTPClient_poll: @@ -270,18 +266,6 @@ 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:`PoolByteArray` body **)** - -Stub function - -.. _class_HTTPClient_send_body_text: - -- :ref:`int` **send_body_text** **(** :ref:`String` body **)** - -Stub function - .. _class_HTTPClient_set_blocking_mode: - void **set_blocking_mode** **(** :ref:`bool` enabled **)** diff --git a/classes/class_image.rst b/classes/class_image.rst index 8eb4781b3..58dcb64cc 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -112,7 +112,7 @@ Member Variables .. _class_Image_data: -- :ref:`Dictionary` **data** +- :ref:`Dictionary` **data** - Holds all of the image's color data in a given format. See ``FORMAT\_\*`` constants. Numeric Constants @@ -174,7 +174,7 @@ Numeric Constants Description ----------- -Native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it. +Native image datatype. Contains image data, which can be converted to a :ref:`Texture`, and several functions to interact with it. The maximum width and height for an ``Image`` is 16384 pixels. Member Function Description --------------------------- @@ -183,200 +183,272 @@ Member Function Description - void **blend_rect** **(** :ref:`Image` src, :ref:`Rect2` src_rect, :ref:`Vector2` dst **)** -Alpha-blends a "src_rect" :ref:`Rect2` from "src" :ref:`Image` to this :ref:`Image` on coordinates "dest". +Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dest``. .. _class_Image_blend_rect_mask: - void **blend_rect_mask** **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2` src_rect, :ref:`Vector2` dst **)** -Alpha-blends a "src_rect" :ref:`Rect2` from "src" :ref:`Image` to this :ref:`Image` using a "mask" :ref:`Image` on coordinates "dest". Alpha channels are required for both "src" and "mask", dest pixels and src pixels will blend if the corresponding mask pixel's alpha value is not 0. "src" :ref:`Image` and "mask" :ref:`Image` \*must\* have the same size (width and height) but they can have different formats +Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image at coordinates ``dst``. Alpha channels are required for both ``src`` and ``mask``. ``dst`` pixels and ``src`` pixels will blend if the corresponding mask pixel's alpha value is not 0. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. .. _class_Image_blit_rect: - void **blit_rect** **(** :ref:`Image` src, :ref:`Rect2` src_rect, :ref:`Vector2` dst **)** -Copy a "src_rect" :ref:`Rect2` from "src" :ref:`Image` to this :ref:`Image` on coordinates "dest". +Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``. .. _class_Image_blit_rect_mask: - void **blit_rect_mask** **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2` src_rect, :ref:`Vector2` dst **)** -Blits a "src_rect" :ref:`Rect2` from "src" :ref:`Image` to this :ref:`Image` using a "mask" :ref:`Image` on coordinates "dest". Alpha channel is required for "mask", will copy src pixel onto dest if the corresponding mask pixel's alpha value is not 0. "src" :ref:`Image` and "mask" :ref:`Image` \*must\* have the same size (width and height) but they can have different formats +Blits ``src_rect`` area from ``src`` image to this image at the coordinates given by ``dst``. ``src`` pixel is copied onto ``dst`` if the corresponding ``mask`` pixel's alpha value is not 0. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. .. _class_Image_clear_mipmaps: - void **clear_mipmaps** **(** **)** +Removes the image's mipmaps. + .. _class_Image_compress: - :ref:`int` **compress** **(** :ref:`int` mode, :ref:`int` source, :ref:`float` lossy_quality **)** +Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See ``COMPRESS\_\*`` constants. + .. _class_Image_convert: - void **convert** **(** :ref:`int` format **)** +Converts the image's format. See ``FORMAT\_\*`` constants. + .. _class_Image_copy_from: - void **copy_from** **(** :ref:`Image` src **)** +Copies ``src`` image to this image. + .. _class_Image_create: - void **create** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`int` format **)** -Create an empty image of a specific size and format. +Creates an empty image of given size and format. See ``FORMAT\_\*`` constants. If ``use_mipmaps`` is true then generate mipmaps for this image. See the ``generate_mipmaps`` method. .. _class_Image_create_from_data: - void **create_from_data** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`int` format, :ref:`PoolByteArray` data **)** +Creates a new image of given size and format. See ``FORMAT\_\*`` constants. Fills the image with the given raw data. If ``use_mipmaps`` is true then generate mipmaps for this image. See the ``generate_mipmaps`` method. + .. _class_Image_crop: - void **crop** **(** :ref:`int` width, :ref:`int` height **)** +Crops the image to the given ``width`` and ``height``. If the specified size is larger than the current size, the extra area is filled with black pixels. + .. _class_Image_decompress: - :ref:`int` **decompress** **(** **)** +Decompresses the image if it is compressed. Returns an error if decompress function is not available. + .. _class_Image_detect_alpha: - :ref:`int` **detect_alpha** **(** **)** const +Returns ALPHA_BLEND if the image has data for alpha values. Returns ALPHA_BIT if all the alpha values are below a certain threshold or the maximum value. Returns ALPHA_NONE if no data for alpha values is found. + .. _class_Image_expand_x2_hq2x: - void **expand_x2_hq2x** **(** **)** +Stretches the image and enlarges it by a factor of 2. No interpolation is done. + .. _class_Image_fill: - void **fill** **(** :ref:`Color` color **)** -Fills an :ref:`Image` with a specified :ref:`Color` +Fills the image with a given :ref:`Color`. .. _class_Image_fix_alpha_edges: - void **fix_alpha_edges** **(** **)** +Blends low-alpha pixels with nearby pixels. + .. _class_Image_flip_x: - void **flip_x** **(** **)** +Flips the image horizontally. + .. _class_Image_flip_y: - void **flip_y** **(** **)** +Flips the image vertically. + .. _class_Image_generate_mipmaps: - :ref:`int` **generate_mipmaps** **(** **)** +Generates mipmaps for the image. Mipmaps are pre-calculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0. + .. _class_Image_get_data: - :ref:`PoolByteArray` **get_data** **(** **)** const -Return the raw data of the :ref:`Image`. +Returns the image's raw data. .. _class_Image_get_format: - :ref:`int` **get_format** **(** **)** const -Return the format of the :ref:`Image`, one of :ref:`Image`.FORMAT\_\*. +Returns the image's raw data. .. _class_Image_get_height: - :ref:`int` **get_height** **(** **)** const -Return the height of the :ref:`Image`. +Returns the image's height. .. _class_Image_get_mipmap_offset: - :ref:`int` **get_mipmap_offset** **(** :ref:`int` mipmap **)** const +Returns the offset where the image's mipmap with index ``mipmap`` is stored in the ``data`` dictionary. + .. _class_Image_get_pixel: - :ref:`Color` **get_pixel** **(** :ref:`int` x, :ref:`int` y **)** const +Returns the color of the pixel at ``(x, y)`` if the image is locked. If the image is unlocked it always returns a :ref:`Color` with the value ``(0, 0, 0, 1.0)``. + .. _class_Image_get_rect: - :ref:`Image` **get_rect** **(** :ref:`Rect2` rect **)** const -Return a new :ref:`Image` that is a copy of "area" in this :ref:`Image`. +Returns a new image that is a copy of the image's area specified with ``rect``. .. _class_Image_get_size: - :ref:`Vector2` **get_size** **(** **)** const +Returns the image's size (width and height). + .. _class_Image_get_used_rect: - :ref:`Rect2` **get_used_rect** **(** **)** const -Return the area of this :ref:`Image` that is used/visibly colored/opaque. +Returns a :ref:`Rect2` enclosing the visible portion of the image. .. _class_Image_get_width: - :ref:`int` **get_width** **(** **)** const -Return the width of the :ref:`Image`. +Returns the image's width. .. _class_Image_has_mipmaps: - :ref:`bool` **has_mipmaps** **(** **)** const +Returns ``true`` if the image has generated mipmaps. + .. _class_Image_is_compressed: - :ref:`bool` **is_compressed** **(** **)** const +Returns ``true`` if the image is compressed. + .. _class_Image_is_empty: - :ref:`bool` **is_empty** **(** **)** const +Returns ``true`` if the image has no data. + .. _class_Image_is_invisible: - :ref:`bool` **is_invisible** **(** **)** const +Returns ``true`` if all the image's pixels have an alpha value of 0. Returns ``false`` if any pixel has an alpha value higher than 0. + .. _class_Image_load: - :ref:`int` **load** **(** :ref:`String` path **)** -Load an :ref:`Image`. +Loads an image from file ``path``. .. _class_Image_lock: - void **lock** **(** **)** +Locks the data and prevents changes. + .. _class_Image_normalmap_to_xy: - void **normalmap_to_xy** **(** **)** +Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normalmap. A normalmap can add lots of detail to a 3D surface without increasing the polygon count. + .. _class_Image_premultiply_alpha: - void **premultiply_alpha** **(** **)** +Multiplies color values with alpha values. Resulting color values for a pixel are ``(color \* alpha)/256``. + .. _class_Image_resize: - void **resize** **(** :ref:`int` width, :ref:`int` height, :ref:`int` interpolation=1 **)** +Resizes the image to the given ``width`` and ``height``. New pixels are calculated using ``interpolation``. See ``interpolation`` constants. + .. _class_Image_resize_to_po2: - void **resize_to_po2** **(** :ref:`bool` square=false **)** +Resizes the image to the nearest power of 2 for the width and height. If ``square`` is ``true`` then set width and height to be the same. + .. _class_Image_save_png: - :ref:`int` **save_png** **(** :ref:`String` path **)** const -Save this :ref:`Image` as a png. +Saves the image as a PNG file to ``path``. .. _class_Image_set_pixel: - void **set_pixel** **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color **)** +Sets the :ref:`Color` of the pixel at ``(x, y)`` if the image is unlocked. Example: + +`` + +var img = Image.new() + +img.lock() + +img.set_pixel(x, y, color) # Does not have an effect + +img.unlock() + +img.set_pixel(x, y, color) # Works + +``. + .. _class_Image_shrink_x2: - void **shrink_x2** **(** **)** +Shrinks the image by a factor of 2. + .. _class_Image_srgb_to_linear: - void **srgb_to_linear** **(** **)** +Converts the raw data from the sRGB colorspace to a linear scale. + .. _class_Image_unlock: - void **unlock** **(** **)** +Unlocks the data for writing access. + diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index 32fd84876..9bc31c02e 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -60,7 +60,7 @@ Member Function Description - void **create** **(** :ref:`int` width, :ref:`int` height, :ref:`int` format, :ref:`int` flags=7 **)** -Create a new :ref:`ImageTexture` with "width" and "height". +Create a new ``ImageTexture`` with "width" and "height". "format" one of :ref:`Image`.FORMAT\_\*. @@ -70,43 +70,43 @@ Create a new :ref:`ImageTexture` with "width" and "height". - void **create_from_image** **(** :ref:`Image` image, :ref:`int` flags=7 **)** -Create a new :ref:`ImageTexture` from an :ref:`Image` with "flags" from :ref:`Texture`.FLAG\_\*. +Create a new ``ImageTexture`` from an :ref:`Image` with "flags" from :ref:`Texture`.FLAG\_\*. .. _class_ImageTexture_get_format: - :ref:`int` **get_format** **(** **)** const -Return the format of the :ref:`ImageTexture`, one of :ref:`Image`.FORMAT\_\*. +Return the format of the ``ImageTexture``, one of :ref:`Image`.FORMAT\_\*. .. _class_ImageTexture_get_lossy_storage_quality: - :ref:`float` **get_lossy_storage_quality** **(** **)** const -Return the storage quality for :ref:`ImageTexture`.STORAGE_COMPRESS_LOSSY. +Return the storage quality for ``ImageTexture``.STORAGE_COMPRESS_LOSSY. .. _class_ImageTexture_get_storage: - :ref:`int` **get_storage** **(** **)** const -Return the storage type. One of :ref:`ImageTexture`.STORAGE\_\*. +Return the storage type. One of ``ImageTexture``.STORAGE\_\*. .. _class_ImageTexture_load: - void **load** **(** :ref:`String` path **)** -Load an :ref:`ImageTexture`. +Load an ``ImageTexture``. .. _class_ImageTexture_set_data: - void **set_data** **(** :ref:`Image` image **)** -Set the :ref:`Image` of this :ref:`ImageTexture`. +Set the :ref:`Image` of this ``ImageTexture``. .. _class_ImageTexture_set_lossy_storage_quality: - void **set_lossy_storage_quality** **(** :ref:`float` quality **)** -Set the storage quality in case of :ref:`ImageTexture`.STORAGE_COMPRESS_LOSSY. +Set the storage quality in case of ``ImageTexture``.STORAGE_COMPRESS_LOSSY. .. _class_ImageTexture_set_size_override: @@ -118,6 +118,6 @@ Resizes the ``ImageTexture`` to the specified dimensions. - void **set_storage** **(** :ref:`int` mode **)** -Set the storage type. One of :ref:`ImageTexture`.STORAGE\_\*. +Set the storage type. One of ``ImageTexture``.STORAGE\_\*. diff --git a/classes/class_inputeventjoypadmotion.rst b/classes/class_inputeventjoypadmotion.rst index 0f5defd9f..2ab84822c 100644 --- a/classes/class_inputeventjoypadmotion.rst +++ b/classes/class_inputeventjoypadmotion.rst @@ -14,7 +14,7 @@ InputEventJoypadMotion Brief Description ----------------- -Input event type for gamepad joysticks and other motions. For buttons see :ref:`InputEventJoypadMotion`. +Input event type for gamepad joysticks and other motions. For buttons see ``InputEventJoypadMotion``. Member Functions ---------------- diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index 8ef179702..d7f3d5ba6 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -71,7 +71,7 @@ Returns true if an action has an :ref:`InputEvent` associated - void **add_action** **(** :ref:`String` action **)** -Adds an (empty) action to the :ref:`InputMap`. An :ref:`InputEvent` can then be added to this action with :ref:`action_add_event`. +Adds an (empty) action to the ``InputMap``. An :ref:`InputEvent` can then be added to this action with :ref:`action_add_event`. .. _class_InputMap_erase_action: diff --git a/classes/class_joint2d.rst b/classes/class_joint2d.rst index 19d277dc9..63f907076 100644 --- a/classes/class_joint2d.rst +++ b/classes/class_joint2d.rst @@ -44,19 +44,19 @@ Member Variables .. _class_Joint2D_bias: -- :ref:`float` **bias** +- :ref:`float` **bias** - When :ref:`node_a` and :ref:`node_b` move in different directions the ``bias`` controls how fast the joint pulls them back to their original position. The lower the ``bias`` the more the two bodies can pull on the joint. Default value: ``0`` .. _class_Joint2D_disable_collision: -- :ref:`bool` **disable_collision** +- :ref:`bool` **disable_collision** - If ``true`` :ref:`node_a` and :ref:`node_b` can collide. Default value: ``false``. .. _class_Joint2D_node_a: -- :ref:`NodePath` **node_a** +- :ref:`NodePath` **node_a** - The first body attached to the joint. Must derive from :ref:`PhysicsBody2D`. .. _class_Joint2D_node_b: -- :ref:`NodePath` **node_b** +- :ref:`NodePath` **node_b** - The second body attached to the joint. Must derive from :ref:`PhysicsBody2D`. Description diff --git a/classes/class_jsonparseresult.rst b/classes/class_jsonparseresult.rst index 285f5213d..fdd6110ac 100644 --- a/classes/class_jsonparseresult.rst +++ b/classes/class_jsonparseresult.rst @@ -70,7 +70,7 @@ Member Variables Description ----------- -Returned by :ref:`JSON.parse`, :ref:`JSONParseResult` contains decoded JSON or error information if JSON source not successfully parsed. You can check if JSON source was successfully parsed with ``if json_result.error == 0``. +Returned by :ref:`JSON.parse`, ``JSONParseResult`` contains decoded JSON or error information if JSON source not successfully parsed. You can check if JSON source was successfully parsed with ``if json_result.error == 0``. Member Function Description --------------------------- diff --git a/classes/class_kinematicbody.rst b/classes/class_kinematicbody.rst index f83420758..0924416fd 100644 --- a/classes/class_kinematicbody.rst +++ b/classes/class_kinematicbody.rst @@ -113,7 +113,7 @@ Moves the body along the vector ``rel_vec``. The body will stop if it collides. - :ref:`Vector3` **move_and_slide** **(** :ref:`Vector3` linear_velocity, :ref:`Vector3` floor_normal=Vector3( 0, 0, 0 ), :ref:`float` slope_stop_min_velocity=0.05, :ref:`int` max_slides=4, :ref:`float` floor_max_angle=0.785398 **)** -Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a :ref:`KinematicBody` or :ref:`RigidBody`, it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. +Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a ``KinematicBody`` or :ref:`RigidBody`, it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. ``linear_velocity`` is a value in pixels per second. Unlike in for example :ref:`move_and_collide`, you should *not* multiply it with ``delta`` — this is done by the method. diff --git a/classes/class_kinematicbody2d.rst b/classes/class_kinematicbody2d.rst index 271c25e53..7797e9570 100644 --- a/classes/class_kinematicbody2d.rst +++ b/classes/class_kinematicbody2d.rst @@ -113,7 +113,7 @@ Moves the body along the vector ``rel_vec``. The body will stop if it collides. - :ref:`Vector2` **move_and_slide** **(** :ref:`Vector2` linear_velocity, :ref:`Vector2` floor_normal=Vector2( 0, 0 ), :ref:`float` slope_stop_min_velocity=5, :ref:`int` max_bounces=4, :ref:`float` floor_max_angle=0.785398 **)** -Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a :ref:`KinematicBody2D` or :ref:`RigidBody2D`, it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. +Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a ``KinematicBody2D`` or :ref:`RigidBody2D`, it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. ``linear_velocity`` is a value in pixels per second. Unlike in for example :ref:`move_and_collide`, you should *not* multiply it with ``delta`` — this is done by the method. diff --git a/classes/class_light.rst b/classes/class_light.rst index c8e932a68..38ee8425e 100644 --- a/classes/class_light.rst +++ b/classes/class_light.rst @@ -119,6 +119,7 @@ Numeric Constants - **PARAM_SHADOW_SPLIT_3_OFFSET** = **10** - **PARAM_SHADOW_NORMAL_BIAS** = **11** - **PARAM_SHADOW_BIAS** = **12** +- **PARAM_SHADOW_BIAS_SPLIT_SCALE** = **13** - **PARAM_MAX** = **14** Description diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 9e02c82bd..266d11016 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -84,13 +84,13 @@ Signals - **text_changed** **(** :ref:`String` text **)** -When the text changes, this signal is emitted. +Emitted when the text changes. .. _class_LineEdit_text_entered: - **text_entered** **(** :ref:`String` text **)** -This signal is emitted when the user presses KEY_ENTER on the :ref:`LineEdit`. This signal is often used as an alternate confirmation mechanism in dialogs. +Emitted when the user presses KEY_ENTER on the ``LineEdit``. Member Variables @@ -98,62 +98,62 @@ Member Variables .. _class_LineEdit_align: -- :ref:`int` **align** +- :ref:`int` **align** - Text alignment as defined in the ALIGN\_\* enum. .. _class_LineEdit_caret_blink: -- :ref:`bool` **caret_blink** +- :ref:`bool` **caret_blink** - If ``true`` the caret (visual cursor) blinks. .. _class_LineEdit_caret_blink_speed: -- :ref:`float` **caret_blink_speed** +- :ref:`float` **caret_blink_speed** - Duration (in seconds) of a caret's blinking cycle. .. _class_LineEdit_editable: -- :ref:`bool` **editable** +- :ref:`bool` **editable** - If ``false`` existing text cannot be modified and new text cannot be added. .. _class_LineEdit_expand_to_len: -- :ref:`bool` **expand_to_len** +- :ref:`bool` **expand_to_len** - If ``true`` the :ref:`LineEdit` width will increase to stay longer than the :ref:`text`. It will **not** compress if the :ref:`text` is shortened. .. _class_LineEdit_focus_mode: -- :ref:`int` **focus_mode** +- :ref:`int` **focus_mode** - Defines how the :ref:`LineEdit` can grab focus (Keyboard and mouse, only keyboard, or none). See ``enum FocusMode`` in :ref:`Control` for details. .. _class_LineEdit_max_length: -- :ref:`int` **max_length** +- :ref:`int` **max_length** - Maximum amount of characters that can be entered inside the :ref:`LineEdit`. If ``0``, there is no limit. .. _class_LineEdit_placeholder_alpha: -- :ref:`float` **placeholder_alpha** +- :ref:`float` **placeholder_alpha** - Opacity of the :ref:`placeholder_text`. From ``0`` to ``1``. .. _class_LineEdit_placeholder_text: -- :ref:`String` **placeholder_text** +- :ref:`String` **placeholder_text** - Text shown when the :ref:`LineEdit` is empty. It is **not** the :ref:`LineEdit`'s default value (see :ref:`text`). .. _class_LineEdit_secret: -- :ref:`bool` **secret** +- :ref:`bool` **secret** - If ``true`` every character is shown as "\*". .. _class_LineEdit_text: -- :ref:`String` **text** +- :ref:`String` **text** - String value of the :ref:`LineEdit`. Numeric Constants ----------------- -- **ALIGN_LEFT** = **0** --- Align left. -- **ALIGN_CENTER** = **1** --- Align center. -- **ALIGN_RIGHT** = **2** --- Align right. -- **ALIGN_FILL** = **3** --- Align fill. -- **MENU_CUT** = **0** --- Cut (Copy and clear). -- **MENU_COPY** = **1** --- Copy the selected text. -- **MENU_PASTE** = **2** --- Paste the clipboard text over the selected text. -- **MENU_CLEAR** = **3** --- Clear the text. -- **MENU_SELECT_ALL** = **4** --- Select all text. -- **MENU_UNDO** = **5** --- Undo an action. +- **ALIGN_LEFT** = **0** --- Aligns the text on the left hand side of the :ref:`LineEdit`. +- **ALIGN_CENTER** = **1** --- Centers the text in the middle of the :ref:`LineEdit`. +- **ALIGN_RIGHT** = **2** --- Aligns the text on the right hand side of the :ref:`LineEdit`. +- **ALIGN_FILL** = **3** --- Stretches whitespaces to fit the :ref:`LineEdit`'s width. +- **MENU_CUT** = **0** --- Cuts (Copies and clears) the selected text. +- **MENU_COPY** = **1** --- Copies the selected text. +- **MENU_PASTE** = **2** --- Pastes the clipboard text over the selected text (or at the cursor's position). +- **MENU_CLEAR** = **3** --- Erases the whole Linedit text. +- **MENU_SELECT_ALL** = **4** --- Selects the whole Linedit text. +- **MENU_UNDO** = **5** --- Undoes the previous action. - **MENU_MAX** = **6** Description @@ -168,13 +168,13 @@ Member Function Description - void **append_at_cursor** **(** :ref:`String` text **)** -Append text at cursor, scrolling the :ref:`LineEdit` when needed. +Adds ``text`` after the cursor. If the resulting value is longer than :ref:`max_length`, nothing happens. .. _class_LineEdit_clear: - void **clear** **(** **)** -Clear the :ref:`LineEdit` text. +Erases the :ref:`LineEdit` text. .. _class_LineEdit_cursor_get_blink_enabled: @@ -204,13 +204,13 @@ Set the line edit caret blink speed. Cannot be less then or equal to 0. - :ref:`int` **get_align** **(** **)** const -Return the align mode of the :ref:`LineEdit`. +Return the align mode of the ``LineEdit``. .. _class_LineEdit_get_cursor_position: - :ref:`int` **get_cursor_position** **(** **)** const -Return the cursor position inside the :ref:`LineEdit`. +Returns the cursor position inside the ``LineEdit``. .. _class_LineEdit_get_expand_to_text_length: @@ -220,13 +220,13 @@ Return the cursor position inside the :ref:`LineEdit`. - :ref:`int` **get_max_length** **(** **)** const -Return the maximum amount of characters the :ref:`LineEdit` can edit. If 0 is returned, no limit exists. +Return the maximum amount of characters the ``LineEdit`` can edit. If 0 is returned, no limit exists. .. _class_LineEdit_get_menu: - :ref:`PopupMenu` **get_menu** **(** **)** const -Return the :ref:`PopupMenu` of this :ref:`LineEdit`. +Returns the :ref:`PopupMenu` of this ``LineEdit``. By default, this menu is displayed when right-clicking on the :ref:`LineEdit`. .. _class_LineEdit_get_placeholder: @@ -244,61 +244,62 @@ Return transparency of the placeholder text. - :ref:`String` **get_text** **(** **)** const -Return the text in the :ref:`LineEdit`. +Return the text in the ``LineEdit``. .. _class_LineEdit_is_editable: - :ref:`bool` **is_editable** **(** **)** const -Return the *editable* status of the :ref:`LineEdit` (see :ref:`set_editable`). +Return the *editable* status of the ``LineEdit`` (see :ref:`set_editable`). .. _class_LineEdit_is_secret: - :ref:`bool` **is_secret** **(** **)** const -Return the *secret* status of the :ref:`LineEdit` (see :ref:`set_secret`). +Return the *secret* status of the ``LineEdit`` (see :ref:`set_secret`). .. _class_LineEdit_menu_option: - void **menu_option** **(** :ref:`int` option **)** -Execute a given action as defined in the MENU\_\* enum. +Executes a given action as defined in the MENU\_\* enum. .. _class_LineEdit_select: - void **select** **(** :ref:`int` from=0, :ref:`int` to=-1 **)** -Select the text inside :ref:`LineEdit` by the given character positions. ``from`` is default to the beginning. ``to`` is default to the end. +Selects characters inside :ref:`LineEdit` between ``from`` and ``to``. By default ``from`` is at the beginning and ``to`` at the end. :: - select() # select all - select(5) # select from the fifth character to the end. - select(2, 5) # select from the second to the fifth character. + text = "Welcome" + select() # Welcome + select(4) # ome + select(2, 5) # lco .. _class_LineEdit_select_all: - void **select_all** **(** **)** -Select the whole string. +Selects the whole :ref:`String`. .. _class_LineEdit_set_align: - void **set_align** **(** :ref:`int` align **)** -Set text alignment of the :ref:`LineEdit`. +Set text alignment of the ``LineEdit``. .. _class_LineEdit_set_cursor_position: - void **set_cursor_position** **(** :ref:`int` position **)** -Set the cursor position inside the :ref:`LineEdit`, causing it to scroll if needed. +Sets the cursor position inside the ``LineEdit``. The text may scroll if needed. .. _class_LineEdit_set_editable: - void **set_editable** **(** :ref:`bool` enabled **)** -Set the *editable* status of the :ref:`LineEdit`. When disabled, existing text can't be modified and new text can't be added. +Set the *editable* status of the ``LineEdit``. When disabled, existing text can't be modified and new text can't be added. .. _class_LineEdit_set_expand_to_text_length: @@ -308,7 +309,7 @@ Set the *editable* status of the :ref:`LineEdit`. When disabled, - void **set_max_length** **(** :ref:`int` chars **)** -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. +Set the maximum amount of characters the ``LineEdit`` can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit. .. _class_LineEdit_set_placeholder: @@ -326,12 +327,12 @@ Set transparency of the placeholder text. - void **set_secret** **(** :ref:`bool` enabled **)** -Set the *secret* status of the :ref:`LineEdit`. When enabled, every character is displayed as "\*". +Set the *secret* status of the ``LineEdit``. When enabled, every character is displayed as "\*". .. _class_LineEdit_set_text: - void **set_text** **(** :ref:`String` text **)** -Set the text in the :ref:`LineEdit`, clearing the existing one and the selection. +Set the text in the ``LineEdit``, clearing the existing one and the selection. diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index a0b75a0a4..0d56d9471 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -78,6 +78,6 @@ Sets the text of the button. - 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). +Sets the underline mode for this button, the argument must be one of the ``LinkButton`` constants (see constants section). diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index ae29c4f0f..ca0cd5be3 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -57,6 +57,7 @@ Numeric Constants - **NOTIFICATION_WM_FOCUS_IN** = **4** - **NOTIFICATION_WM_FOCUS_OUT** = **5** - **NOTIFICATION_WM_QUIT_REQUEST** = **6** +- **NOTIFICATION_WM_GO_BACK_REQUEST** = **7** - **NOTIFICATION_WM_UNFOCUS_REQUEST** = **8** - **NOTIFICATION_OS_MEMORY_WARNING** = **9** - **NOTIFICATION_TRANSLATION_CHANGED** = **90** @@ -65,7 +66,7 @@ Numeric Constants Description ----------- -Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a :ref:`MainLoop` has to be provided to OS, else the application will exit. This happens automatically (and a :ref:`SceneTree` is created), unless a main :ref:`Script` is supplied, which may or not create and return a :ref:`MainLoop`. +Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a ``MainLoop`` has to be provided to OS, else the application will exit. This happens automatically (and a :ref:`SceneTree` is created), unless a main :ref:`Script` is supplied, which may or not create and return a ``MainLoop``. Member Function Description --------------------------- diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index 8d88ba70f..cc1e0251f 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -39,18 +39,18 @@ Member Function Description - void **lock** **(** **)** -Lock this :ref:`Mutex`, blocks until it is unlocked by the current owner. +Lock this ``Mutex``, blocks until it is unlocked by the current owner. .. _class_Mutex_try_lock: - :ref:`int` **try_lock** **(** **)** -Try locking this :ref:`Mutex`, does not block. Returns OK on success else ERR_BUSY. +Try locking this ``Mutex``, does not block. Returns OK on success else ERR_BUSY. .. _class_Mutex_unlock: - void **unlock** **(** **)** -Unlock this :ref:`Mutex`, leaving it to others threads. +Unlock this ``Mutex``, leaving it to others threads. diff --git a/classes/class_networkedmultiplayerpeer.rst b/classes/class_networkedmultiplayerpeer.rst index a8d507fc4..be7bf04b4 100644 --- a/classes/class_networkedmultiplayerpeer.rst +++ b/classes/class_networkedmultiplayerpeer.rst @@ -104,7 +104,7 @@ Member Function Description - :ref:`bool` **is_refusing_new_connections** **(** **)** const -Return whether this :ref:`NetworkedMultiplayerPeer` is refusing new connections. +Return whether this ``NetworkedMultiplayerPeer`` is refusing new connections. .. _class_NetworkedMultiplayerPeer_poll: @@ -114,7 +114,7 @@ Return whether this :ref:`NetworkedMultiplayerPeer` enable **)** -If ``endable`` is true, this :ref:`NetworkedMultiplayerPeer` will refuse new connections. +If ``endable`` is true, this ``NetworkedMultiplayerPeer`` will refuse new connections. .. _class_NetworkedMultiplayerPeer_set_target_peer: diff --git a/classes/class_node.rst b/classes/class_node.rst index 55cb00357..44b8b6d4c 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -240,12 +240,12 @@ Numeric Constants - **NOTIFICATION_EXIT_TREE** = **11** - **NOTIFICATION_MOVED_IN_PARENT** = **12** - **NOTIFICATION_READY** = **13** +- **NOTIFICATION_PAUSED** = **14** +- **NOTIFICATION_UNPAUSED** = **15** - **NOTIFICATION_PHYSICS_PROCESS** = **16** --- Notification received every frame when the physics process flag is set (see :ref:`set_physics_process`). - **NOTIFICATION_PROCESS** = **17** --- Notification received every frame when the process flag is set (see :ref:`set_process`). - **NOTIFICATION_PARENTED** = **18** --- Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree. - **NOTIFICATION_UNPARENTED** = **19** --- Notification received when a node is unparented (parent removed it from the list of children). -- **NOTIFICATION_PAUSED** = **14** -- **NOTIFICATION_UNPAUSED** = **15** - **NOTIFICATION_INSTANCED** = **20** - **NOTIFICATION_DRAG_BEGIN** = **21** - **NOTIFICATION_DRAG_END** = **22** @@ -287,7 +287,7 @@ To keep track of the scene hierarchy (especially when instancing scenes into oth Finally, when a node is freed with :ref:`free` or :ref:`queue_free`, it will also free all its children. -**Networking with nodes:** After connecting to a server (or making one, see :ref:`NetworkedMultiplayerENet`) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling :ref:`rpc` with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode (:ref:`set_network_mode`) on the receiving peer. To identify which :ref:`Node` receives the RPC call Godot will use its :ref:`NodePath` (make sure node names are the same on all peers). +**Networking with nodes:** After connecting to a server (or making one, see :ref:`NetworkedMultiplayerENet`) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling :ref:`rpc` with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode (:ref:`set_network_mode`) on the receiving peer. To identify which ``Node`` receives the RPC call Godot will use its :ref:`NodePath` (make sure node names are the same on all peers). Member Function Description --------------------------- @@ -356,7 +356,7 @@ Propagated to all nodes when the previous InputEvent is not consumed by any node - void **add_child** **(** :ref:`Node` node, :ref:`bool` legible_unique_name=false **)** -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. +Add a child ``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 nodes with human-readable names, based on the name of the node being instanced instead of its type only. @@ -368,7 +368,7 @@ The optional boolean argument enforces creating child nodes with human-readable - void **add_to_group** **(** :ref:`String` group, :ref:`bool` persistent=false **)** -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`). +Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A ``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: @@ -380,7 +380,7 @@ Return true if the node can process, i.e. whether its pause mode allows processi - :ref:`Node` **duplicate** **(** :ref:`int` flags=15 **)** const -Duplicate the node, returning a new :ref:`Node`. +Duplicate the node, returning a new ``Node``. You can fine-tune the behavior using the ``flags``, which are based on the DUPLICATE\_\* constants. @@ -406,7 +406,7 @@ Return the amount of child nodes. - :ref:`Array` **get_children** **(** **)** const -Return an array of references (:ref:`Node`) to the child nodes. +Return an array of references (``Node``) to the child nodes. .. _class_Node_get_filename: @@ -480,7 +480,7 @@ Get the node owner (see :ref:`set_owner`). - :ref:`Node` **get_parent** **(** **)** const -Return the parent node of the current node, or an empty :ref:`Node` if the node lacks a parent. +Return the parent node of the current node, or an empty ``Node`` if the node lacks a parent. .. _class_Node_get_path: @@ -630,7 +630,7 @@ Print the scene to stdout. Used mainly for debugging purposes. - void **propagate_call** **(** :ref:`String` method, :ref:`Array` args=[ ], :ref:`bool` parent_first=false **)** -Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current :ref:`Node` first, then on all children. If it is false then the children will get called first. +Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current ``Node`` first, then on all children. If it is false then the children will get called first. .. _class_Node_propagate_notification: @@ -660,7 +660,7 @@ Remove a node and set all its children as children of the parent node (if exists - void **remove_child** **(** :ref:`Node` node **)** -Remove a child :ref:`Node`. Node is NOT deleted and will have to be deleted manually. +Remove a child ``Node``. Node is NOT deleted and will have to be deleted manually. .. _class_Node_remove_from_group: @@ -754,7 +754,7 @@ A node can contain a filename. This filename should not be changed by the user, - void **set_name** **(** :ref:`String` name **)** -Set the name of the :ref:`Node`. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. +Set the name of the ``Node``. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. .. _class_Node_set_network_master: diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index a21a3fdb1..ee429d9fb 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -120,15 +120,15 @@ Member Variables .. _class_Node2D_rotation: -- :ref:`float` **rotation** - Rotation in radians. +- :ref:`float` **rotation** - Rotation in radians, relative to the node's parent. .. _class_Node2D_rotation_deg: -- :ref:`float` **rotation_deg** - Rotation in degrees. +- :ref:`float` **rotation_deg** - Rotation in degrees, relative to the node's parent. .. _class_Node2D_scale: -- :ref:`Vector2` **scale** - Rotation in degrees. +- :ref:`Vector2` **scale** - The node's scale. Unscaled value: ``(1, 1)`` .. _class_Node2D_transform: @@ -140,7 +140,7 @@ Member Variables .. _class_Node2D_z_as_relative: -- :ref:`bool` **z_as_relative** - Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. +- :ref:`bool` **z_as_relative** - If ``true`` the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. Description @@ -161,7 +161,7 @@ Multiplies the current scale by the 'ratio' vector. - void **edit_set_pivot** **(** :ref:`Vector2` pivot **)** -Set the pivot position of the 2D node to 'pivot' value. Only some Node2Ds implement this method. +Sets the node's pivot position. .. _class_Node2D_get_angle_to: @@ -251,104 +251,108 @@ Rotates the node so it points towards the 'point'. - void **move_local_x** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** -Apply a local translation on the node's X axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. +Applies a local translation on the node's X axis based on the :ref:`Node._process`'s ``delta``. If ``scaled`` is false, normalizes the movement. .. _class_Node2D_move_local_y: - void **move_local_y** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** -Apply a local translation on the node's Y axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. +Applies a local translation on the node's Y axis based on the :ref:`Node._process`'s ``delta``. If ``scaled`` is false, normalizes the movement. .. _class_Node2D_rotate: - void **rotate** **(** :ref:`float` radians **)** -Apply a rotation to the node, in radians, starting from its current rotation. +Applies a rotation to the node, in radians, starting from its current rotation. .. _class_Node2D_set_global_position: - void **set_global_position** **(** :ref:`Vector2` position **)** -Set the node's global position. +Sets the node's global position. .. _class_Node2D_set_global_rotation: - void **set_global_rotation** **(** :ref:`float` radians **)** -Set the node's global rotation in radians. +Sets the node's global rotation in radians. .. _class_Node2D_set_global_rotation_in_degrees: - void **set_global_rotation_in_degrees** **(** :ref:`float` degrees **)** -Set the node's global rotation in degrees. +Sets the node's global rotation in degrees. .. _class_Node2D_set_global_scale: - void **set_global_scale** **(** :ref:`Vector2` scale **)** -Set the node's global scale. +Sets the node's global scale. .. _class_Node2D_set_global_transform: - void **set_global_transform** **(** :ref:`Transform2D` xform **)** -Set the node's global :ref:`Transform2D`. +Sets the node's global :ref:`Transform2D`. .. _class_Node2D_set_position: - void **set_position** **(** :ref:`Vector2` position **)** -Set the node's position. +Sets the node's position. .. _class_Node2D_set_rotation: - void **set_rotation** **(** :ref:`float` radians **)** -Set the node's rotation in radians. +Sets the node's rotation in radians. .. _class_Node2D_set_rotation_in_degrees: - void **set_rotation_in_degrees** **(** :ref:`float` degrees **)** -Set the node's rotation in degrees. +Sets the node's rotation in degrees. .. _class_Node2D_set_scale: - void **set_scale** **(** :ref:`Vector2` scale **)** -Set the node's scale. +Sets the node's scale. .. _class_Node2D_set_transform: - void **set_transform** **(** :ref:`Transform2D` xform **)** -Set the node's local :ref:`Transform2D`. +Sets the node's local :ref:`Transform2D`. .. _class_Node2D_set_z: - void **set_z** **(** :ref:`int` z **)** -Set the node's Z-index. +Sets the node's Z-index. .. _class_Node2D_set_z_as_relative: - void **set_z_as_relative** **(** :ref:`bool` enable **)** -Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. +Makes the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. .. _class_Node2D_to_global: - :ref:`Vector2` **to_global** **(** :ref:`Vector2` local_point **)** const +Converts a local point's coordinates to global coordinates. + .. _class_Node2D_to_local: - :ref:`Vector2` **to_local** **(** :ref:`Vector2` global_point **)** const +Converts a global point's coordinates to local coordinates. + .. _class_Node2D_translate: - void **translate** **(** :ref:`Vector2` offset **)** -Translate the node locally by the 'offset' vector, starting from its current local position. +Translates the node by the given ``offset`` in local coordinates. diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index cca1b0622..42961d066 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -40,9 +40,9 @@ Description A pre-parsed relative or absolute path in a scene tree, for use with :ref:`Node.get_node` and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, ``"Path2D/PathFollow2D/Sprite:texture:size"`` would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name. -You will usually just pass a string to :ref:`Node.get_node` and it will be automatically converted, but you may occasionally want to parse a path ahead of time with :ref:`NodePath` or the literal syntax ``@"path"``. Exporting a :ref:`NodePath` variable will give you a node selection widget in the properties panel of the editor, which can often be useful. +You will usually just pass a string to :ref:`Node.get_node` and it will be automatically converted, but you may occasionally want to parse a path ahead of time with ``NodePath`` or the literal syntax ``@"path"``. Exporting a ``NodePath`` variable will give you a node selection widget in the properties panel of the editor, which can often be useful. -A :ref:`NodePath` is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource. +A ``NodePath`` is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource. Member Function Description --------------------------- diff --git a/classes/class_occluderpolygon2d.rst b/classes/class_occluderpolygon2d.rst index f15068144..6d2f24d9b 100644 --- a/classes/class_occluderpolygon2d.rst +++ b/classes/class_occluderpolygon2d.rst @@ -14,7 +14,7 @@ OccluderPolygon2D Brief Description ----------------- - +Defines a 2D polygon for LightOccluder2D. Member Functions ---------------- @@ -38,23 +38,28 @@ Member Variables .. _class_OccluderPolygon2D_closed: -- :ref:`bool` **closed** +- :ref:`bool` **closed** - If ``true`` closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value ``true``. .. _class_OccluderPolygon2D_cull_mode: -- :ref:`int` **cull_mode** +- :ref:`int` **cull_mode** - Set the direction of the occlusion culling when not ``CULL_DISABLED``. Default value ``DISABLED``. .. _class_OccluderPolygon2D_polygon: -- :ref:`PoolVector2Array` **polygon** +- :ref:`PoolVector2Array` **polygon** - A :ref:`Vector2` array with the index for polygon's vertices positions. Numeric Constants ----------------- -- **CULL_DISABLED** = **0** -- **CULL_CLOCKWISE** = **1** -- **CULL_COUNTER_CLOCKWISE** = **2** +- **CULL_DISABLED** = **0** --- Culling mode for the occlusion. Disabled means no culling. See :ref:`cull_mode`. +- **CULL_CLOCKWISE** = **1** --- Culling mode for the occlusion. Sets the culling to be in clockwise direction. See :ref:`cull_mode`. +- **CULL_COUNTER_CLOCKWISE** = **2** --- Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See :ref:`cull_mode`. + +Description +----------- + +Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D`. Member Function Description --------------------------- diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index f60a993d5..9217e67d5 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -113,7 +113,7 @@ Add a separator to the list of items. Separators help to group items. Separator - void **clear** **(** **)** -Clear all the items in the :ref:`OptionButton`. +Clear all the items in the ``OptionButton``. .. _class_OptionButton_get_item_count: diff --git a/classes/class_os.rst b/classes/class_os.rst index 3e75111d9..07527846e 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -408,7 +408,7 @@ Returns the path to the current engine executable. Returns the current latin keyboard variant as a String. -Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO" or "ERROR" +Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO", "COLEMAK" or "ERROR". .. _class_OS_get_locale: diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index 4797f0800..e197731ec 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -47,7 +47,7 @@ Member Function Description - void **close** **(** **)** -Close the UDP socket the :ref:`PacketPeerUDP` is currently listening on. +Close the UDP socket the ``PacketPeerUDP`` is currently listening on. .. _class_PacketPeerUDP_get_packet_ip: @@ -65,13 +65,13 @@ Return the port of the remote peer that sent the last packet(that was received w - :ref:`bool` **is_listening** **(** **)** const -Return whether this :ref:`PacketPeerUDP` is listening. +Return whether this ``PacketPeerUDP`` is listening. .. _class_PacketPeerUDP_listen: - :ref:`int` **listen** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`int` recv_buf_size=65536 **)** -Make this :ref:`PacketPeerUDP` listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size". +Make this ``PacketPeerUDP`` listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size". If "bind_address" is set as "\*" (default), the peer will listen on all available addresses (both IPv4 and IPv6). diff --git a/classes/class_parallaxbackground.rst b/classes/class_parallaxbackground.rst index f95b12081..b7ea67957 100644 --- a/classes/class_parallaxbackground.rst +++ b/classes/class_parallaxbackground.rst @@ -50,33 +50,33 @@ Member Variables .. _class_ParallaxBackground_scroll_base_offset: -- :ref:`Vector2` **scroll_base_offset** +- :ref:`Vector2` **scroll_base_offset** - Base position offset of all :ref:`ParallaxLayer` children. .. _class_ParallaxBackground_scroll_base_scale: -- :ref:`Vector2` **scroll_base_scale** +- :ref:`Vector2` **scroll_base_scale** - Base motion scale of all :ref:`ParallaxLayer` children. .. _class_ParallaxBackground_scroll_ignore_camera_zoom: -- :ref:`bool` **scroll_ignore_camera_zoom** +- :ref:`bool` **scroll_ignore_camera_zoom** - If ``true`` elements in :ref:`ParallaxLayer` child aren't affected by the zoom level of the camera. .. _class_ParallaxBackground_scroll_limit_begin: -- :ref:`Vector2` **scroll_limit_begin** +- :ref:`Vector2` **scroll_limit_begin** - Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than :ref:`scroll_limit_end` to work. .. _class_ParallaxBackground_scroll_limit_end: -- :ref:`Vector2` **scroll_limit_end** +- :ref:`Vector2` **scroll_limit_end** - Right bottom limits for scrolling to end. If the camera is outside of this limit the background will stop scrolling. Must be higher than :ref:`scroll_limit_begin` to work. .. _class_ParallaxBackground_scroll_offset: -- :ref:`Vector2` **scroll_offset** +- :ref:`Vector2` **scroll_offset** - The ParallaxBackground's scroll value. Calculated automatically when using a :ref:`Camera2D`, but can be used to manually manage scrolling when no camera is present. Description ----------- -A ParallaxBackground will use one or more :ref:`ParallaxLayer` nodes to create a parallax scrolling background. Each :ref:`ParallaxLayer` can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game. +A ParallaxBackground uses one or more :ref:`ParallaxLayer` child nodes to create a parallax effect. Each :ref:`ParallaxLayer` can move at a different speed using :ref:`ParallaxLayer.motion_offset`. This creates an illusion of depth in a 2D game. If not used with a :ref:`Camera2D`, you must manually calculate the :ref:`scroll_offset`. Member Function Description --------------------------- diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index bb6baea1c..bf96cc5cc 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -38,21 +38,23 @@ Member Variables .. _class_ParallaxLayer_motion_mirroring: -- :ref:`Vector2` **motion_mirroring** +- :ref:`Vector2` **motion_mirroring** - The ParallaxLayer's :ref:`Texture` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0`` the :ref:`Texture` will not be mirrored. Default value: ``(0, 0)``. .. _class_ParallaxLayer_motion_offset: -- :ref:`Vector2` **motion_offset** +- :ref:`Vector2` **motion_offset** - The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`ParallaxBackground.scroll_offset`. .. _class_ParallaxLayer_motion_scale: -- :ref:`Vector2` **motion_scale** +- :ref:`Vector2` **motion_scale** - Multiplies the ParallaxLayer's motion. If an axis is set to ``0`` it will not scroll. Description ----------- -A ParallaxLayer must be the child of a :ref:`ParallaxBackground` node. All child nodes will be affected by the parallax scrolling of this layer. +A ParallaxLayer must be the child of a :ref:`ParallaxBackground` node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the :ref:`ParallaxBackground.scroll_offset` value. + +This node's children will be affected by its scroll offset. Member Function Description --------------------------- diff --git a/classes/class_path2d.rst b/classes/class_path2d.rst index e4651bc8e..f265ab98b 100644 --- a/classes/class_path2d.rst +++ b/classes/class_path2d.rst @@ -14,7 +14,7 @@ Path2D Brief Description ----------------- -Container for a :ref:`Curve2D`. +Contains a :ref:`Curve2D` path for :ref:`PathFollow2D` nodes to follow. Member Functions ---------------- @@ -30,13 +30,13 @@ Member Variables .. _class_Path2D_curve: -- :ref:`Curve2D` **curve** +- :ref:`Curve2D` **curve** - A :ref:`Curve2D` describing the path. Description ----------- -This class is a container/Node-ification of a :ref:`Curve2D`, so it can have :ref:`Node2D` properties and :ref:`Node` info. +Can have :ref:`PathFollow2D` child-nodes moving along the :ref:`Curve2D`. See :ref:`PathFollow2D` for more information on this usage. Member Function Description --------------------------- diff --git a/classes/class_performance.rst b/classes/class_performance.rst index 8daaf8745..b665700f0 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -43,10 +43,10 @@ Numeric Constants - **RENDER_SHADER_CHANGES_IN_FRAME** = **14** --- Shader changes per frame. 3D only. - **RENDER_SURFACE_CHANGES_IN_FRAME** = **15** --- Render surface changes per frame. 3D only. - **RENDER_DRAW_CALLS_IN_FRAME** = **16** --- Draw calls per frame. 3D only. -- **RENDER_USAGE_VIDEO_MEM_TOTAL** = **20** - **RENDER_VIDEO_MEM_USED** = **17** --- Video memory used. Includes both texture and vertex memory. - **RENDER_TEXTURE_MEM_USED** = **18** --- Texture memory used. - **RENDER_VERTEX_MEM_USED** = **19** --- Vertex memory used. +- **RENDER_USAGE_VIDEO_MEM_TOTAL** = **20** - **PHYSICS_2D_ACTIVE_OBJECTS** = **21** --- Number of active :ref:`RigidBody2D` nodes in the game. - **PHYSICS_2D_COLLISION_PAIRS** = **22** --- Number of collision pairs in the 2D physics engine. - **PHYSICS_2D_ISLAND_COUNT** = **23** --- Number of islands in the 2D physics engine. diff --git a/classes/class_physics2ddirectspacestate.rst b/classes/class_physics2ddirectspacestate.rst index b97e9ffde..db5355803 100644 --- a/classes/class_physics2ddirectspacestate.rst +++ b/classes/class_physics2ddirectspacestate.rst @@ -40,8 +40,8 @@ Numeric Constants - **TYPE_MASK_KINEMATIC_BODY** = **2** --- Check for collisions with kinematic bodies. - **TYPE_MASK_RIGID_BODY** = **4** --- Check for collisions with rigid bodies. - **TYPE_MASK_CHARACTER_BODY** = **8** --- Check for collisions with rigid bodies in character mode. -- **TYPE_MASK_AREA** = **16** --- Check for collisions with areas. - **TYPE_MASK_COLLISION** = **15** --- Check for collisions with any kind of bodies (but not areas). +- **TYPE_MASK_AREA** = **16** --- Check for collisions with areas. Description ----------- diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst index dc555a405..cffc6442f 100644 --- a/classes/class_physics2dserver.rst +++ b/classes/class_physics2dserver.rst @@ -204,6 +204,7 @@ Numeric Constants - **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **5** --- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. - **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **6** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. - **SHAPE_LINE** = **0** --- This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. +- **SHAPE_RAY** = **1** - **SHAPE_SEGMENT** = **2** --- This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections. - **SHAPE_CIRCLE** = **3** --- This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. - **SHAPE_RECTANGLE** = **4** --- This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. diff --git a/classes/class_physicsdirectspacestate.rst b/classes/class_physicsdirectspacestate.rst index 0ca38f485..ece3cfdc6 100644 --- a/classes/class_physicsdirectspacestate.rst +++ b/classes/class_physicsdirectspacestate.rst @@ -38,8 +38,8 @@ Numeric Constants - **TYPE_MASK_KINEMATIC_BODY** = **2** - **TYPE_MASK_RIGID_BODY** = **4** - **TYPE_MASK_CHARACTER_BODY** = **8** -- **TYPE_MASK_AREA** = **16** - **TYPE_MASK_COLLISION** = **15** +- **TYPE_MASK_AREA** = **16** Member Function Description --------------------------- diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index 502d78446..be8e3cc50 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -339,8 +339,8 @@ The higher, the faster. - **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_ANGULAR_DAMP** = **5** --- Constant to set/get a body's angular dampening factor. - **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_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. diff --git a/classes/class_poolbytearray.rst b/classes/class_poolbytearray.rst index 7294c0887..cf8fdc1c2 100644 --- a/classes/class_poolbytearray.rst +++ b/classes/class_poolbytearray.rst @@ -73,19 +73,19 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append a :ref:`PoolByteArray` at the end of this array. +Append a ``PoolByteArray`` at the end of this array. .. _class_PoolByteArray_compress: - :ref:`PoolByteArray` **compress** **(** :ref:`int` compression_mode=0 **)** -Returns a new :ref:`PoolByteArray` with the data compressed. Set the compression mode using one of :ref:`File`'s COMPRESS\_\* constants. +Returns a new ``PoolByteArray`` with the data compressed. Set the compression mode using one of :ref:`File`'s COMPRESS\_\* constants. .. _class_PoolByteArray_decompress: - :ref:`PoolByteArray` **decompress** **(** :ref:`int` buffer_size, :ref:`int` compression_mode=0 **)** -Returns a new :ref:`PoolByteArray` with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of :ref:`File`'s COMPRESS\_\* constants. +Returns a new ``PoolByteArray`` with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of :ref:`File`'s COMPRESS\_\* constants. .. _class_PoolByteArray_get_string_from_ascii: @@ -145,6 +145,6 @@ Return the size of the array. - :ref:`PoolByteArray` **subarray** **(** :ref:`int` from, :ref:`int` to **)** -Returns the slice of the :ref:`PoolByteArray` between indices (inclusive) as a new :ref:`PoolByteArray`. Any negative index is considered to be from the end of the array. +Returns the slice of the ``PoolByteArray`` between indices (inclusive) as a new ``PoolByteArray``. Any negative index is considered to be from the end of the array. diff --git a/classes/class_poolcolorarray.rst b/classes/class_poolcolorarray.rst index 4f91e1d84..dea7bfe88 100644 --- a/classes/class_poolcolorarray.rst +++ b/classes/class_poolcolorarray.rst @@ -63,7 +63,7 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append a :ref:`PoolColorArray` at the end of this array. +Append a ``PoolColorArray`` at the end of this array. .. _class_PoolColorArray_insert: diff --git a/classes/class_poolintarray.rst b/classes/class_poolintarray.rst index 2ee6477a5..4ec7b1d70 100644 --- a/classes/class_poolintarray.rst +++ b/classes/class_poolintarray.rst @@ -63,7 +63,7 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append an :ref:`PoolIntArray` at the end of this array. +Append an ``PoolIntArray`` at the end of this array. .. _class_PoolIntArray_insert: diff --git a/classes/class_poolvector2array.rst b/classes/class_poolvector2array.rst index 20c9fe0d2..f2e31ff4f 100644 --- a/classes/class_poolvector2array.rst +++ b/classes/class_poolvector2array.rst @@ -51,7 +51,7 @@ Member Function Description - :ref:`PoolVector2Array` **PoolVector2Array** **(** :ref:`Array` from **)** -Construct a new :ref:`PoolVector2Array`. Optionally, you can pass in an Array that will be converted. +Construct a new ``PoolVector2Array``. Optionally, you can pass in an Array that will be converted. .. _class_PoolVector2Array_append: @@ -63,7 +63,7 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append an :ref:`PoolVector2Array` at the end of this array. +Append an ``PoolVector2Array`` at the end of this array. .. _class_PoolVector2Array_insert: diff --git a/classes/class_poolvector3array.rst b/classes/class_poolvector3array.rst index b9e57e0dc..23453acf9 100644 --- a/classes/class_poolvector3array.rst +++ b/classes/class_poolvector3array.rst @@ -63,7 +63,7 @@ Append an element at the end of the array (alias of :ref:`push_back` array **)** -Append an :ref:`PoolVector3Array` at the end of this array. +Append an ``PoolVector3Array`` at the end of this array. .. _class_PoolVector3Array_insert: diff --git a/classes/class_quat.rst b/classes/class_quat.rst index d11536081..1e0e3324e 100644 --- a/classes/class_quat.rst +++ b/classes/class_quat.rst @@ -50,25 +50,31 @@ Member Variables .. _class_Quat_w: -- :ref:`float` **w** +- :ref:`float` **w** - W component of the quaternion. Default value: ``1`` .. _class_Quat_x: -- :ref:`float` **x** +- :ref:`float` **x** - X component of the quaternion. Default value: ``0`` .. _class_Quat_y: -- :ref:`float` **y** +- :ref:`float` **y** - Y component of the quaternion. Default value: ``0`` .. _class_Quat_z: -- :ref:`float` **z** +- :ref:`float` **z** - Z component of the quaternion. Default value: ``0`` Description ----------- -Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between two rotations. Multiplying quaternions also cheaply reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues. +A 4-dimensional vector representing a rotation. + +The vector represents a 4 dimensional complex number where multiplication of the basis elements is not commutative (multiplying i with j gives a different result than multiplying j with i). + +Multiplying quaternions reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues. + +It can be used to perform SLERP (spherical-linear interpolation) between two rotations. Member Function Description --------------------------- @@ -77,6 +83,8 @@ Member Function Description - :ref:`Quat` **Quat** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** +Returns a quaternion defined by these values. + .. _class_Quat_Quat: - :ref:`Quat` **Quat** **(** :ref:`Vector3` axis, :ref:`float` angle **)** @@ -93,6 +101,8 @@ Returns the rotation matrix corresponding to the given quaternion. - :ref:`Quat` **cubic_slerp** **(** :ref:`Quat` b, :ref:`Quat` pre_a, :ref:`Quat` post_b, :ref:`float` t **)** +Performs a cubic spherical-linear interpolation with another quaternion. + .. _class_Quat_dot: - :ref:`float` **dot** **(** :ref:`Quat` b **)** @@ -133,14 +143,18 @@ Returns a copy of the quaternion, normalized to unit length. - :ref:`Quat` **slerp** **(** :ref:`Quat` b, :ref:`float` t **)** -Perform a spherical-linear interpolation with another quaternion. +Performs a spherical-linear interpolation with another quaternion. .. _class_Quat_slerpni: - :ref:`Quat` **slerpni** **(** :ref:`Quat` b, :ref:`float` t **)** +Performs a spherical-linear interpolation with another quaterion without checking if the rotation path is not bigger than 90°. + .. _class_Quat_xform: - :ref:`Vector3` **xform** **(** :ref:`Vector3` v **)** +Transforms the vector ``v`` by this quaternion. + diff --git a/classes/class_raycast.rst b/classes/class_raycast.rst index 839c033dc..f687a3ab1 100644 --- a/classes/class_raycast.rst +++ b/classes/class_raycast.rst @@ -19,45 +19,49 @@ Query the closest object intersecting a ray. Member Functions ---------------- -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception` **(** :ref:`Object` node **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_exceptions` **(** **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_raycast_update` **(** **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_cast_to` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_layer` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collision_normal` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_collision_point` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_type_mask` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_colliding` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_enabled` **(** **)** const | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception` **(** :ref:`Object` node **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cast_to` **(** :ref:`Vector3` local_point **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_layer` **(** :ref:`int` layer **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_type_mask` **(** :ref:`int` mask **)** | -+--------------------------------+-------------------------------------------------------------------------------------------------------+ ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception` **(** :ref:`Object` node **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_exceptions` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_raycast_update` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_cast_to` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_collider` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collision_normal` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collision_point` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_type_mask` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_colliding` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception` **(** :ref:`Object` node **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cast_to` **(** :ref:`Vector3` local_point **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask` **(** :ref:`int` mask **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_type_mask` **(** :ref:`int` mask **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- @@ -66,9 +70,9 @@ Member Variables - :ref:`Vector3` **cast_to** - The ray's destination point, relative to the RayCast's ``position``. - .. _class_RayCast_collision_layer: + .. _class_RayCast_collision_mask: -- :ref:`int` **collision_layer** - The RayCast's collision layer(s). Only bodies in the same collision layer(s) will be detected. +- :ref:`int` **collision_mask** - The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. .. _class_RayCast_enabled: @@ -157,11 +161,15 @@ Example: if RayCast.is_colliding(): var shape = RayCast.get_collider_shape() -.. _class_RayCast_get_collision_layer: +.. _class_RayCast_get_collision_mask: -- :ref:`int` **get_collision_layer** **(** **)** const +- :ref:`int` **get_collision_mask** **(** **)** const -Returns the collision layer for this ray. +Returns the collision mask for this ray. + +.. _class_RayCast_get_collision_mask_bit: + +- :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const .. _class_RayCast_get_collision_normal: @@ -211,11 +219,15 @@ Removes a collision exception so the ray does report collisions with the specifi Sets the ray destination point, so that the ray will test from the ray's origin to ``local_point``. -.. _class_RayCast_set_collision_layer: +.. _class_RayCast_set_collision_mask: -- void **set_collision_layer** **(** :ref:`int` layer **)** +- void **set_collision_mask** **(** :ref:`int` mask **)** -Set the mask to filter objects. Only objects with at least the same mask element set will be detected. +Set the mask to filter objects. Only objects in at least one collision layer enabled in the mask will be detected. + +.. _class_RayCast_set_collision_mask_bit: + +- void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** .. _class_RayCast_set_enabled: diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index 3e573ef89..8dfb74882 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -19,49 +19,53 @@ Query the closest object intersecting a ray. Member Functions ---------------- -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception` **(** :ref:`Object` node **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_exceptions` **(** **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_raycast_update` **(** **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_cast_to` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_collider` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_collision_layer` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_collision_point` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_exclude_parent_body` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_type_mask` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_colliding` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_enabled` **(** **)** const | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception` **(** :ref:`Object` node **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cast_to` **(** :ref:`Vector2` local_point **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_collision_layer` **(** :ref:`int` layer **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_exclude_parent_body` **(** :ref:`bool` mask **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_type_mask` **(** :ref:`int` mask **)** | -+--------------------------------+------------------------------------------------------------------------------------------------------------------+ ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception` **(** :ref:`Object` node **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_exceptions` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_raycast_update` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_cast_to` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_collider` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collision_point` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_exclude_parent_body` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_type_mask` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_colliding` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception` **(** :ref:`Object` node **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cast_to` **(** :ref:`Vector2` local_point **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask` **(** :ref:`int` mask **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_exclude_parent_body` **(** :ref:`bool` mask **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_type_mask` **(** :ref:`int` mask **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- @@ -70,9 +74,9 @@ Member Variables - :ref:`Vector2` **cast_to** - The ray's destination point, relative to the RayCast's ``position``. - .. _class_RayCast2D_collision_layer: + .. _class_RayCast2D_collision_mask: -- :ref:`int` **collision_layer** - The RayCast2D's collision layer(s). Only bodies in the same collision layer(s) will be detected. +- :ref:`int` **collision_mask** - The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. .. _class_RayCast2D_enabled: @@ -163,11 +167,15 @@ Example: if RayCast2D.is_colliding(): var shape = RayCast2D.get_collider_shape() -.. _class_RayCast2D_get_collision_layer: +.. _class_RayCast2D_get_collision_mask: -- :ref:`int` **get_collision_layer** **(** **)** const +- :ref:`int` **get_collision_mask** **(** **)** const -Returns the collision layer for this ray. +Returns the collision mask for this ray. + +.. _class_RayCast2D_get_collision_mask_bit: + +- :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const .. _class_RayCast2D_get_collision_normal: @@ -223,11 +231,15 @@ Removes a collision exception so the ray does report collisions with the specifi Sets the ray destination point, so that the ray will test from the ray's origin to ``local_point`` -.. _class_RayCast2D_set_collision_layer: +.. _class_RayCast2D_set_collision_mask: -- void **set_collision_layer** **(** :ref:`int` layer **)** +- void **set_collision_mask** **(** :ref:`int` mask **)** -Set the mask to filter objects. Only objects with at least the same mask element set will be detected. +Set the mask to filter objects. Only objects in at least one collision layer enabled in the mask will be detected. + +.. _class_RayCast2D_set_collision_mask_bit: + +- void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** .. _class_RayCast2D_set_enabled: diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 86c7b9618..ff262dcd3 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -64,7 +64,7 @@ Member Variables Description ----------- -Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. Member Function Description --------------------------- @@ -73,74 +73,78 @@ Member Function Description - :ref:`Rect2` **Rect2** **(** :ref:`Vector2` position, :ref:`Vector2` size **)** -Construct a :ref:`Rect2` by position and size. +Constructs a ``Rect2`` by position and size. .. _class_Rect2_Rect2: - :ref:`Rect2` **Rect2** **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** -Construct a :ref:`Rect2` by x, y, width and height. +Constructs a ``Rect2`` by x, y, width, and height. .. _class_Rect2_clip: - :ref:`Rect2` **clip** **(** :ref:`Rect2` b **)** -Returns the intersection of this :ref:`Rect2` and b. +Returns the intersection of this ``Rect2`` and b. .. _class_Rect2_encloses: - :ref:`bool` **encloses** **(** :ref:`Rect2` b **)** -Returns true if this :ref:`Rect2` completely encloses another one. +Returns ``true`` if this ``Rect2`` completely encloses another one. .. _class_Rect2_expand: - :ref:`Rect2` **expand** **(** :ref:`Vector2` to **)** -Return this :ref:`Rect2` expanded to include a given point. +Returns this ``Rect2`` expanded to include a given point. .. _class_Rect2_get_area: - :ref:`float` **get_area** **(** **)** -Get the area of the :ref:`Rect2`. +Returns the area of the ``Rect2``. .. _class_Rect2_grow: - :ref:`Rect2` **grow** **(** :ref:`float` by **)** -Return a copy of the :ref:`Rect2` grown a given amount of units towards all the sides. +Returns a copy of the ``Rect2`` grown a given amount of units towards all the sides. .. _class_Rect2_grow_individual: - :ref:`Rect2` **grow_individual** **(** :ref:`float` left, :ref:`float` top, :ref:`float` right, :ref:`float` bottom **)** +Returns a copy of the ``Rect2`` grown a given amount of units towards each direction individually. + .. _class_Rect2_grow_margin: - :ref:`Rect2` **grow_margin** **(** :ref:`int` margin, :ref:`float` by **)** +Returns a copy of the ``Rect2`` grown a given amount of units towards the Margin direction. + .. _class_Rect2_has_no_area: - :ref:`bool` **has_no_area** **(** **)** -Return true if the :ref:`Rect2` is flat or empty. +Returns ``true`` if the ``Rect2`` is flat or empty. .. _class_Rect2_has_point: - :ref:`bool` **has_point** **(** :ref:`Vector2` point **)** -Return true if the :ref:`Rect2` contains a point. +Returns ``true`` if the ``Rect2`` contains a point. .. _class_Rect2_intersects: - :ref:`bool` **intersects** **(** :ref:`Rect2` b **)** -Return true if the :ref:`Rect2` overlaps with another. +Returns ``true`` if the ``Rect2`` overlaps with another. .. _class_Rect2_merge: - :ref:`Rect2` **merge** **(** :ref:`Rect2` b **)** -Combine this :ref:`Rect2` with another, a larger one is returned that contains both. +Returns a larger Rect2 that contains this Rect2 and ``with``. diff --git a/classes/class_rect3.rst b/classes/class_rect3.rst index 903b50c20..809f382bd 100644 --- a/classes/class_rect3.rst +++ b/classes/class_rect3.rst @@ -70,7 +70,7 @@ Member Variables .. _class_Rect3_position: -- :ref:`Vector3` **position** +- :ref:`Vector3` **position** - Beginning corner. .. _class_Rect3_size: @@ -80,7 +80,7 @@ Member Variables Description ----------- -Rect3 provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests. +Rect3 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. Member Function Description --------------------------- @@ -95,120 +95,120 @@ Optional constructor, accepts position and size. - :ref:`bool` **encloses** **(** :ref:`Rect3` with **)** -Return true if this :ref:`Rect3` completely encloses another one. +Returns ``true`` if this ``Rect3`` completely encloses another one. .. _class_Rect3_expand: - :ref:`Rect3` **expand** **(** :ref:`Vector3` to_point **)** -Return this :ref:`Rect3` expanded to include a given point. +Returns this ``Rect3`` expanded to include a given point. .. _class_Rect3_get_area: - :ref:`float` **get_area** **(** **)** -Get the area of the :ref:`Rect3`. +Gets the area of the ``Rect3``. .. _class_Rect3_get_endpoint: - :ref:`Vector3` **get_endpoint** **(** :ref:`int` idx **)** -Get the position of the 8 endpoints of the :ref:`Rect3` in space. +Gets the position of the 8 endpoints of the ``Rect3`` in space. .. _class_Rect3_get_longest_axis: - :ref:`Vector3` **get_longest_axis** **(** **)** -Return the normalized longest axis of the :ref:`Rect3`. +Returns the normalized longest axis of the ``Rect3``. .. _class_Rect3_get_longest_axis_index: - :ref:`int` **get_longest_axis_index** **(** **)** -Return the index of the longest axis of the :ref:`Rect3` (according to :ref:`Vector3`::AXIS\* enum). +Returns the index of the longest axis of the ``Rect3`` (according to :ref:`Vector3`::AXIS\* enum). .. _class_Rect3_get_longest_axis_size: - :ref:`float` **get_longest_axis_size** **(** **)** -Return the scalar length of the longest axis of the :ref:`Rect3`. +Returns the scalar length of the longest axis of the ``Rect3``. .. _class_Rect3_get_shortest_axis: - :ref:`Vector3` **get_shortest_axis** **(** **)** -Return the normalized shortest axis of the :ref:`Rect3`. +Returns the normalized shortest axis of the ``Rect3``. .. _class_Rect3_get_shortest_axis_index: - :ref:`int` **get_shortest_axis_index** **(** **)** -Return the index of the shortest axis of the :ref:`Rect3` (according to :ref:`Vector3`::AXIS\* enum). +Returns the index of the shortest axis of the ``Rect3`` (according to :ref:`Vector3`::AXIS\* enum). .. _class_Rect3_get_shortest_axis_size: - :ref:`float` **get_shortest_axis_size** **(** **)** -Return the scalar length of the shortest axis of the :ref:`Rect3`. +Returns the scalar length of the shortest axis of the ``Rect3``. .. _class_Rect3_get_support: - :ref:`Vector3` **get_support** **(** :ref:`Vector3` dir **)** -Return the support point in a given direction. This is useful for collision detection algorithms. +Returns the support point in a given direction. This is useful for collision detection algorithms. .. _class_Rect3_grow: - :ref:`Rect3` **grow** **(** :ref:`float` by **)** -Return a copy of the :ref:`Rect3` grown a given amount of units towards all the sides. +Returns a copy of the ``Rect3`` grown a given amount of units towards all the sides. .. _class_Rect3_has_no_area: - :ref:`bool` **has_no_area** **(** **)** -Return true if the :ref:`Rect3` is flat or empty. +Returns ``true`` if the ``Rect3`` is flat or empty. .. _class_Rect3_has_no_surface: - :ref:`bool` **has_no_surface** **(** **)** -Return true if the :ref:`Rect3` is empty. +Returns ``true`` if the ``Rect3`` is empty. .. _class_Rect3_has_point: - :ref:`bool` **has_point** **(** :ref:`Vector3` point **)** -Return true if the :ref:`Rect3` contains a point. +Returns ``true`` if the ``Rect3`` contains a point. .. _class_Rect3_intersection: - :ref:`Rect3` **intersection** **(** :ref:`Rect3` with **)** -Return the intersection between two :ref:`Rect3`. An empty Rect3 (size 0,0,0) is returned on failure. +Returns the intersection between two ``Rect3``. An empty Rect3 (size 0,0,0) is returned on failure. .. _class_Rect3_intersects: - :ref:`bool` **intersects** **(** :ref:`Rect3` with **)** -Return true if the :ref:`Rect3` overlaps with another. +Returns ``true`` if the ``Rect3`` overlaps with another. .. _class_Rect3_intersects_plane: - :ref:`bool` **intersects_plane** **(** :ref:`Plane` plane **)** -Return true if the :ref:`Rect3` is at both sides of a plane. +Returns ``true`` if the ``Rect3`` is on both sides of a plane. .. _class_Rect3_intersects_segment: - :ref:`bool` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** -Return true if the :ref:`Rect3` intersects the line segment between from and to +Returns ``true`` if the ``Rect3`` intersects the line segment between ``from`` and ``to``. .. _class_Rect3_merge: - :ref:`Rect3` **merge** **(** :ref:`Rect3` with **)** -Combine this :ref:`Rect3` with another, a larger one is returned that contains both. +Returns a larger Rect3 that contains this Rect3 and ``with``. diff --git a/classes/class_remotetransform.rst b/classes/class_remotetransform.rst index 4b5cdc241..e74ae1ace 100644 --- a/classes/class_remotetransform.rst +++ b/classes/class_remotetransform.rst @@ -14,7 +14,7 @@ RemoteTransform Brief Description ----------------- - +RemoteTransform mirrors the :ref:`Transform` of another :ref:`Spatial` derived Node in the scene. Member Functions ---------------- @@ -46,25 +46,32 @@ Member Variables .. _class_RemoteTransform_remote_path: -- :ref:`NodePath` **remote_path** +- :ref:`NodePath` **remote_path** - The remote node's :ref:`NodePath`. .. _class_RemoteTransform_update_position: -- :ref:`bool` **update_position** +- :ref:`bool` **update_position** - If ``true`` the remote node's position is mirrored. .. _class_RemoteTransform_update_rotation: -- :ref:`bool` **update_rotation** +- :ref:`bool` **update_rotation** - If ``true`` the remote node's rotation is mirrored. .. _class_RemoteTransform_update_scale: -- :ref:`bool` **update_scale** +- :ref:`bool` **update_scale** - If ``true`` the remote node's scale is mirrored. .. _class_RemoteTransform_use_global_coordinates: -- :ref:`bool` **use_global_coordinates** +- :ref:`bool` **use_global_coordinates** - If ``true`` global coordinates are used. If ``false`` local coordinates are used. Default value: ``true``. +Description +----------- + +RemoteTransform mirrors the :ref:`Transform` of another :ref:`Spatial` derived Node (called the remote node) in the scene. + +It can be set to track another Node's position, rotation and/or scale and update its own accordingly, using either global or local coordinates. + Member Function Description --------------------------- diff --git a/classes/class_remotetransform2d.rst b/classes/class_remotetransform2d.rst index 1bcdcacb7..691dd0282 100644 --- a/classes/class_remotetransform2d.rst +++ b/classes/class_remotetransform2d.rst @@ -14,7 +14,7 @@ RemoteTransform2D Brief Description ----------------- - +RemoteTransform2D mirrors the :ref:`Transform2D` of another :ref:`CanvasItem` derived Node in the scene. Member Functions ---------------- @@ -46,25 +46,32 @@ Member Variables .. _class_RemoteTransform2D_remote_path: -- :ref:`NodePath` **remote_path** +- :ref:`NodePath` **remote_path** - The remote node's :ref:`NodePath`. .. _class_RemoteTransform2D_update_position: -- :ref:`bool` **update_position** +- :ref:`bool` **update_position** - If ``true`` the remote node's position is mirrored. .. _class_RemoteTransform2D_update_rotation: -- :ref:`bool` **update_rotation** +- :ref:`bool` **update_rotation** - If ``true`` the remote node's rotation is mirrored. .. _class_RemoteTransform2D_update_scale: -- :ref:`bool` **update_scale** +- :ref:`bool` **update_scale** - If ``true`` the remote node's scale is mirrored. .. _class_RemoteTransform2D_use_global_coordinates: -- :ref:`bool` **use_global_coordinates** +- :ref:`bool` **use_global_coordinates** - If ``true`` global coordinates are used. If ``false`` local coordinates are used. Default value: ``true``. +Description +----------- + +RemoteTransform2D mirrors the :ref:`Transform2D` of another :ref:`CanvasItem` derived Node (called the remote node) in the scene. + +It can be set to track another Node's position, rotation and/or and update its own accordingly, using either global or local coordinates. + Member Function Description --------------------------- diff --git a/classes/class_resource.rst b/classes/class_resource.rst index f11cb80a4..b1ecfdc4d 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -127,7 +127,7 @@ Set the name of the resources, any name is valid (it doesn't have to be unique). - void **set_path** **(** :ref:`String` path **)** -Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another :ref:`Resource` already has path "path". +Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another ``Resource`` already has path "path". .. _class_Resource_setup_local_to_scene: @@ -137,6 +137,6 @@ Set the path of the resource. This is useful mainly for editors when saving/load - void **take_over_path** **(** :ref:`String` path **)** -Set the path of the resource. Differs from set_path(), if another :ref:`Resource` exists with "path" it over-takes it, instead of failing. +Set the path of the resource. Differs from set_path(), if another ``Resource`` exists with "path" it over-takes it, instead of failing. diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 7f5f35149..df80ea85f 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -36,7 +36,7 @@ Member Functions Description ----------- -Resource Loader. This is a static object accessible as :ref:`ResourceLoader`. GDScript has a simplified load() function, though. +Resource Loader. This is a static object accessible as ``ResourceLoader``. GDScript has a simplified load() function, though. Member Function Description --------------------------- diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 4f62a22cb..9d51007b1 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -124,23 +124,23 @@ Member Variables .. _class_RichTextLabel_bbcode_enabled: -- :ref:`bool` **bbcode_enabled** +- :ref:`bool` **bbcode_enabled** - If ``true`` the label uses BBCode formatting. Default value: ``false``. .. _class_RichTextLabel_bbcode_text: -- :ref:`String` **bbcode_text** +- :ref:`String` **bbcode_text** - The label's text in BBCode format. .. _class_RichTextLabel_override_selected_font_color: -- :ref:`bool` **override_selected_font_color** +- :ref:`bool` **override_selected_font_color** - If ``true`` the label uses the custom font color. Default value: ``false``. .. _class_RichTextLabel_percent_visible: -- :ref:`float` **percent_visible** +- :ref:`float` **percent_visible** - The text's visibility, as a :ref:`float` between 0.0 and 1.0. .. _class_RichTextLabel_visible_characters: -- :ref:`int` **visible_characters** +- :ref:`int` **visible_characters** - The restricted number of characters to display in the label. Numeric Constants @@ -163,6 +163,7 @@ Numeric Constants - **ITEM_ALIGN** = **7** - **ITEM_INDENT** = **8** - **ITEM_LIST** = **9** +- **ITEM_TABLE** = **10** - **ITEM_META** = **11** Description @@ -189,18 +190,26 @@ Member Function Description - void **clear** **(** **)** +Clears the label's text. + .. _class_RichTextLabel_get_bbcode: - :ref:`String` **get_bbcode** **(** **)** const +Returns label's BBCode. + .. _class_RichTextLabel_get_line_count: - :ref:`int` **get_line_count** **(** **)** const +Returns the number of lines in the text. + .. _class_RichTextLabel_get_percent_visible: - :ref:`float` **get_percent_visible** **(** **)** const +Returns the text's visibility as a floating point value between 0.0 and 1.0. + .. _class_RichTextLabel_get_tab_size: - :ref:`int` **get_tab_size** **(** **)** const @@ -209,12 +218,14 @@ Member Function Description - :ref:`String` **get_text** **(** **)** -Returns the raw text, stripping out the formatting information. +Returns the label's text with the formatting removed. .. _class_RichTextLabel_get_total_character_count: - :ref:`int` **get_total_character_count** **(** **)** const +Returns the total number of characters. + .. _class_RichTextLabel_get_v_scroll: - :ref:`VScrollBar` **get_v_scroll** **(** **)** @@ -227,6 +238,8 @@ Returns the raw text, stripping out the formatting information. - :ref:`int` **get_visible_line_count** **(** **)** const +Returns the number of visible lines. + .. _class_RichTextLabel_is_meta_underlined: - :ref:`bool` **is_meta_underlined** **(** **)** const @@ -239,6 +252,8 @@ Returns the raw text, stripping out the formatting information. - :ref:`bool` **is_scroll_active** **(** **)** const +Returns ``true`` if active scrolling is enabled. + .. _class_RichTextLabel_is_scroll_following: - :ref:`bool` **is_scroll_following** **(** **)** const @@ -247,16 +262,20 @@ Returns the raw text, stripping out the formatting information. - :ref:`bool` **is_selection_enabled** **(** **)** const -Return true if selecting the text inside this richtext is allowed. +Returns ``true`` if the label's text can be selected. .. _class_RichTextLabel_is_using_bbcode: - :ref:`bool` **is_using_bbcode** **(** **)** const +Returns ``true`` if the label has BBCode. + .. _class_RichTextLabel_newline: - void **newline** **(** **)** +Adds a newline to the end of the rich text. + .. _class_RichTextLabel_parse_bbcode: - :ref:`int` **parse_bbcode** **(** :ref:`String` bbcode **)** @@ -313,6 +332,8 @@ Return true if selecting the text inside this richtext is allowed. - void **set_bbcode** **(** :ref:`String` text **)** +Sets the BBCode text to the label. + .. _class_RichTextLabel_set_meta_underline: - void **set_meta_underline** **(** :ref:`bool` enable **)** @@ -325,6 +346,8 @@ Return true if selecting the text inside this richtext is allowed. - void **set_percent_visible** **(** :ref:`float` percent_visible **)** +Sets the text's visibility. Takes a floating point value between 0.0 and 1.0. + .. _class_RichTextLabel_set_scroll_active: - void **set_scroll_active** **(** :ref:`bool` active **)** @@ -337,7 +360,7 @@ Return true if selecting the text inside this richtext is allowed. - void **set_selection_enabled** **(** :ref:`bool` enabled **)** -Set to true if selecting the text inside this richtext is allowed. +If ``true`` text can be selected. .. _class_RichTextLabel_set_tab_size: diff --git a/classes/class_rigidbody.rst b/classes/class_rigidbody.rst index 231a67c42..2cac009c7 100644 --- a/classes/class_rigidbody.rst +++ b/classes/class_rigidbody.rst @@ -212,10 +212,10 @@ Continuous collision detection tries to predict where a moving body will collide Numeric Constants ----------------- -- **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody`, and can only move by user code. -- **MODE_KINEMATIC** = **3** --- Kinematic body. The body behaves like a :ref:`KinematicBody`, and can only move by user code. - **MODE_RIGID** = **0** --- Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. +- **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody`, and can only move by user code. - **MODE_CHARACTER** = **2** --- Character body. This behaves like a rigid body, but can not rotate. +- **MODE_KINEMATIC** = **3** --- Kinematic body. The body behaves like a :ref:`KinematicBody`, and can only move by user code. - **AXIS_LOCK_DISABLED** = **0** - **AXIS_LOCK_X** = **1** - **AXIS_LOCK_Y** = **2** diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index f4f445f46..8f3efd0b3 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -216,10 +216,10 @@ Continuous collision detection tries to predict where a moving body will collide Numeric Constants ----------------- -- **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody2D` and does not move. -- **MODE_KINEMATIC** = **3** --- Kinematic mode. The body behaves like a :ref:`KinematicBody2D`, and must be moved by code. - **MODE_RIGID** = **0** --- Rigid mode. The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode. +- **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody2D` and does not move. - **MODE_CHARACTER** = **2** --- Character mode. Similar to ``MODE_RIGID``, but the body can not rotate. +- **MODE_KINEMATIC** = **3** --- Kinematic mode. The body behaves like a :ref:`KinematicBody2D`, and must be moved by code. - **CCD_MODE_DISABLED** = **0** --- Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. - **CCD_MODE_CAST_RAY** = **1** --- Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. - **CCD_MODE_CAST_SHAPE** = **2** --- Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. diff --git a/classes/class_script.rst b/classes/class_script.rst index 72c4bd040..4f33dd93c 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -24,8 +24,6 @@ Member Functions +------------------------------+--------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_instance` **(** **)** const | +------------------------------+--------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_node_type` **(** **)** const | -+------------------------------+--------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_source_code` **(** **)** const | +------------------------------+--------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_script_signal` **(** :ref:`String` signal_name **)** const | @@ -57,10 +55,6 @@ Member Function Description Returns true if the script can be instanced. -.. _class_Script_get_node_type: - -- :ref:`String` **get_node_type** **(** **)** const - .. _class_Script_get_source_code: - :ref:`String` **get_source_code** **(** **)** const diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index 2a601584b..55b3b2a65 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -37,12 +37,12 @@ Member Function Description - :ref:`int` **post** **(** **)** -Lowers the :ref:`Semaphore`, allowing one more thread in. +Lowers the ``Semaphore``, allowing one more thread in. .. _class_Semaphore_wait: - :ref:`int` **wait** **(** **)** -Tries to wait for the :ref:`Semaphore`, if its value is zero, blocks until non-zero. +Tries to wait for the ``Semaphore``, if its value is zero, blocks until non-zero. diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index aacb81848..0e9d6d020 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -183,7 +183,7 @@ Returns the global transform, relative to worldspace. - :ref:`Spatial` **get_parent_spatial** **(** **)** const -Returns the parent :ref:`Spatial`, or an empty :ref:`Object` if no parent exists or parent is not of type :ref:`Spatial`. +Returns the parent ``Spatial``, or an empty :ref:`Object` if no parent exists or parent is not of type ``Spatial``. .. _class_Spatial_get_rotation: diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index 5bd306eb4..e69d49262 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -123,7 +123,7 @@ Get a signed byte from the stream. - :ref:`int` **get_available_bytes** **(** **)** const -Return the amount of bytes this :ref:`StreamPeer` has available. +Return the amount of bytes this ``StreamPeer`` has available. .. _class_StreamPeer_get_data: @@ -195,7 +195,7 @@ Get a Variant from the stream. - :ref:`bool` **is_big_endian_enabled** **(** **)** const -Return whether this :ref:`StreamPeer` is using big-endian format. +Return whether this ``StreamPeer`` is using big-endian format. .. _class_StreamPeer_put_16: @@ -285,6 +285,6 @@ Put a Variant into the stream. - void **set_big_endian** **(** :ref:`bool` enable **)** -Set this :ref:`StreamPeer` to use big-endian format. Default is false. +Set this ``StreamPeer`` to use big-endian format. Default is false. diff --git a/classes/class_streampeerssl.rst b/classes/class_streampeerssl.rst index 7e509d696..0aba99950 100644 --- a/classes/class_streampeerssl.rst +++ b/classes/class_streampeerssl.rst @@ -32,8 +32,8 @@ Member Functions Numeric Constants ----------------- -- **STATUS_DISCONNECTED** = **0** --- A status representing a :ref:`StreamPeerSSL` that is disconnected. -- **STATUS_CONNECTED** = **1** --- A status representing a :ref:`StreamPeerSSL` that is connected to a host. +- **STATUS_DISCONNECTED** = **0** --- A status representing a ``StreamPeerSSL`` that is disconnected. +- **STATUS_CONNECTED** = **1** --- A status representing a ``StreamPeerSSL`` that is connected to a host. - **STATUS_ERROR_NO_CERTIFICATE** = **2** --- An errot status that shows the peer did not present a SSL certificate and validation was requested. - **STATUS_ERROR_HOSTNAME_MISMATCH** = **3** --- An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. @@ -53,7 +53,7 @@ Member Function Description - :ref:`int` **connect_to_stream** **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="" **)** -Connect to a peer using an underlying :ref:`StreamPeer` "stream", when "validate_certs" is true, :ref:`StreamPeerSSL` will validate that the certificate presented by the peer matches the "for_hostname". +Connect to a peer using an underlying :ref:`StreamPeer` "stream", when "validate_certs" is true, ``StreamPeerSSL`` will validate that the certificate presented by the peer matches the "for_hostname". .. _class_StreamPeerSSL_disconnect_from_stream: diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index 6c49bc7bd..e99f4e848 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -36,10 +36,10 @@ Member Functions Numeric Constants ----------------- -- **STATUS_NONE** = **0** --- The initial status of the :ref:`StreamPeerTCP`, also the status after a disconnect. -- **STATUS_CONNECTING** = **1** --- A status representing a :ref:`StreamPeerTCP` that is connecting to a host. -- **STATUS_CONNECTED** = **2** --- A status representing a :ref:`StreamPeerTCP` that is connected to a host. -- **STATUS_ERROR** = **3** --- A staus representing a :ref:`StreamPeerTCP` in error state. +- **STATUS_NONE** = **0** --- The initial status of the ``StreamPeerTCP``, also the status after a disconnect. +- **STATUS_CONNECTING** = **1** --- A status representing a ``StreamPeerTCP`` that is connecting to a host. +- **STATUS_CONNECTED** = **2** --- A status representing a ``StreamPeerTCP`` that is connected to a host. +- **STATUS_ERROR** = **3** --- A staus representing a ``StreamPeerTCP`` in error state. Description ----------- diff --git a/classes/class_string.rst b/classes/class_string.rst index f5a3e7fde..283a0d9b3 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -205,335 +205,385 @@ Member Function Description - :ref:`String` **String** **(** :ref:`bool` from **)** +Constructs a new String from the given :ref:`bool`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`int` from **)** +Constructs a new String from the given :ref:`int`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`float` from **)** +Constructs a new String from the given :ref:`float`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Vector2` from **)** +Constructs a new String from the given :ref:`Vector2`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Rect2` from **)** +Constructs a new String from the given :ref:`Rect2`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Vector3` from **)** +Constructs a new String from the given :ref:`Vector3`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Transform2D` from **)** +Constructs a new String from the given :ref:`Transform2D`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Plane` from **)** +Constructs a new String from the given :ref:`Plane`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Quat` from **)** +Constructs a new String from the given :ref:`Quat`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Rect3` from **)** +Constructs a new String from the given :ref:`Rect3`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Basis` from **)** +Constructs a new String from the given :ref:`Basis`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Transform` from **)** +Constructs a new String from the given :ref:`Transform`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Color` from **)** +Constructs a new String from the given :ref:`Color`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`NodePath` from **)** +Constructs a new String from the given :ref:`NodePath`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`RID` from **)** +Constructs a new String from the given :ref:`RID`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Dictionary` from **)** +Constructs a new String from the given :ref:`Dictionary`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`Array` from **)** +Constructs a new String from the given :ref:`Array`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`PoolByteArray` from **)** +Constructs a new String from the given :ref:`PoolByteArray`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`PoolIntArray` from **)** +Constructs a new String from the given :ref:`PoolIntArray`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`PoolRealArray` from **)** +Constructs a new String from the given :ref:`PoolRealArray`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`PoolStringArray` from **)** +Constructs a new String from the given :ref:`PoolStringArray`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`PoolVector2Array` from **)** +Constructs a new String from the given :ref:`PoolVector2Array`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`PoolVector3Array` from **)** +Constructs a new String from the given :ref:`PoolVector3Array`. + .. _class_String_String: - :ref:`String` **String** **(** :ref:`PoolColorArray` from **)** +Constructs a new String from the given :ref:`PoolColorArray`. + .. _class_String_begins_with: - :ref:`bool` **begins_with** **(** :ref:`String` text **)** -Return true if the strings begins with the given string. +Returns ``true`` if the string begins with the given string. .. _class_String_bigrams: - :ref:`PoolStringArray` **bigrams** **(** **)** -Return the bigrams (pairs of consecutive letters) of this string. +Returns the bigrams (pairs of consecutive letters) of this string. .. _class_String_c_escape: - :ref:`String` **c_escape** **(** **)** -Return a copy of the string with special characters escaped using the C language standard. +Returns a copy of the string with special characters escaped using the C language standard. .. _class_String_c_unescape: - :ref:`String` **c_unescape** **(** **)** -Return a copy of the string with escaped characters replaced by their meanings according to the C language standard. +Returns a copy of the string with escaped characters replaced by their meanings according to the C language standard. .. _class_String_capitalize: - :ref:`String` **capitalize** **(** **)** -Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For ``capitalize camelCase mixed_with_underscores`` it will return ``Capitalize Camelcase Mixed With Underscores``. +Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For ``capitalize camelCase mixed_with_underscores`` it will return ``Capitalize Camelcase Mixed With Underscores``. .. _class_String_casecmp_to: - :ref:`int` **casecmp_to** **(** :ref:`String` to **)** -Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater. +Performs a case-sensitive comparison to another string. Returns ``-1`` if less than, ``+1`` if greater than, or ``0`` if equal. .. _class_String_empty: - :ref:`bool` **empty** **(** **)** -Return true if the string is empty. +Returns ``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. +Returns ``true`` if the string ends with the given string. .. _class_String_erase: - void **erase** **(** :ref:`int` position, :ref:`int` chars **)** -Erase ``chars`` characters from the string starting from ``position``. +Erases ``chars`` characters from the string starting from ``position``. .. _class_String_find: - :ref:`int` **find** **(** :ref:`String` what, :ref:`int` from=0 **)** -Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. +Finds the first occurrence of a substring. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. .. _class_String_find_last: - :ref:`int` **find_last** **(** :ref:`String` what **)** -Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. +Finds the last occurrence of a substring. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. .. _class_String_findn: - :ref:`int` **findn** **(** :ref:`String` what, :ref:`int` from=0 **)** -Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. +Finds the first occurrence of a substring, ignoring case. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. .. _class_String_format: - :ref:`String` **format** **(** var values, :ref:`String` placeholder={_} **)** +Formats the string by replacing all occurences of ``placeholder`` with ``values``. + .. _class_String_get_base_dir: - :ref:`String` **get_base_dir** **(** **)** -If the string is a path to a file, return the base directory. +If the string is a valid file path, returns the base directory name. .. _class_String_get_basename: - :ref:`String` **get_basename** **(** **)** -If the string is a path to a file, return the path to the file without the extension. +If the string is a valid file path, returns the full file path without the extension. .. _class_String_get_extension: - :ref:`String` **get_extension** **(** **)** -If the string is a path to a file, return the extension. +If the string is a valid file path, returns the extension. .. _class_String_get_file: - :ref:`String` **get_file** **(** **)** -If the string is a path to a file, return the file and ignore the base directory. +If the string is a valid file path, returns the filename. .. _class_String_hash: - :ref:`int` **hash** **(** **)** -Hash the string and return a 32 bits integer. +Hashes the string and returns a 32-bit integer. .. _class_String_hex_to_int: - :ref:`int` **hex_to_int** **(** **)** -Convert a string containing a hexadecimal number into an int. +Converts a string containing a hexadecimal number into an integer. .. _class_String_insert: - :ref:`String` **insert** **(** :ref:`int` position, :ref:`String` what **)** -Insert a substring at a given position. +Inserts a substring at a given position. .. _class_String_is_abs_path: - :ref:`bool` **is_abs_path** **(** **)** -If the string is a path to a file or directory, return true if the path is absolute. +If the string is a path to a file or directory, returns ``true`` if the path is absolute. .. _class_String_is_rel_path: - :ref:`bool` **is_rel_path** **(** **)** -If the string is a path to a file or directory, return true if the path is relative. +If the string is a path to a file or directory, returns ``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. +Returns ``true`` if 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. +Returns ``true`` if this string is a subsequence of the given string, without considering case. .. _class_String_is_valid_float: - :ref:`bool` **is_valid_float** **(** **)** -Check whether the string contains a valid float. +Returns ``true`` if this string contains a valid float. .. _class_String_is_valid_html_color: - :ref:`bool` **is_valid_html_color** **(** **)** -Check whether the string contains a valid color in HTML notation. +Returns ``true`` if this string contains a valid color in HTML notation. .. _class_String_is_valid_identifier: - :ref:`bool` **is_valid_identifier** **(** **)** -Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (\_) and the first character may not be a digit. +Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (\_) and the first character may not be a digit. .. _class_String_is_valid_integer: - :ref:`bool` **is_valid_integer** **(** **)** -Check whether the string contains a valid integer. +Returns ``true`` if this string contains a valid integer. .. _class_String_is_valid_ip_address: - :ref:`bool` **is_valid_ip_address** **(** **)** -Check whether the string contains a valid IP address. +Returns ``true`` if this string contains a valid IP address. .. _class_String_json_escape: - :ref:`String` **json_escape** **(** **)** -Return a copy of the string with special characters escaped using the JSON standard. +Returns a copy of the string with special characters escaped using the JSON standard. .. _class_String_left: - :ref:`String` **left** **(** :ref:`int` position **)** -Return an amount of characters from the left of the string. +Returns a number of characters from the left of the string. .. _class_String_length: - :ref:`int` **length** **(** **)** -Return the length of the string in characters. +Returns the string's amount of characters. .. _class_String_match: - :ref:`bool` **match** **(** :ref:`String` expr **)** -Do a simple expression match, where '\*' matches zero or more arbitrary characters and '?' matches any single character except '.'. +Does a simple expression match, where '\*' matches zero or more arbitrary characters and '?' matches any single character except '.'. .. _class_String_matchn: - :ref:`bool` **matchn** **(** :ref:`String` expr **)** -Do a simple case insensitive expression match, using ? and \* wildcards (see :ref:`match`). +Does a simple case insensitive expression match, using ? and \* wildcards (see :ref:`match`). .. _class_String_md5_buffer: - :ref:`PoolByteArray` **md5_buffer** **(** **)** -Return the MD5 hash of the string as an array of bytes. +Returns the MD5 hash of the string as an array of bytes. .. _class_String_md5_text: - :ref:`String` **md5_text** **(** **)** -Return the MD5 hash of the string as a string. +Returns the MD5 hash of the string as a string. .. _class_String_nocasecmp_to: - :ref:`int` **nocasecmp_to** **(** :ref:`String` to **)** -Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater. +Performs a case-insensitive comparison to another string. Returns ``-1`` if less than, ``+1`` if greater than, or ``0`` if equal. .. _class_String_ord_at: - :ref:`int` **ord_at** **(** :ref:`int` at **)** -Return the character code at position ``at``. +Returns the character code at position ``at``. .. _class_String_pad_decimals: - :ref:`String` **pad_decimals** **(** :ref:`int` digits **)** -Format a number to have an exact number of ``digits`` after the decimal point. +Formats a number to have an exact number of ``digits`` after the decimal point. .. _class_String_pad_zeros: - :ref:`String` **pad_zeros** **(** :ref:`int` digits **)** -Format a number to have an exact number of ``digits`` before the decimal point. +Formats a number to have an exact number of ``digits`` before the decimal point. .. _class_String_percent_decode: @@ -545,7 +595,7 @@ Decode a percent-encoded string. See :ref:`percent_encode` **percent_encode** **(** **)** -Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request. +Percent-encodes a string. Encodes parameters in a URL when sending a HTTP GET request (and bodies of form-urlencoded POST requests). .. _class_String_plus_file: @@ -557,31 +607,31 @@ If the string is a path, this concatenates ``file`` at the end of the string as - :ref:`String` **replace** **(** :ref:`String` what, :ref:`String` forwhat **)** -Replace occurrences of a substring for different ones inside the string. +Replaces occurrences of a substring with the given one inside the string. .. _class_String_replacen: - :ref:`String` **replacen** **(** :ref:`String` what, :ref:`String` forwhat **)** -Replace occurrences of a substring for different ones inside the string, but search case-insensitive. +Replaces occurrences of a substring with the given one inside the string. Ignores case. .. _class_String_rfind: - :ref:`int` **rfind** **(** :ref:`String` what, :ref:`int` from=-1 **)** -Perform a search for a substring, but start from the end of the string instead of the beginning. +Performs a search for a substring, but starts from the end of the string instead of the beginning. .. _class_String_rfindn: - :ref:`int` **rfindn** **(** :ref:`String` what, :ref:`int` from=-1 **)** -Perform a search for a substring, but start from the end of the string instead of the beginning. Also search case-insensitive. +Performs a search for a substring, but starts from the end of the string instead of the beginning. Ignores case. .. _class_String_right: - :ref:`String` **right** **(** :ref:`int` position **)** -Return the right side of the string from a given position. +Returns the right side of the string from a given position. .. _class_String_sha256_buffer: @@ -591,84 +641,84 @@ Return the right side of the string from a given position. - :ref:`String` **sha256_text** **(** **)** -Return the SHA-256 hash of the string as a string. +Returns 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. +Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. .. _class_String_split: - :ref:`PoolStringArray` **split** **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** -Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return "One","Two","Three" if split by ",". +Splits the string by a divisor string and returns an array of the substrings. Example "One,Two,Three" will return "One","Two","Three" if split by ",". .. _class_String_split_floats: - :ref:`PoolRealArray` **split_floats** **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** -Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return 1,2.5,3 if split by ",". +Splits the string in floats by using a divisor string and returns an array of the substrings. Example "1,2.5,3" will return 1,2.5,3 if split by ",". .. _class_String_strip_edges: - :ref:`String` **strip_edges** **(** :ref:`bool` left=True, :ref:`bool` right=True **)** -Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. +Returns a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. .. _class_String_substr: - :ref:`String` **substr** **(** :ref:`int` from, :ref:`int` len **)** -Return part of the string from the position ``from``, with length ``len``. +Returns part of the string from the position ``from`` with length ``len``. .. _class_String_to_ascii: - :ref:`PoolByteArray` **to_ascii** **(** **)** -Convert the String (which is a character array) to PoolByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. +Converts the String (which is a character array) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is sped up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. .. _class_String_to_float: - :ref:`float` **to_float** **(** **)** -Convert a string, containing a decimal number, into a ``float``. +Converts a string containing a decimal number into a ``float``. .. _class_String_to_int: - :ref:`int` **to_int** **(** **)** -Convert a string, containing an integer number, into an ``int``. +Converts a string containing an integer number into an ``int``. .. _class_String_to_lower: - :ref:`String` **to_lower** **(** **)** -Return the string converted to lowercase. +Returns the string converted to lowercase. .. _class_String_to_upper: - :ref:`String` **to_upper** **(** **)** -Return the string converted to uppercase. +Returns the string converted to uppercase. .. _class_String_to_utf8: - :ref:`PoolByteArray` **to_utf8** **(** **)** -Convert the String (which is an array of characters) to PoolByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). +Converts the String (which is an array of characters) to :ref:`PoolByteArray` (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). .. _class_String_xml_escape: - :ref:`String` **xml_escape** **(** **)** -Return a copy of the string with special characters escaped using the XML standard. +Returns a copy of the string with special characters escaped using the XML standard. .. _class_String_xml_unescape: - :ref:`String` **xml_unescape** **(** **)** -Return a copy of the string with escaped characters replaced by their meanings according to the XML standard. +Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard. diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 718402007..ac89d5654 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -68,7 +68,7 @@ Member Functions Description ----------- -The :ref:`SurfaceTool` is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from script. All properties except index need to be added before a call to :ref:`add_vertex`. For example adding vertex colors and UVs looks like +The ``SurfaceTool`` is used to construct a :ref:`Mesh` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh` from script. All properties except index need to be added before a call to :ref:`add_vertex`. For example adding vertex colors and UVs looks like :: @@ -78,7 +78,7 @@ The :ref:`SurfaceTool` is used to construct a :ref:`Mesh` now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calls to :ref:`add_uv` or :ref:`add_color` then the last values would be used. +The ``SurfaceTool`` now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color`. If another vertex were added without calls to :ref:`add_uv` or :ref:`add_color` then the last values would be used. It is very important that vertex attributes are passed **before** the call to :ref:`add_vertex`, failure to do this will result in an error when committing the vertex information to a mesh. diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 5e6036ed5..c482cb519 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -64,17 +64,19 @@ Signals - **pre_popup_pressed** **(** **)** +Emitted when the ``TabContainer``'s :ref:`Popup` button is clicked. See :ref:`set_popup` for details. + .. _class_TabContainer_tab_changed: - **tab_changed** **(** :ref:`int` tab **)** -Emitted only when the current tab changes. +Emitted when switching to another tab. .. _class_TabContainer_tab_selected: - **tab_selected** **(** :ref:`int` tab **)** -Emitted when a tab is being selected, even if it is the same tab. +Emitted when a tab is selected, even if it is the current tab. Member Variables @@ -82,15 +84,15 @@ Member Variables .. _class_TabContainer_current_tab: -- :ref:`int` **current_tab** - The current tab. +- :ref:`int` **current_tab** - The current tab index. When set, this index's :ref:`Control` node's ``visible`` property is set to ``true`` and all others are set to ``false``. .. _class_TabContainer_tab_align: -- :ref:`int` **tab_align** - The alignment of all the tabs of the tab container. See the ``ALIGN\_\*`` constants. +- :ref:`int` **tab_align** - The alignment of all tabs in the tab container. See the ``ALIGN\_\*`` constants for details. .. _class_TabContainer_tabs_visible: -- :ref:`bool` **tabs_visible** - If ``true`` all tabs that are children of the TabContainer will be visible. +- :ref:`bool` **tabs_visible** - If ``true`` tabs are visible. If ``false`` tabs' content and titles are hidden. Default value: ``true``. Numeric Constants @@ -103,9 +105,13 @@ Numeric Constants Description ----------- -Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one. +Sets the active tab's ``visible`` property to the value ``true``. Sets all other children's to ``false``. -Children controls of this one automatically. +Ignores non-:ref:`Control` children. + +Individual tabs are always visible unless you use :ref:`set_tab_disabled` and :ref:`set_tab_title` to hide it. + +To hide only a tab's content, nest the content inside a child :ref:`Control`, so it receives the ``TabContainer``'s visibility setting instead. Member Function Description --------------------------- @@ -120,39 +126,43 @@ Returns ``true`` if the tabs are visible. - :ref:`int` **get_current_tab** **(** **)** const -Returns the current tab index that is being shown. +Returns the currently visible tab's index. .. _class_TabContainer_get_current_tab_control: - :ref:`Control` **get_current_tab_control** **(** **)** const +Returns the child :ref:`Control` node located at the active tab index. + .. _class_TabContainer_get_popup: - :ref:`Popup` **get_popup** **(** **)** const +Returns the :ref:`Popup` node instance if one has been set already with :ref:`set_popup`. + .. _class_TabContainer_get_previous_tab: - :ref:`int` **get_previous_tab** **(** **)** const -Returns the previous tab index that was being shown. +Returns the previously active tab index. .. _class_TabContainer_get_tab_align: - :ref:`int` **get_tab_align** **(** **)** const -Returns the tab alignment.See the ALIGN\_\* constants. +Returns the tab alignment. See the ``ALIGN\_\*`` constants. .. _class_TabContainer_get_tab_control: - :ref:`Control` **get_tab_control** **(** :ref:`int` idx **)** const -Returns the current tab control that is being shown. +Returns the currently visible tab's :ref:`Control` node. .. _class_TabContainer_get_tab_count: - :ref:`int` **get_tab_count** **(** **)** const -Returns the amount of tabs. +Returns the number of tabs. .. _class_TabContainer_get_tab_disabled: @@ -170,46 +180,48 @@ Returns the :ref:`Texture` for the tab at index ``tab_idx`` or nu - :ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** const -Returns the title for the tab at index ``tab_idx``. Tab titles are by default the children node name, but this can be overridden. +Returns the title of the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node, but this can be overridden with :ref:`set_tab_title`. .. _class_TabContainer_set_current_tab: - void **set_current_tab** **(** :ref:`int` tab_idx **)** -Bring a tab (and the Control it represents) to the front, and hide the rest. +Sets to ``false`` the ``visible`` property for all :ref:`Control` children except for the tab at ``tab_idx``. .. _class_TabContainer_set_popup: - void **set_popup** **(** :ref:`Node` popup **)** +If set on a :ref:`Popup` node instance, a popup menu icon appears in the top-right corner of the ``TabContainer``. Clicking it will expand the :ref:`Popup` node. + .. _class_TabContainer_set_tab_align: - void **set_tab_align** **(** :ref:`int` align **)** -Set tab alignment, from the ALIGN\_\* enum. Moves tabs to the left, right or center. +Sets tab alignment, from the ``ALIGN\_\*`` constants. Moves tabs to the left, right, or center. .. _class_TabContainer_set_tab_disabled: - void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** -Set tab at index ``tab_idx`` disabled. +If ``disabled`` is false, hides the tab at index ``tab_idx``. Note that its title text will remain, unless also removed with :ref:`set_tab_title`. .. _class_TabContainer_set_tab_icon: - void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** -Set an icon for a tab at index ``tab_idx``. +Sets an icon for the tab at index ``tab_idx``. .. _class_TabContainer_set_tab_title: - void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** -Set a title for the tab at index ``tab_idx``. Tab titles are by default the children node name, but this can be overridden. +Sets a title for the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node, but this can be overridden with :ref:`set_tab_title`. .. _class_TabContainer_set_tabs_visible: - void **set_tabs_visible** **(** :ref:`bool` visible **)** -If ``true`` all the tabs will be visible. +If ``true`` tabs are visible. If ``false`` tabs' content and titles are hidden. Default value: ``true``. diff --git a/classes/class_tabs.rst b/classes/class_tabs.rst index ecbbb32ca..91cc554e7 100644 --- a/classes/class_tabs.rst +++ b/classes/class_tabs.rst @@ -104,9 +104,9 @@ Numeric Constants - **ALIGN_CENTER** = **1** - **ALIGN_RIGHT** = **2** - **ALIGN_MAX** = **3** +- **CLOSE_BUTTON_SHOW_NEVER** = **0** - **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = **1** - **CLOSE_BUTTON_SHOW_ALWAYS** = **2** -- **CLOSE_BUTTON_SHOW_NEVER** = **0** - **CLOSE_BUTTON_MAX** = **3** Description diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index b25b512a3..d8f67a4da 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -78,6 +78,8 @@ Member Functions +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_highlight_all_occurrences_enabled` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_highlight_current_line_enabled` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_overriding_selected_font_color` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_selection_active` **(** **)** const | @@ -102,6 +104,8 @@ Member Functions +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_highlight_all_occurrences` **(** :ref:`bool` enable **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_highlight_current_line` **(** :ref:`bool` enabled **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_max_chars` **(** :ref:`int` amount **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_override_selected_font_color` **(** :ref:`bool` override **)** | @@ -172,6 +176,10 @@ Member Variables - :ref:`bool` **highlight_all_occurrences** + .. _class_TextEdit_highlight_current_line: + +- :ref:`bool` **highlight_current_line** + .. _class_TextEdit_override_selected_font_color: - :ref:`bool` **override_selected_font_color** @@ -379,6 +387,10 @@ Insert a given text at the cursor position. Returns true if highlight all occurrences is enabled. +.. _class_TextEdit_is_highlight_current_line_enabled: + +- :ref:`bool` **is_highlight_current_line_enabled** **(** **)** const + .. _class_TextEdit_is_overriding_selected_font_color: - :ref:`bool` **is_overriding_selected_font_color** **(** **)** const @@ -445,6 +457,10 @@ Select all the text. Set to enable highlighting all occurrences of the current selection. +.. _class_TextEdit_set_highlight_current_line: + +- void **set_highlight_current_line** **(** :ref:`bool` enabled **)** + .. _class_TextEdit_set_max_chars: - void **set_max_chars** **(** :ref:`int` amount **)** diff --git a/classes/class_texture.rst b/classes/class_texture.rst index 1c0252601..0c84a10ba 100644 --- a/classes/class_texture.rst +++ b/classes/class_texture.rst @@ -49,11 +49,11 @@ Numeric Constants - **FLAG_MIPMAPS** = **1** --- Generate mipmaps, to enable smooth zooming out of the texture. - **FLAG_REPEAT** = **2** --- Repeat (instead of clamp to edge). - **FLAG_FILTER** = **4** --- Turn on magnifying filter, to enable smooth zooming in of the texture. -- **FLAG_VIDEO_SURFACE** = **4096** --- Texture is a video surface. - **FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. - **FLAG_ANISOTROPIC_FILTER** = **8** - **FLAG_CONVERT_TO_LINEAR** = **16** - **FLAG_MIRRORED_REPEAT** = **32** +- **FLAG_VIDEO_SURFACE** = **4096** --- Texture is a video surface. Description ----------- diff --git a/classes/class_thread.rst b/classes/class_thread.rst index 0f8593c30..9172de656 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -48,19 +48,19 @@ Member Function Description - :ref:`String` **get_id** **(** **)** const -Returns the current :ref:`Thread`\ s id, uniquely identifying it among all threads. +Returns the current ``Thread``s id, uniquely identifying it among all threads. .. _class_Thread_is_active: - :ref:`bool` **is_active** **(** **)** const -Returns true if this :ref:`Thread` is currently active. An active :ref:`Thread` cannot start work on a new method but can be joined with :ref:`wait_to_finish`. +Returns true if this ``Thread`` is currently active. An active ``Thread`` cannot start work on a new method but can be joined with :ref:`wait_to_finish`. .. _class_Thread_start: - :ref:`int` **start** **(** :ref:`Object` instance, :ref:`String` method, :ref:`Variant` userdata=null, :ref:`int` priority=1 **)** -Starts a new :ref:`Thread` that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the :ref:`Thread` can be changed by passing a PRIORITY\_\* enum. +Starts a new ``Thread`` that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the ``Thread`` can be changed by passing a PRIORITY\_\* enum. Returns OK on success, or ERR_CANT_CREATE on failure. @@ -68,6 +68,6 @@ Returns OK on success, or ERR_CANT_CREATE on failure. - :ref:`Variant` **wait_to_finish** **(** **)** -Joins the :ref:`Thread` and waits for it to finish. Returns what the method called returned. +Joins the ``Thread`` and waits for it to finish. Returns what the method called returned. diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index bc969102d..cf8cb8d50 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -81,19 +81,19 @@ Member Function Description - :ref:`Transform2D` **Transform2D** **(** :ref:`Transform` from **)** -Constructs the :ref:`Transform2D` from a 3D :ref:`Transform`. +Constructs the ``Transform2D`` from a 3D :ref:`Transform`. .. _class_Transform2D_Transform2D: - :ref:`Transform2D` **Transform2D** **(** :ref:`Vector2` x_axis, :ref:`Vector2` y_axis, :ref:`Vector2` origin **)** -Constructs the :ref:`Transform2D` from 3 :ref:`Vector2` consisting of rows x, y and origin. +Constructs the ``Transform2D`` from 3 :ref:`Vector2` consisting of rows x, y and origin. .. _class_Transform2D_Transform2D: - :ref:`Transform2D` **Transform2D** **(** :ref:`float` rotation, :ref:`Vector2` position **)** -Constructs the :ref:`Transform2D` from rotation angle in radians and position :ref:`Vector2`. +Constructs the ``Transform2D`` from rotation angle in radians and position :ref:`Vector2`. .. _class_Transform2D_affine_inverse: diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index 42841c268..57eb31e74 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -26,6 +26,8 @@ Member Functions +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_locale` **(** **)** const | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_locale_name` **(** :ref:`String` locale **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_translation` **(** :ref:`Translation` translation **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_locale` **(** :ref:`String` locale **)** | @@ -48,6 +50,10 @@ Member Function Description - :ref:`String` **get_locale** **(** **)** const +.. _class_TranslationServer_get_locale_name: + +- :ref:`String` **get_locale_name** **(** :ref:`String` locale **)** const + .. _class_TranslationServer_remove_translation: - void **remove_translation** **(** :ref:`Translation` translation **)** diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index f3cec7095..017494ac5 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -157,7 +157,7 @@ Numeric Constants Description ----------- -Control for a single item inside a :ref:`Tree`. May have child :ref:`TreeItem`\ s and be styled as well as contain buttons. +Control for a single item inside a :ref:`Tree`. May have child ``TreeItem``s and be styled as well as contain buttons. Member Function Description --------------------------- diff --git a/classes/class_tween.rst b/classes/class_tween.rst index a210ebfa3..230fad3ba 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -110,8 +110,8 @@ Member Variables Numeric Constants ----------------- -- **TWEEN_PROCESS_PHYSICS** = **0** --- The :ref:`Tween` should use ``_physics_process`` for timekeeping when this is enabled. -- **TWEEN_PROCESS_IDLE** = **1** --- The :ref:`Tween` should use ``_process`` for timekeeping when this is enabled (default). +- **TWEEN_PROCESS_PHYSICS** = **0** --- The ``Tween`` should use ``_physics_process`` for timekeeping when this is enabled. +- **TWEEN_PROCESS_IDLE** = **1** --- The ``Tween`` should use ``_process`` for timekeeping when this is enabled (default). - **TRANS_LINEAR** = **0** --- Means that the animation is interpolated linearly. - **TRANS_SINE** = **1** --- Means that the animation is interpolated using a sine wave. - **TRANS_QUINT** = **2** --- Means that the animation is interpolated with a quinary (to the power of 5) function. diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index ac18969bd..565836757 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -116,6 +116,8 @@ Returns a new vector with all components in absolute values (i.e. positive). - :ref:`float` **angle_to** **(** :ref:`Vector3` to **)** +Returns the vector's minimum angle to the vector ``to``. + .. _class_Vector3_bounce: - :ref:`Vector3` **bounce** **(** :ref:`Vector3` n **)** @@ -132,31 +134,31 @@ Returns a new vector with all components rounded up. - :ref:`Vector3` **cross** **(** :ref:`Vector3` b **)** -Return the cross product with b. +Returns the cross product with ``b``. .. _class_Vector3_cubic_interpolate: - :ref:`Vector3` **cubic_interpolate** **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` t **)** -Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t). +Performs a cubic interpolation between vectors ``pre_a``, ``a``, ``b``, ``post_b`` (``a`` is current), by the given amount (t). .. _class_Vector3_distance_squared_to: - :ref:`float` **distance_squared_to** **(** :ref:`Vector3` b **)** -Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula. +Returns the squared distance to ``b``. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula. .. _class_Vector3_distance_to: - :ref:`float` **distance_to** **(** :ref:`Vector3` b **)** -Return the distance to b. +Returns the distance to b. .. _class_Vector3_dot: - :ref:`float` **dot** **(** :ref:`Vector3` b **)** -Return the dot product with b. +Returns the dot product with b. .. _class_Vector3_floor: @@ -180,13 +182,13 @@ Returns whether the vector is normalized or not. - :ref:`float` **length** **(** **)** -Return the length of the vector. +Returns the length of the vector. .. _class_Vector3_length_squared: - :ref:`float` **length_squared** **(** **)** -Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. +Returns the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. .. _class_Vector3_linear_interpolate: @@ -210,13 +212,13 @@ Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest. - :ref:`Vector3` **normalized** **(** **)** -Return a copy of the normalized vector to unit length. This is the same as v / v.length(). +Returns a copy of the normalized vector to unit length. This is the same as v / v.length(). .. _class_Vector3_outer: - :ref:`Basis` **outer** **(** :ref:`Vector3` b **)** -Return the outer product with b. +Returns the outer product with b. .. _class_Vector3_reflect: @@ -240,12 +242,12 @@ Slide returns the component of the vector along the given plane, specified by it - :ref:`Vector3` **snapped** **(** :ref:`float` by **)** -Return a copy of the vector, snapped to the lowest neared multiple. +Returns a copy of the vector, snapped to the lowest neared multiple. .. _class_Vector3_to_diagonal_matrix: - :ref:`Basis` **to_diagonal_matrix** **(** **)** -Return a diagonal matrix with the vector as main diagonal. +Returns a diagonal matrix with the vector as main diagonal. diff --git a/classes/class_visibilityenabler.rst b/classes/class_visibilityenabler.rst index e3ef212a9..7ecc0629d 100644 --- a/classes/class_visibilityenabler.rst +++ b/classes/class_visibilityenabler.rst @@ -40,8 +40,8 @@ Member Variables Numeric Constants ----------------- -- **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody` nodes. - **ENABLER_PAUSE_ANIMATIONS** = **0** --- This enabler will pause :ref:`AnimationPlayer` nodes. +- **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody` nodes. - **ENABLER_MAX** = **2** Description diff --git a/classes/class_visibilityenabler2d.rst b/classes/class_visibilityenabler2d.rst index e37ebce3a..62a41e7c8 100644 --- a/classes/class_visibilityenabler2d.rst +++ b/classes/class_visibilityenabler2d.rst @@ -56,12 +56,12 @@ Member Variables 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_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody2D` 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_PHYSICS_PROCESS** = **4** --- This enabler will stop the parent's _physics_process function. +- **ENABLER_PAUSE_ANIMATED_SPRITES** = **5** - **ENABLER_MAX** = **6** Description diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index c08ea5bce..0ca14c830 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -420,7 +420,6 @@ Numeric Constants - **ARRAY_FORMAT_BONES** = **64** - **ARRAY_FORMAT_WEIGHTS** = **128** - **ARRAY_FORMAT_INDEX** = **256** -- **ARRAY_COMPRESS_BASE** = **9** - **ARRAY_COMPRESS_VERTEX** = **512** - **ARRAY_COMPRESS_NORMAL** = **1024** - **ARRAY_COMPRESS_TANGENT** = **2048** diff --git a/classes/class_worldenvironment.rst b/classes/class_worldenvironment.rst index 727a81ca5..ba399ffc5 100644 --- a/classes/class_worldenvironment.rst +++ b/classes/class_worldenvironment.rst @@ -36,7 +36,7 @@ Member Variables Description ----------- -The :ref:`WorldEnvironment` node can be added to a scene in order to set default :ref:`Environment` variables for the scene. The :ref:`WorldEnvironment` can be overridden by an :ref:`Environment` node set on the current :ref:`Camera`. Additionally, only one :ref:`WorldEnvironment` may be instanced in a given scene at a time. The :ref:`WorldEnvironment` allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). +The ``WorldEnvironment`` node can be added to a scene in order to set default :ref:`Environment` variables for the scene. The ``WorldEnvironment`` can be overridden by an :ref:`Environment` node set on the current :ref:`Camera`. Additionally, only one ``WorldEnvironment`` may be instanced in a given scene at a time. The ``WorldEnvironment`` allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Member Function Description ---------------------------