Skip to content

Commit e935fb1

Browse files
committed
Fix miscellaneous oddities around the class reference (part 4)
1 parent 27b2ba6 commit e935fb1

17 files changed

+44
-38
lines changed

doc/classes/Dictionary.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,15 @@
477477
<method name="sort">
478478
<return type="void" />
479479
<description>
480-
Sorts the dictionary in-place by key. This can be used to ensure dictionaries with the same contents produce equivalent results when getting the [method keys], getting the [method values], and converting to a string. This is also useful when wanting a JSON representation consistent with what is in memory, and useful for storing on a database that requires dictionaries to be sorted.
480+
Sorts the dictionary in ascending order, by key. The final order is dependent on the "less than" ([code]&lt;[/code]) comparison between keys.
481+
[codeblocks]
482+
[gdscript]
483+
var numbers = { "c": 2, "a": 0, "b": 1 }
484+
numbers.sort()
485+
print(numbers) # Prints { "a": 0, "b": 1, "c": 2 }
486+
[/gdscript]
487+
[/codeblocks]
488+
This method ensures that the dictionary's entries are ordered consistently when [method keys] or [method values] are called, or when the dictionary needs to be converted to a string through [method @GlobalScope.str] or [method JSON.stringify].
481489
</description>
482490
</method>
483491
<method name="values" qualifiers="const">

