diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/@GDScript.xml | 10 | ||||
-rw-r--r-- | doc/classes/InputEventKey.xml | 2 | ||||
-rw-r--r-- | doc/classes/MultiMeshInstance2D.xml | 27 | ||||
-rw-r--r-- | doc/classes/Navigation.xml | 2 | ||||
-rw-r--r-- | doc/classes/OS.xml | 9 | ||||
-rw-r--r-- | doc/classes/Particles.xml | 3 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 2 | ||||
-rwxr-xr-x | doc/tools/makerst.py | 47 |
8 files changed, 70 insertions, 32 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 553fd4d629..b6de5dbf62 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -92,13 +92,13 @@ <argument index="0" name="condition" type="bool"> </argument> <description> - Assert that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code] a fatal error is generated and the program is halted. Useful for debugging to make sure a value is always [code]true[/code]. + Asserts that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code], an error is generated and the program is halted until you resume it. Only executes in debug builds, or when running the game from the editor. Use it for debugging purposes, to make sure a statement is [code]true[/code] during development. [codeblock] - # Speed should always be between 0 and 20 + # Imagine we always want speed to be between 0 and 20 speed = -10 - assert(speed < 20) # Is true and program continues - assert(speed >= 0) # Is false and program stops - assert(speed >= 0 && speed < 20) # Or combined + assert(speed < 20) # True, the program will continue + assert(speed >= 0) # False, the program will stop + assert(speed >= 0 && speed < 20) # You can also combine the two conditional statements in one check [/codeblock] </description> </method> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 86a1362230..53b1f74bd4 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -29,7 +29,7 @@ Key scancode, one of the [enum KeyList] constants. </member> <member name="unicode" type="int" setter="set_unicode" getter="get_unicode"> - Key unicode identifier when relevant. + Key unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information. </member> </members> <constants> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml new file mode 100644 index 0000000000..0bf243ee24 --- /dev/null +++ b/doc/classes/MultiMeshInstance2D.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MultiMeshInstance2D" inherits="Node2D" category="Core" version="3.2"> + <brief_description> + Node that instances a [MultiMesh] in 2D. + </brief_description> + <description> + [MultiMeshInstance2D] is a specialized node to instance a [MultiMesh] resource in 2D. + Usage is the same as [MultiMeshInstance]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> + The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]. + </member> + <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + The normal map that will be used if using the default [CanvasItemMaterial]. + </member> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index 3690c1d682..f0ae3fef99 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -59,7 +59,7 @@ <argument index="2" name="optimize" type="bool" default="true"> </argument> <description> - Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (raidus, height, etc.) are considered in the path calculation, otherwise they are ignored. + Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. </description> </method> <method name="navmesh_add"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index dd0fcd63e7..f7cd6c3e83 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -221,14 +221,16 @@ <return type="Vector2"> </return> <description> - Returns IME selection range. + Returns IME cursor position (currently edited portion of the string) relative to the characters in the composition string. + [code]NOTIFICATION_OS_IME_UPDATE[/code] is sent to the application to notify it of changes to the IME cursor position. </description> </method> <method name="get_ime_text" qualifiers="const"> <return type="String"> </return> <description> - Returns IME intermediate text. + Returns IME intermediate composition string. + [code]NOTIFICATION_OS_IME_UPDATE[/code] is sent to the application to notify it of changes to the IME composition string. </description> </method> <method name="get_latin_keyboard_variant" qualifiers="const"> @@ -710,6 +712,9 @@ </argument> <description> Sets whether IME input mode should be enabled. + If active IME handles key events before the application and creates an composition string and suggestion list. + Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions. + Completed composition string is committed when input is finished. </description> </method> <method name="set_ime_position"> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 0023fce97d..7820c63ad7 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -15,13 +15,14 @@ <return type="AABB"> </return> <description> + Returns the bounding box that contains all the particles that are active in the current frame. </description> </method> <method name="restart"> <return type="void"> </return> <description> - Restarts the particle emmission, clearing existing particles. + Restarts the particle emission, clearing existing particles. </description> </method> </methods> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 5bcd39a8d6..460db5e792 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -723,7 +723,7 @@ Shaders have a time variable that constantly increases. At some point, it needs to be rolled back to zero to avoid precision errors on shader animations. This setting specifies when (in seconds). </member> <member name="rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" type="bool" setter="" getter=""> - Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913][/url] for details. + Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913]GitHub issue 9913[/url] for details. If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option only impacts the GLES2 rendering backend (so the bug stays if you use GLES3), and only desktop platforms. </member> <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter=""> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index c3e15b2f9a..454c71d3c7 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -478,24 +478,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write(make_heading('Tutorials', '-')) for t in class_def.tutorials: link = t.strip() - match = GODOT_DOCS_PATTERN.search(link) - if match: - groups = match.groups() - if match.lastindex == 2: - # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: - # `#calling-javascript-from-script in Exporting For Web` - f.write("- `" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n") - # Commented out alternative: Instead just emit: - # `Subsection in Exporting For Web` - # f.write("- `Subsection <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n") - elif match.lastindex == 1: - # Doc reference, for example: - # `Math` - f.write("- :doc:`../" + groups[0] + "`\n\n") - else: - # External link, for example: - # `http://enet.bespin.org/usergroup0.html` - f.write("- `" + link + " <" + link + ">`_\n\n") + f.write("- " + make_url(link) + "\n\n") # Property descriptions if len(class_def.properties) > 0: @@ -802,15 +785,16 @@ def rstize_text(text, state): # type: (str, State) -> str tag_text = "" # '![](' + cmd[6:] + ')' elif cmd.find('url=') == 0: url_link = cmd[4:] - tag_text = ':ref:`' + tag_text = '`' tag_depth += 1 - url_has_name = False inside_url = True + url_has_name = False elif cmd == '/url': - tag_text = ('' if url_has_name else url_link) + '<' + url_link + ">`" + tag_text = ('' if url_has_name else url_link) + " <" + url_link + ">`_" tag_depth -= 1 escape_post = True inside_url = False + url_has_name = False elif cmd == 'center': tag_depth += 1 tag_text = '' @@ -996,5 +980,26 @@ def make_heading(title, underline): # type: (str, str) -> str return title + '\n' + (underline * len(title)) + "\n\n" +def make_url(link): # type: (str) -> str + match = GODOT_DOCS_PATTERN.search(link) + if match: + groups = match.groups() + if match.lastindex == 2: + # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: + # `#calling-javascript-from-script in Exporting For Web` + return "`" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`" + # Commented out alternative: Instead just emit: + # `Subsection in Exporting For Web` + # return "`Subsection <../" + groups[0] + ".html" + groups[1] + ">`__ in :doc:`../" + groups[0] + "`" + elif match.lastindex == 1: + # Doc reference, for example: + # `Math` + return ":doc:`../" + groups[0] + "`" + else: + # External link, for example: + # `http://enet.bespin.org/usergroup0.html` + return "`" + link + " <" + link + ">`_" + + if __name__ == '__main__': main() |