doc/classes/EditorInterface.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
<return type="float" />
102102
<description>
103103
Returns the actual scale of the editor UI ([code]1.0[/code] being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins.
104-
[b]Note:[/b] This value is set via the [code]interface/editor/display_scale[/code] and [code]interface/editor/custom_display_scale[/code] editor settings. Editor must be restarted for changes to be properly applied.
104+
[b]Note:[/b] This value is set via the [member EditorSettings.interface/editor/display_scale] and [member EditorSettings.interface/editor/custom_display_scale] settings. The editor must be restarted for changes to be properly applied.
105105
</description>
106106
</method>
107107
<method name="get_editor_settings" qualifiers="const">

doc/classes/EditorPlugin.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,32 +55,32 @@
5555
<return type="void" />
5656
<param index="0" name="viewport_control" type="Control" />
5757
<description>
58-
Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
58+
Called by the engine when the 3D editor's viewport is updated. [param viewport_control] is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling [method update_overlays].
5959
[codeblocks]
6060
[gdscript]
6161
func _forward_3d_draw_over_viewport(overlay):
62-
# Draw a circle at cursor position.
62+
# Draw a circle at the cursor's position.
6363
overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
6464

6565
func _forward_3d_gui_input(camera, event):
6666
if event is InputEventMouseMotion:
67-
# Redraw viewport when cursor is moved.
67+
# Redraw the viewport when the cursor is moved.
6868
update_overlays()
6969
return EditorPlugin.AFTER_GUI_INPUT_STOP
7070
return EditorPlugin.AFTER_GUI_INPUT_PASS
7171
[/gdscript]
7272
[csharp]
7373
public override void _Forward3DDrawOverViewport(Control viewportControl)
7474
{
75-
// Draw a circle at cursor position.
75+
// Draw a circle at the cursor's position.
7676
viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
7777
}
7878

7979
public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D viewportCamera, InputEvent @event)
8080
{
8181
if (@event is InputEventMouseMotion)
8282
{
83-
// Redraw viewport when cursor is moved.
83+
// Redraw the viewport when the cursor is moved.
8484
UpdateOverlays();
8585
return EditorPlugin.AfterGuiInput.Stop;
8686
}
@@ -139,32 +139,32 @@
139139
<return type="void" />
140140
<param index="0" name="viewport_control" type="Control" />
141141
<description>
142-
Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
142+
Called by the engine when the 2D editor's viewport is updated. [param viewport_control] is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling [method update_overlays].
143143
[codeblocks]
144144
[gdscript]
145145
func _forward_canvas_draw_over_viewport(overlay):
146-
# Draw a circle at cursor position.
146+
# Draw a circle at the cursor's position.
147147
overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
148148

149149
func _forward_canvas_gui_input(event):
150150
if event is InputEventMouseMotion:
151-
# Redraw viewport when cursor is moved.
151+
# Redraw the viewport when the cursor is moved.
152152
update_overlays()
153153
return true
154154
return false
155155
[/gdscript]
156156
[csharp]
157157
public override void _ForwardCanvasDrawOverViewport(Control viewportControl)
158158
{
159-
// Draw a circle at cursor position.
159+
// Draw a circle at the cursor's position.
160160
viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
161161
}
162162

163163
public override bool _ForwardCanvasGuiInput(InputEvent @event)
164164
{
165165
if (@event is InputEventMouseMotion)
166166
{
167-
// Redraw viewport when cursor is moved.
167+
// Redraw the viewport when the cursor is moved.
168168
UpdateOverlays();
169169
return true;
170170
}

doc/classes/EditorSettings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@
847847
Translations are provided by the community. If you spot a mistake, [url=$DOCS_URL/contributing/documentation/editor_and_docs_localization.html]contribute to editor translations on Weblate![/url]
848848
</member>
849849
<member name="interface/editor/editor_screen" type="int" setter="" getter="">
850-
The preferred monitor to display the editor. If [b]Auto[/b], the editor will remember the last screen it was displayed on across restarts.
850+
The preferred monitor to display the editor. If [b]Auto[/b], the editor will remember the last screen it was displayed on across multiple sessions.
851851
</member>
852852
<member name="interface/editor/expand_to_title" type="bool" setter="" getter="">
853853
Expanding main editor window content to the title, if supported by [DisplayServer]. See [constant DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE].
@@ -1186,7 +1186,7 @@
11861186
</member>
11871187
<member name="run/window_placement/rect" type="int" setter="" getter="">
11881188
The window mode to use to display the project when starting the project from the editor.
1189-
[b]Note:[/b] Game embedding is not available for "Force Maximized" or "Force Fullscreen."
1189+
[b]Note:[/b] Game embedding is not available for [b]"Force Maximized"[/b] or [b]"Force Fullscreen"[/b].
11901190
</member>
11911191
<member name="run/window_placement/rect_custom_position" type="Vector2" setter="" getter="">
11921192
The custom position to use when starting the project from the editor (in pixels from the top-left corner). Only effective if [member run/window_placement/rect] is set to [b]Custom Position[/b].

doc/classes/FileAccess.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</brief_description>
66
<description>
77
This class can be used to permanently store data in the user device's file system and to read from it. This is useful for storing game save data or player configuration files.
8-
Here's a sample on how to write and read from a file:
8+
[b]Example:[/b] How to write and read from a file. The file named [code]"save_game.dat"[/code] will be stored in the user data folder, as specified in the [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] documentation:
99
[codeblocks]
1010
[gdscript]
1111
func save_to_file(content):
@@ -32,10 +32,9 @@
3232
}
3333
[/csharp]
3434
[/codeblocks]
35-
In the example above, the file will be saved in the user data folder as specified in the [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] documentation.
36-
[FileAccess] will close when it's freed, which happens when it goes out of scope or when it gets assigned with [code]null[/code]. [method close] can be used to close it before then explicitly. In C# the reference must be disposed manually, which can be done with the [code]using[/code] statement or by calling the [code]Dispose[/code] method directly.
35+
A [FileAccess] instance will close its file when the instance is freed. Since it inherits [RefCounted], this happens automatically when it is no longer in use. [method close] can be called to close it earlier. In C#, the reference must be disposed manually, which can be done with the [code]using[/code] statement or by calling the [code]Dispose[/code] method directly.
3736
[b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of [FileAccess], as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. If using [FileAccess], make sure the file is included in the export by changing its import mode to [b]Keep File (exported as is)[/b] in the Import dock, or, for files where this option is not available, change the non-resource export filter in the Export dialog to include the file's extension (e.g. [code]*.txt[/code]).
38-
[b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
37+
[b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [kbd]Alt + F4[/kbd]). If you stop the project execution by pressing [kbd]F8[/kbd] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
3938
</description>
4039
<tutorials>
4140
<link title="File system">$DOCS_URL/tutorials/scripting/filesystem.html</link>

doc/classes/LookAtModifier3D.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<method name="is_interpolating" qualifiers="const">
2020
<return type="bool" />
2121
<description>
22-
Returns whether the time-based interpolation is running or not. If [code]true[/code], it is equivalent to [method get_interpolation_remaining] being [code]0[/code].
22+
Returns [code]true[/code] if time-based interpolation is running. If [code]true[/code], it is equivalent to [method get_interpolation_remaining] returning [code]0.0[/code].
2323
This is useful to determine whether a [LookAtModifier3D] can be removed safely.
2424
</description>
2525
</method>

doc/classes/Node3D.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
<description>
133133
Rotates the node so that the local forward axis (-Z, [constant Vector3.FORWARD]) points toward the [param target] position. This operation is calculated in global space (relative to the world).
134134
The local up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly.
135-
The [param target] position cannot be the same as the node's position, the [param up] vector cannot be [constant Vector3.ZERO]. Furthermore, the direction from the node's position to the [param target] position cannot be parallel to the [param up] vector, to avoid unintended rotation around the local Z axis.
135+
The [param target] position cannot be the same as the node's position, the [param up] vector cannot be [constant Vector3.ZERO]. Furthermore, the direction from the node's position to the [param target] position cannot be parallel to the [param up] vector, to avoid an unintended rotation around the local Z axis.
136136
If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).
137137
[b]Note:[/b] This method fails if the node is not in the scene tree. If necessary, use [method look_at_from_position] instead.
138138
</description>

doc/classes/Object.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@
205205
<param index="0" name="iter" type="Array" />
206206
<description>
207207
Initializes the iterator. [param iter] stores the iteration state. Since GDScript does not support passing arguments by reference, a single-element array is used as a wrapper. Returns [code]true[/code] so long as the iterator has not reached the end.
208-
Example:
209208
[codeblock]
210209
class MyRange:
211210
var _from

doc/classes/ProjectSettings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@
11011101
</member>
11021102
<member name="filesystem/import/blender/enabled" type="bool" setter="" getter="" default="true">
11031103
If [code]true[/code], Blender 3D scene files with the [code].blend[/code] extension will be imported by converting them to glTF 2.0.
1104-
This requires configuring a path to a Blender executable in the editor settings at [code]filesystem/import/blender/blender_path[/code]. Blender 3.0 or later is required.
1104+
This requires configuring a path to a Blender executable in the [member EditorSettings.filesystem/import/blender/blender_path] setting. Blender 3.0 or later is required.
11051105
</member>
11061106
<member name="filesystem/import/blender/enabled.android" type="bool" setter="" getter="" default="false">
11071107
Override for [member filesystem/import/blender/enabled] on Android where Blender can't easily be accessed from Godot.
@@ -3110,11 +3110,11 @@
31103110
</member>
31113111
<member name="rendering/rendering_device/fallback_to_opengl3" type="bool" setter="" getter="" default="true">
31123112
If [code]true[/code], the forward renderer will fall back to OpenGL 3 if Direct3D 12, Metal, and Vulkan are not supported.
3113-
[b]Note:[/b] This setting is implemented only on Windows, Android, macOS, iOS, and Linux/X11.
3113+
[b]Note:[/b] This setting is implemented on Windows, Android, macOS, iOS, and Linux/X11.
31143114
</member>
31153115
<member name="rendering/rendering_device/fallback_to_vulkan" type="bool" setter="" getter="" default="true">
31163116
If [code]true[/code], the forward renderer will fall back to Vulkan if Direct3D 12 (on Windows) or Metal (on macOS x86_64) are not supported. The fallback is always attempted regardless of this setting if Direct3D 12 (Windows) or Metal (macOS) driver support was disabled at compile time.
3117-
[b]Note:[/b] This setting is implemented only on Windows and macOS.
3117+
[b]Note:[/b] This setting is implemented on Windows and macOS.
31183118
</member>
31193119
<member name="rendering/rendering_device/pipeline_cache/enable" type="bool" setter="" getter="" default="true">
31203120
Enable the pipeline cache that is saved to disk if the graphics API supports it.

doc/classes/SpringBoneSimulator3D.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<return type="bool" />
2020
<param index="0" name="index" type="int" />
2121
<description>
22-
Returns [code]true[/code] if the all child [SpringBoneCollision3D]s are contained in the collision list at [param index] in the settings.
22+
Returns [code]true[/code] if all child [SpringBoneCollision3D]s are contained in the collision list at [param index] in the settings.
2323
</description>
2424
</method>
2525
<method name="clear_collisions">
@@ -378,8 +378,8 @@
378378
<param index="0" name="index" type="int" />
379379
<param index="1" name="enabled" type="bool" />
380380
<description>
381-
If sets [param enabled] to [code]true[/code], the all child [SpringBoneCollision3D]s are collided and [method set_exclude_collision_path] is enabled as an exclusion list at [param index] in the settings.
382-
If sets [param enabled] to [code]false[/code], you need to manually register all valid collisions with [method set_collision_path].
381+
If [param enabled] is [code]true[/code], all child [SpringBoneCollision3D]s are colliding and [method set_exclude_collision_path] is enabled as an exclusion list at [param index] in the settings.
382+
If [param enabled] is [code]false[/code], you need to manually register all valid collisions with [method set_collision_path].
383383
</description>
384384
</method>
385385
<method name="set_end_bone">

0 commit comments

Comments
 (0)