diff options
Diffstat (limited to 'doc')
34 files changed, 921 insertions, 97 deletions
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 81795abcdd..4076198df6 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -8,6 +8,91 @@ <tutorials> </tutorials> <methods> + <method name="_confirm_code_completion" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="replace" type="bool"> + </argument> + <description> + Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced. + </description> + </method> + <method name="_filter_code_completion_candidates" qualifiers="virtual"> + <return type="Array"> + </return> + <argument index="0" name="candidates" type="Array"> + </argument> + <description> + Override this method to define what items in [code]candidates[/code] should be displayed. + Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. + </description> + </method> + <method name="_request_code_completion" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="force" type="bool"> + </argument> + <description> + Override this method to define what happens when the user requests code completion. If [code]force[/code] is true, any checks should be bypassed. + </description> + </method> + <method name="add_code_completion_option"> + <return type="void"> + </return> + <argument index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind"> + </argument> + <argument index="1" name="display_text" type="String"> + </argument> + <argument index="2" name="insert_text" type="String"> + </argument> + <argument index="3" name="text_color" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="4" name="icon" type="Resource" default="null"> + </argument> + <argument index="5" name="value" type="Variant" default="0"> + </argument> + <description> + Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list. + [b]Note[/b]: This list will replace all current candidates. + </description> + </method> + <method name="add_comment_delimiter"> + <return type="void"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <argument index="1" name="end_key" type="String"> + </argument> + <argument index="2" name="line_only" type="bool" default="false"> + </argument> + <description> + Adds a comment delimiter. + Both the start and end keys must be symbols. Only the start key has to be unique. + Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]. + </description> + </method> + <method name="add_string_delimiter"> + <return type="void"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <argument index="1" name="end_key" type="String"> + </argument> + <argument index="2" name="line_only" type="bool" default="false"> + </argument> + <description> + Adds a string delimiter. + Both the start and end keys must be symbols. Only the start key has to be unique. + Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]. + </description> + </method> + <method name="cancel_code_completion"> + <return type="void"> + </return> + <description> + Cancels the autocomplete menu. + </description> + </method> <method name="clear_bookmarked_lines"> <return type="void"> </return> @@ -20,12 +105,35 @@ <description> </description> </method> + <method name="clear_comment_delimiters"> + <return type="void"> + </return> + <description> + Removes all comment delimiters. + </description> + </method> <method name="clear_executing_lines"> <return type="void"> </return> <description> </description> </method> + <method name="clear_string_delimiters"> + <return type="void"> + </return> + <description> + Removes all string delimiters. + </description> + </method> + <method name="confirm_code_completion"> + <return type="void"> + </return> + <argument index="0" name="replace" type="bool" default="false"> + </argument> + <description> + Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged. + </description> + </method> <method name="get_bookmarked_lines" qualifiers="const"> <return type="Array"> </return> @@ -38,12 +146,128 @@ <description> </description> </method> + <method name="get_code_completion_option" qualifiers="const"> + <return type="Dictionary"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Gets the completion option at [code]index[/code]. The return [Dictionary] has the following key-values: + [code]kind[/code]: [enum CodeCompletionKind] + [code]display_text[/code]: Text that is shown on the autocomplete menu. + [code]insert_text[/code]: Text that is to be inserted when this item is selected. + [code]font_color[/code]: Color of the text on the autocomplete menu. + [code]icon[/code]: Icon to draw on the autocomplete menu. + [code]default_value[/code]: Value of the symbol. + </description> + </method> + <method name="get_code_completion_options" qualifiers="const"> + <return type="Dictionary[]"> + </return> + <description> + Gets all completion options, see [method get_code_completion_option] for return content. + </description> + </method> + <method name="get_code_completion_selected_index" qualifiers="const"> + <return type="int"> + </return> + <description> + Gets the index of the current selected completion option. + </description> + </method> + <method name="get_delimiter_end_key" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="delimiter_index" type="int"> + </argument> + <description> + Gets the end key for a string or comment region index. + </description> + </method> + <method name="get_delimiter_end_postion" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="column" type="int"> + </argument> + <description> + If [code]line[/code] [code]column[/code] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be [code]-1[/code]. + </description> + </method> + <method name="get_delimiter_start_key" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="delimiter_index" type="int"> + </argument> + <description> + Gets the start key for a string or comment region index. + </description> + </method> + <method name="get_delimiter_start_postion" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="column" type="int"> + </argument> + <description> + If [code]line[/code] [code]column[/code] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be [code]-1[/code]. + </description> + </method> <method name="get_executing_lines" qualifiers="const"> <return type="Array"> </return> <description> </description> </method> + <method name="get_text_for_code_completion" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the full text with char [code]0xFFFF[/code] at the caret location. + </description> + </method> + <method name="has_comment_delimiter" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <description> + Returns [code]true[/code] if comment [code]start_key[/code] exists. + </description> + </method> + <method name="has_string_delimiter" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <description> + Returns [code]true[/code] if string [code]start_key[/code] exists. + </description> + </method> + <method name="is_in_comment" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="column" type="int" default="-1"> + </argument> + <description> + Return delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code]. + </description> + </method> + <method name="is_in_string" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="column" type="int" default="-1"> + </argument> + <description> + Return the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code]. + </description> + </method> <method name="is_line_bookmarked" qualifiers="const"> <return type="bool"> </return> @@ -68,6 +292,60 @@ <description> </description> </method> + <method name="remove_comment_delimiter"> + <return type="void"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <description> + Removes the comment delimiter with [code]start_key[/code]. + </description> + </method> + <method name="remove_string_delimiter"> + <return type="void"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <description> + Removes the string delimiter with [code]start_key[/code]. + </description> + </method> + <method name="request_code_completion"> + <return type="void"> + </return> + <argument index="0" name="force" type="bool" default="false"> + </argument> + <description> + Emits [signal request_code_completion], if [code]force[/code] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal. + </description> + </method> + <method name="set_code_completion_selected_index"> + <return type="void"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Sets the current selected completion option. + </description> + </method> + <method name="set_code_hint"> + <return type="void"> + </return> + <argument index="0" name="code_hint" type="String"> + </argument> + <description> + Sets the code hint text. Pass an empty string to clear. + </description> + </method> + <method name="set_code_hint_draw_below"> + <return type="void"> + </return> + <argument index="0" name="draw_below" type="bool"> + </argument> + <description> + Sets if the code hint should draw below the text. + </description> + </method> <method name="set_line_as_bookmarked"> <return type="void"> </return> @@ -98,8 +376,30 @@ <description> </description> </method> + <method name="update_code_completion_options"> + <return type="void"> + </return> + <argument index="0" name="force" type="bool"> + </argument> + <description> + Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [code]force[/code] is [code]true[/code]. + [b]Note[/b]: This will replace all current candidates. + </description> + </method> </methods> <members> + <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false"> + Sets whether code completion is allowed. + </member> + <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[ ]"> + Sets prefixes that will trigger code completion. + </member> + <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[ ]"> + Sets the comment delimiters. All existing comment delimiters will be removed. + </member> + <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="[ ]"> + Sets the string delimiters. All existing string delimiters will be removed. + </member> <member name="draw_bookmarks" type="bool" setter="set_draw_bookmarks_gutter" getter="is_drawing_bookmarks_gutter" default="false"> </member> <member name="draw_breakpoints_gutter" type="bool" setter="set_draw_breakpoints_gutter" getter="is_drawing_breakpoints_gutter" default="false"> @@ -123,8 +423,33 @@ <description> </description> </signal> + <signal name="request_code_completion"> + <description> + Emitted when the user requests code completion. + </description> + </signal> </signals> <constants> + <constant name="KIND_CLASS" value="0" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_FUNCTION" value="1" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_SIGNAL" value="2" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_VARIABLE" value="3" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_MEMBER" value="4" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_ENUM" value="5" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_CONSTANT" value="6" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_NODE_PATH" value="7" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_FILE_PATH" value="8" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_PLAIN_TEXT" value="9" enum="CodeCompletionKind"> + </constant> </constants> <theme_items> <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> @@ -193,8 +518,6 @@ </theme_item> <theme_item name="line_spacing" type="int" default="4"> </theme_item> - <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )"> - </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> <theme_item name="outline_size" type="int" default="0"> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index a9d7960501..2c61d723cd 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -154,14 +154,14 @@ <method name="list_dir_begin"> <return type="int" enum="Error"> </return> - <argument index="0" name="skip_navigational" type="bool" default="false"> + <argument index="0" name="show_navigational" type="bool" default="false"> </argument> - <argument index="1" name="skip_hidden" type="bool" default="false"> + <argument index="1" name="show_hidden" type="bool" default="false"> </argument> <description> Initializes the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. - If [code]skip_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are filtered out. - If [code]skip_hidden[/code] is [code]true[/code], hidden files are filtered out. + If [code]show_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are included too. + If [code]show_hidden[/code] is [code]true[/code], hidden files are included too. </description> </method> <method name="list_dir_end"> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index a5328ce382..3f324bf1a0 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -57,6 +57,12 @@ [b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically. </description> </method> + <method name="get_editor_paths"> + <return type="EditorPaths"> + </return> + <description> + </description> + </method> <method name="get_editor_scale" qualifiers="const"> <return type="float"> </return> diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml new file mode 100644 index 0000000000..b92927fd53 --- /dev/null +++ b/doc/classes/EditorPaths.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorPaths" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_cache_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_config_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_data_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_self_contained_file" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_settings_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="is_self_contained" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index f6f51df7c0..6c40b7aa9d 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -91,7 +91,8 @@ <argument index="0" name="plugin" type="EditorExportPlugin"> </argument> <description> - Registers a new export plugin. Export plugins are used when the project is being exported. See [EditorExportPlugin] for more information. + Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported. + See [method add_inspector_plugin] for an example of how to register a plugin. </description> </method> <method name="add_import_plugin"> @@ -100,6 +101,9 @@ <argument index="0" name="importer" type="EditorImportPlugin"> </argument> <description> + Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type. + [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_import_plugin] instead. + See [method add_inspector_plugin] for an example of how to register a plugin. </description> </method> <method name="add_inspector_plugin"> @@ -108,6 +112,20 @@ <argument index="0" name="plugin" type="EditorInspectorPlugin"> </argument> <description> + Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties. + [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior. + [codeblocks] + [gdscript] + const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd") + var inspector_plugin = MyInspectorPlugin.new() + + func _enter_tree(): + add_inspector_plugin(inspector_plugin) + + func _exit_tree(): + remove_inspector_plugin(inspector_plugin) + [/gdscript] + [/codeblocks] </description> </method> <method name="add_scene_import_plugin"> @@ -116,6 +134,7 @@ <argument index="0" name="scene_importer" type="EditorSceneImporter"> </argument> <description> + Registers a new [EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes. </description> </method> <method name="add_spatial_gizmo_plugin"> @@ -124,6 +143,8 @@ <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin"> </argument> <description> + Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D]. + See [method add_inspector_plugin] for an example of how to register a plugin. </description> </method> <method name="add_tool_menu_item"> @@ -580,6 +601,7 @@ <argument index="0" name="plugin" type="EditorExportPlugin"> </argument> <description> + Removes an export plugin registered by [method add_export_plugin]. </description> </method> <method name="remove_import_plugin"> @@ -588,6 +610,7 @@ <argument index="0" name="importer" type="EditorImportPlugin"> </argument> <description> + Removes an import plugin registered by [method add_import_plugin]. </description> </method> <method name="remove_inspector_plugin"> @@ -596,6 +619,7 @@ <argument index="0" name="plugin" type="EditorInspectorPlugin"> </argument> <description> + Removes an inspector plugin registered by [method add_import_plugin] </description> </method> <method name="remove_scene_import_plugin"> @@ -604,6 +628,7 @@ <argument index="0" name="scene_importer" type="EditorSceneImporter"> </argument> <description> + Removes a scene importer registered by [method add_scene_import_plugin]. </description> </method> <method name="remove_spatial_gizmo_plugin"> @@ -612,6 +637,7 @@ <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin"> </argument> <description> + Removes a gizmo plugin registered by [method add_spatial_gizmo_plugin]. </description> </method> <method name="remove_tool_menu_item"> @@ -629,7 +655,7 @@ <argument index="0" name="parser" type="EditorTranslationParserPlugin"> </argument> <description> - Removes a registered custom translation parser plugin. + Removes a custom translation parser plugin registered by [method add_translation_parser_plugin]. </description> </method> <method name="remove_undo_redo_inspector_hook_callback"> diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml index e31a681b8b..30c73daa77 100644 --- a/doc/classes/EditorResourcePicker.xml +++ b/doc/classes/EditorResourcePicker.xml @@ -4,8 +4,8 @@ Godot editor's control for selecting [Resource] type properties. </brief_description> <description> - This is a [Control] node similar to the one used in the Inspector dock when editing [Resource]s. It provides options for creating, loading, saving and converting resources. - [b]Note:[/b] It does not include an editor for the resource. + This [Control] node is used in the editor's Inspector dock to allow editing of [Resource] type properties. It provides options for creating, loading, saving and converting resources. Can be used with [EditorInspectorPlugin] to recreate the same behavior. + [b]Note:[/b] This [Control] does not include any editor for the resource, as editing is controlled by the Inspector dock itself or sub-Inspectors. </description> <tutorials> </tutorials> @@ -51,6 +51,34 @@ <description> </description> </method> + <method name="handle_menu_selected" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + This virtual method can be implemented to handle context menu items not handled by default. See [method set_create_options]. + </description> + </method> + <method name="set_create_options" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="menu_node" type="Object"> + </argument> + <description> + This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [code]menu_node[/code] is a reference to the [PopupMenu] node. + [b]Note:[/b] Implement [method handle_menu_selected] to handle these custom items. + </description> + </method> + <method name="set_toggle_pressed"> + <return type="void"> + </return> + <argument index="0" name="pressed" type="bool"> + </argument> + <description> + Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to [code]true[/code]. + </description> + </method> </methods> <members> <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""""> @@ -62,6 +90,9 @@ <member name="edited_resource" type="Resource" setter="set_edited_resource" getter="get_edited_resource"> The edited resource value. </member> + <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false"> + If [code]true[/code], the main button with the resource preview works in the toggle mode. Use [method set_toggle_pressed] to manually set the state. + </member> </members> <signals> <signal name="resource_changed"> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index 0c1d969518..3239a75ada 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -40,7 +40,8 @@ <argument index="3" name="userdata" type="Variant"> </argument> <description> - Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. + Queue the [code]resource[/code] being edited for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called. + [b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null. </description> </method> <method name="queue_resource_preview"> @@ -55,7 +56,8 @@ <argument index="3" name="userdata" type="Variant"> </argument> <description> - Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. + Queue a resource file located at [code]path[/code] for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called. + [b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null. </description> </method> <method name="remove_preview_generator"> diff --git a/doc/classes/EditorScriptPicker.xml b/doc/classes/EditorScriptPicker.xml new file mode 100644 index 0000000000..8334676d92 --- /dev/null +++ b/doc/classes/EditorScriptPicker.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorScriptPicker" inherits="EditorResourcePicker" version="4.0"> + <brief_description> + Godot editor's control for selecting the [code]script[/code] property of a [Node]. + </brief_description> + <description> + Similar to [EditorResourcePicker] this [Control] node is used in the editor's Inspector dock, but only to edit the [code]script[/code] property of a [Node]. Default options for creating new resources of all possible subtypes are replaced with dedicated buttons that open the "Attach Node Script" dialog. Can be used with [EditorInspectorPlugin] to recreate the same behavior. + [b]Note:[/b] You must set the [member script_owner] for the custom context menu items to work. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="script_owner" type="Node" setter="set_script_owner" getter="get_script_owner"> + The owner [Node] of the script property that holds the edited resource. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 016d0128eb..e732223516 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -124,15 +124,6 @@ Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance. </description> </method> - <method name="get_settings_dir" qualifiers="const"> - <return type="String"> - </return> - <description> - Gets the global settings path for the engine. Inside this path, you can find some standard paths such as: - [code]settings/tmp[/code] - Used for temporary storage of files - [code]settings/templates[/code] - Where export templates are located - </description> - </method> <method name="has_setting" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index 381f4fae04..935335943f 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorSpinSlider" inherits="Range" version="4.0"> <brief_description> + Godot editor's control for editing numeric values. </brief_description> <description> + This [Control] node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with [EditorInspectorPlugin] to recreate the same behavior. </description> <tutorials> </tutorials> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index a31b728143..ea3b82dc54 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -61,7 +61,7 @@ </return> <description> Returns [code]true[/code] if the file cursor has read past the end of the file. - [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic. + [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_length] and [method get_position] to implement a custom logic. </description> </method> <method name="file_exists" qualifiers="const"> @@ -121,10 +121,10 @@ <method name="get_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> - <argument index="0" name="len" type="int"> + <argument index="0" name="length" type="int"> </argument> <description> - Returns next [code]len[/code] bytes of the file as a [PackedByteArray]. + Returns next [code]length[/code] bytes of the file as a [PackedByteArray]. </description> </method> <method name="get_csv_line" qualifiers="const"> @@ -158,7 +158,7 @@ Returns the next 32 bits from the file as a floating-point number. </description> </method> - <method name="get_len" qualifiers="const"> + <method name="get_length" qualifiers="const"> <return type="int"> </return> <description> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index ebe4e3b00d..ebd6d2b92c 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -31,7 +31,9 @@ <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles2D.DrawOrder" default="0"> + <member name="collision_base_size" type="float" setter="set_collision_base_size" getter="get_collision_base_size" default="1.0"> + </member> + <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles2D.DrawOrder" default="1"> Particle draw order. Uses [enum DrawOrder] values. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> @@ -40,7 +42,7 @@ <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. </member> - <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> + <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="30"> The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> @@ -70,6 +72,14 @@ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> Particle texture. If [code]null[/code], particles will be squares. </member> + <member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false"> + </member> + <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3"> + </member> + <member name="trail_section_subdivisions" type="int" setter="set_trail_section_subdivisions" getter="get_trail_section_subdivisions" default="4"> + </member> + <member name="trail_sections" type="int" setter="set_trail_sections" getter="get_trail_sections" default="8"> + </member> <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )"> The [Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active. Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [Rect2] can be grown via code or with the [b]Particles → Generate Visibility Rect[/b] editor tool. @@ -82,5 +92,7 @@ <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> Particles are drawn in order of remaining lifetime. </constant> + <constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder"> + </constant> </constants> </class> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index e5d6581ddc..76f0fdb406 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -126,7 +126,7 @@ </member> <member name="sub_emitter" type="NodePath" setter="set_sub_emitter" getter="get_sub_emitter" default="NodePath("")"> </member> - <member name="trail_enabled" type="bool" setter="set_enable_trail" getter="is_trail_enabled" default="false"> + <member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false"> </member> <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3"> </member> @@ -144,7 +144,9 @@ <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> Particles are drawn in order of remaining lifetime. </constant> - <constant name="DRAW_ORDER_VIEW_DEPTH" value="2" enum="DrawOrder"> + <constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder"> + </constant> + <constant name="DRAW_ORDER_VIEW_DEPTH" value="3" enum="DrawOrder"> Particles are drawn in order of depth. </constant> <constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags"> diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index 44da913492..b3ce1abaeb 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -59,6 +59,15 @@ Returns a queued hostname's IP address, given its queue [code]id[/code]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). </description> </method> + <method name="get_resolve_item_addresses" qualifiers="const"> + <return type="Array"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]). + </description> + </method> <method name="get_resolve_item_status" qualifiers="const"> <return type="int" enum="IP.ResolverStatus"> </return> @@ -79,6 +88,17 @@ Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code]. </description> </method> + <method name="resolve_hostname_addresses"> + <return type="Array"> + </return> + <argument index="0" name="host" type="String"> + </argument> + <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> + </argument> + <description> + Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [code]ip_type[/code]. + </description> + </method> <method name="resolve_hostname_queue_item"> <return type="int"> </return> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index c707a72ee8..c87e637ff5 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -11,6 +11,40 @@ <link title="Exporting for the Web: Calling JavaScript from script">https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link> </tutorials> <methods> + <method name="create_callback"> + <return type="JavaScriptObject"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <description> + Creates a reference to a [Callable] that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [JavaScriptObject] for usage. + </description> + </method> + <method name="create_object" qualifiers="vararg"> + <return type="Variant"> + </return> + <argument index="0" name="object" type="String"> + </argument> + <description> + Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage. + </description> + </method> + <method name="download_buffer"> + <return type="void"> + </return> + <argument index="0" name="buffer" type="PackedByteArray"> + </argument> + <argument index="1" name="name" type="String"> + </argument> + <argument index="2" name="mime" type="String" default=""application/octet-stream""> + </argument> + <description> + Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type. + [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension. + [b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click). + [b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession. + </description> + </method> <method name="eval"> <return type="Variant"> </return> @@ -23,6 +57,15 @@ If [code]use_global_execution_context[/code] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. </description> </method> + <method name="get_interface"> + <return type="JavaScriptObject"> + </return> + <argument index="0" name="interface" type="String"> + </argument> + <description> + Returns an interface to a JavaScript object that can be used by scripts. The [code]interface[/code] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml new file mode 100644 index 0000000000..a9e9c77e89 --- /dev/null +++ b/doc/classes/JavaScriptObject.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="JavaScriptObject" inherits="Reference" version="4.0"> + <brief_description> + A wrapper class for native JavaScript objects. + </brief_description> + <description> + JavaScriptObject is used to interact with JavaScript objects retrieved or created via [method JavaScript.get_interface], [method JavaScript.create_object], or [method JavaScript.create_callback]. + Example: + [codeblock] + extends Node + + var _my_js_callback = JavaScript.create_callback(self, "myCallback") # This reference must be kept + var console = JavaScript.get_interface("console") + + func _init(): + var buf = JavaScript.create_object("ArrayBuffer", 10) # new ArrayBuffer(10) + print(buf) # prints [JavaScriptObject:OBJECT_ID] + var uint8arr = JavaScript.create_object("Uint8Array", buf) # new Uint8Array(buf) + uint8arr[1] = 255 + prints(uint8arr[1], uint8arr.byteLength) # prints 255 10 + console.log(uint8arr) # prints in browser console "Uint8Array(10) [ 0, 255, 0, 0, 0, 0, 0, 0, 0, 0 ]" + + # Equivalent of JavaScript: Array.from(uint8arr).forEach(myCallback) + JavaScript.get_interface("Array").from(uint8arr).forEach(_my_js_callback) + + func myCallback(args): + # Will be called with the parameters passed to the "forEach" callback + # [0, 0, [JavaScriptObject:1173]] + # [255, 1, [JavaScriptObject:1173]] + # ... + # [0, 9, [JavaScriptObject:1180]] + print(args) + [/codeblock] + Note: Only available in the "HTML5" platform. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 05826ecbf0..b8b437f78f 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -368,7 +368,7 @@ <description> Gets an epoch time value from a dictionary of time values. [code]datetime[/code] must be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], [code]second[/code]. - If the dictionary is empty [code]0[/code] is returned. + If the dictionary is empty [code]0[/code] is returned. If some keys are omitted, they default to the equivalent values for the UNIX epoch timestamp 0 (1970-01-01 at 00:00:00 UTC). You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight Savings Time ([code]dst[/code]), if present, is ignored. </description> </method> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 6d7f99a55b..3c364b621a 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -135,7 +135,7 @@ </member> <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0"> </member> - <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="true"> + <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false"> </member> <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0"> </member> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 24d4a8a46e..a200858a3c 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -494,8 +494,9 @@ <member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true"> If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. </member> - <member name="display/window/handheld/orientation" type="String" setter="" getter="" default=""landscape""> - Default orientation on mobile devices. + <member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0"> + The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values. + [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/width] and [member display/window/size/height] accordingly. </member> <member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true"> If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button. @@ -702,6 +703,8 @@ </member> <member name="input/ui_text_completion_query" type="Dictionary" setter="" getter=""> </member> + <member name="input/ui_text_completion_replace" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_text_dedent" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_delete" type="Dictionary" setter="" getter=""> @@ -732,6 +735,10 @@ </member> <member name="input/ui_text_select_all" type="Dictionary" setter="" getter=""> </member> + <member name="input/ui_text_select_word_under_caret" type="Dictionary" setter="" getter=""> + If no selection is currently active, selects the word currently under the caret in text fields. If a selection is currently active, deselects the current selection. + [b]Note:[/b] Currently, this is only implemented in [TextEdit], not [LineEdit]. + </member> <member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_undo" type="Dictionary" setter="" getter=""> @@ -1497,6 +1504,16 @@ <member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false"> Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support. </member> + <member name="rendering/shader_compiler/shader_cache/compress" type="bool" setter="" getter="" default="true"> + </member> + <member name="rendering/shader_compiler/shader_cache/enabled" type="bool" setter="" getter="" default="true"> + </member> + <member name="rendering/shader_compiler/shader_cache/strip_debug" type="bool" setter="" getter="" default="false"> + </member> + <member name="rendering/shader_compiler/shader_cache/strip_debug.release" type="bool" setter="" getter="" default="true"> + </member> + <member name="rendering/shader_compiler/shader_cache/use_zstd_compression" type="bool" setter="" getter="" default="true"> + </member> <member name="rendering/shading/overrides/force_blinn_over_ggx" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model. </member> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 638b0bb297..7a345f726d 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -3388,7 +3388,7 @@ <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> Sort particles based on their lifetime. </constant> - <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder"> + <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="3" enum="ParticlesDrawOrder"> Sort particles based on their distance to the camera. </constant> <constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode"> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 2548f8d911..75736798fd 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -27,6 +27,7 @@ <description> Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources. [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. + [b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource. </description> </method> <method name="emit_changed"> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 40e29ac74b..60f3106b4b 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -11,6 +11,15 @@ <tutorials> </tutorials> <methods> + <method name="ensure_control_visible"> + <return type="void"> + </return> + <argument index="0" name="control" type="Control"> + </argument> + <description> + Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. + </description> + </method> <method name="get_h_scrollbar"> <return type="HScrollBar"> </return> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 0b278d7d25..44ad460459 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -22,17 +22,6 @@ Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index. </description> </method> - <method name="bind_child_node_to_bone"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="node" type="Node"> - </argument> - <description> - [i]Deprecated soon.[/i] - </description> - </method> <method name="bone_transform_to_world_transform"> <return type="Transform"> </return> @@ -143,15 +132,6 @@ Returns the rest transform for a bone [code]bone_idx[/code]. </description> </method> - <method name="get_bound_child_nodes_to_bone" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <description> - [i]Deprecated soon.[/i] - </description> - </method> <method name="is_bone_rest_disabled" qualifiers="const"> <return type="bool"> </return> @@ -299,17 +279,6 @@ Sets the rest transform for bone [code]bone_idx[/code]. </description> </method> - <method name="unbind_child_node_from_bone"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="node" type="Node"> - </argument> - <description> - [i]Deprecated soon.[/i] - </description> - </method> <method name="unparent_bone_and_rest"> <return type="void"> </return> diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index 617ad3a371..c320adb1be 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -64,7 +64,7 @@ <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. </member> - <member name="frame_coords" type="Vector2" setter="set_frame_coords" getter="get_frame_coords" default="Vector2( 0, 0 )"> + <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i( 0, 0 )"> Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index 658fd1a4f2..a7d61a6bab 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -14,7 +14,7 @@ <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. </member> - <member name="frame_coords" type="Vector2" setter="set_frame_coords" getter="get_frame_coords" default="Vector2( 0, 0 )"> + <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i( 0, 0 )"> Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 416438e648..a81defa16c 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -397,7 +397,12 @@ <argument index="0" name="position" type="int"> </argument> <description> - Returns a number of characters from the left of the string. + Returns a number of characters from the left of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length. + Examples: + [codeblock] + print("sample text".left(3)) #prints "sam" + print("sample text".left(-3)) #prints "sample t" + [/codeblock] </description> </method> <method name="length" qualifiers="const"> @@ -669,7 +674,12 @@ <argument index="0" name="position" type="int"> </argument> <description> - Returns the right side of the string from a given position. + Returns a number of characters from the right of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length. + Examples: + [codeblock] + print("sample text".right(3)) #prints "ext" + print("sample text".right(-3)) #prints "ple text" + [/codeblock] </description> </method> <method name="rpad" qualifiers="const"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index b97728ccd4..74811318dc 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -128,6 +128,13 @@ Folds the given line, if possible (see [method can_fold]). </description> </method> + <method name="get_caret_draw_pos" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Gets the caret pixel draw poistion. + </description> + </method> <method name="get_gutter_count" qualifiers="const"> <return type="int"> </return> @@ -167,6 +174,15 @@ Returns the text of a specific line. </description> </method> + <method name="get_line_background_color"> + <return type="Color"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set. + </description> + </method> <method name="get_line_count" qualifiers="const"> <return type="int"> </return> @@ -306,6 +322,13 @@ Insert the specified text at the cursor position. </description> </method> + <method name="is_caret_visible" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the caret is visible on the screen. + </description> + </method> <method name="is_folded" qualifiers="const"> <return type="bool"> </return> @@ -548,6 +571,17 @@ If [code]true[/code], hides the line of the specified index. </description> </method> + <method name="set_line_background_color"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + Sets the current background color of the line. Set to [code]Color(0, 0, 0, 0)[/code] for no color. + </description> + </method> <method name="set_line_gutter_clickable"> <return type="void"> </return> @@ -792,10 +826,6 @@ <description> </description> </signal> - <signal name="request_completion"> - <description> - </description> - </signal> <signal name="symbol_lookup"> <argument index="0" name="symbol" type="String"> </argument> @@ -944,24 +974,6 @@ </theme_item> <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )"> </theme_item> - <theme_item name="completion" type="StyleBox"> - </theme_item> - <theme_item name="completion_background_color" type="Color" default="Color( 0.17, 0.16, 0.2, 1 )"> - </theme_item> - <theme_item name="completion_existing_color" type="Color" default="Color( 0.87, 0.87, 0.87, 0.13 )"> - </theme_item> - <theme_item name="completion_font_color" type="Color" default="Color( 0.67, 0.67, 0.67, 1 )"> - </theme_item> - <theme_item name="completion_lines" type="int" default="7"> - </theme_item> - <theme_item name="completion_max_width" type="int" default="50"> - </theme_item> - <theme_item name="completion_scroll_color" type="Color" default="Color( 1, 1, 1, 1 )"> - </theme_item> - <theme_item name="completion_scroll_width" type="int" default="3"> - </theme_item> - <theme_item name="completion_selected_color" type="Color" default="Color( 0.26, 0.26, 0.27, 1 )"> - </theme_item> <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )"> Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled. </theme_item> @@ -987,9 +999,6 @@ <theme_item name="line_spacing" type="int" default="4"> Sets the spacing between the lines. </theme_item> - <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )"> - Sets the [Color] of marked text. - </theme_item> <theme_item name="normal" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml index e3bc910ab6..efcbdf2e95 100644 --- a/doc/classes/TileData.xml +++ b/doc/classes/TileData.xml @@ -229,7 +229,7 @@ </member> <member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false"> </member> - <member name="y_sort_origin" type="Vector2i" setter="set_y_sort_origin" getter="get_y_sort_origin" default="Vector2i( 0, 0 )"> + <member name="y_sort_origin" type="int" setter="set_y_sort_origin" getter="get_y_sort_origin" default="0"> </member> <member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0"> </member> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index fd52a28486..93d5dd8037 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -132,6 +132,10 @@ <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" default="16"> The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. </member> + <member name="show_collision" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0"> + </member> + <member name="show_navigation" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0"> + </member> <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset"> The assigned [TileSet]. </member> @@ -144,5 +148,11 @@ </signal> </signals> <constants> + <constant name="VISIBILITY_MODE_DEFAULT" value="0" enum="VisibilityMode"> + </constant> + <constant name="VISIBILITY_MODE_FORCE_HIDE" value="2" enum="VisibilityMode"> + </constant> + <constant name="VISIBILITY_MODE_FORCE_SHOW" value="1" enum="VisibilityMode"> + </constant> </constants> </class> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index ff68a017a1..2015b1f1cd 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -20,7 +20,7 @@ <method name="add_source"> <return type="int"> </return> - <argument index="0" name="atlas_source_id_override" type="TileSetAtlasSource"> + <argument index="0" name="atlas_source_id_override" type="TileSetSource"> </argument> <argument index="1" name="arg1" type="int" default="-1"> </argument> diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml new file mode 100644 index 0000000000..1a00eb51c0 --- /dev/null +++ b/doc/classes/TileSetScenesCollectionSource.xml @@ -0,0 +1,155 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TileSetScenesCollectionSource" inherits="TileSetSource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="create_scene_tile"> + <return type="int"> + </return> + <argument index="0" name="packed_scene" type="PackedScene"> + </argument> + <argument index="1" name="id_override" type="int" default="-1"> + </argument> + <description> + </description> + </method> + <method name="get_alternative_tile_id" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_alternative_tiles_count" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_next_scene_tile_id" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_scene_tile_display_placeholder" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_scene_tile_id"> + <return type="int"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_scene_tile_scene" qualifiers="const"> + <return type="PackedScene"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_scene_tiles_count"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_tile_id" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_tiles_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="has_alternative_tile" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_tile" type="int"> + </argument> + <description> + </description> + </method> + <method name="has_scene_tile_id"> + <return type="bool"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="has_tile" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="remove_scene_tile"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_scene_tile_display_placeholder"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="display_placeholder" type="bool"> + </argument> + <description> + </description> + </method> + <method name="set_scene_tile_id"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="new_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_scene_tile_scene"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="packed_scene" type="PackedScene"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 27b26801f3..c31467c67e 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -533,6 +533,12 @@ <theme_item name="checked" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. </theme_item> + <theme_item name="children_hl_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> + The [Color] of the relationship lines between the selected [TreeItem] and its children. + </theme_item> + <theme_item name="children_hl_line_width" type="int" default="1"> + The width of the relationship lines between the selected [TreeItem] and its children. + </theme_item> <theme_item name="cursor" type="StyleBox"> [StyleBox] used for the cursor, when the [Tree] is being focused. </theme_item> @@ -587,8 +593,20 @@ <theme_item name="outline_size" type="int" default="0"> The size of the text outline. </theme_item> + <theme_item name="parent_hl_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> + The [Color] of the relationship lines between the selected [TreeItem] and its parents. + </theme_item> + <theme_item name="parent_hl_line_margin" type="int" default="0"> + The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected. + </theme_item> + <theme_item name="parent_hl_line_width" type="int" default="1"> + The width of the relationship lines between the selected [TreeItem] and its parents. + </theme_item> <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> - [Color] of the relationship lines. + The default [Color] of the relationship lines. + </theme_item> + <theme_item name="relationship_line_width" type="int" default="1"> + The default width of the relationship lines. </theme_item> <theme_item name="scroll_border" type="int" default="4"> The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging. diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 7d37580504..0256d83fea 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -175,6 +175,14 @@ Returns the custom color of column [code]column[/code]. </description> </method> + <method name="get_custom_font" qualifiers="const"> + <return type="Font"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <description> + </description> + </method> <method name="get_expand_right" qualifiers="const"> <return type="bool"> </return> @@ -579,6 +587,16 @@ The [code]callback[/code] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2]. </description> </method> + <method name="set_custom_font"> + <return type="void"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <argument index="1" name="font" type="Font"> + </argument> + <description> + </description> + </method> <method name="set_editable"> <return type="void"> </return> diff --git a/doc/classes/VisualShaderNodeBillboard.xml b/doc/classes/VisualShaderNodeBillboard.xml new file mode 100644 index 0000000000..53bcfa7b5c --- /dev/null +++ b/doc/classes/VisualShaderNodeBillboard.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeBillboard" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A node that controls how the object faces the camera to be used within the visual shader graph. + </brief_description> + <description> + The output port of this node needs to be connected to [code]Model View Matrix[/code] port of [VisualShaderNodeOutput]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="billboard_type" type="int" setter="set_billboard_type" getter="get_billboard_type" enum="VisualShaderNodeBillboard.BillboardType" default="1"> + Controls how the object faces the camera. See [enum BillboardType]. + </member> + <member name="keep_scale" type="bool" setter="set_keep_scale_enabled" getter="is_keep_scale_enabled" default="false"> + If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. + </member> + </members> + <constants> + <constant name="BILLBOARD_TYPE_DISABLED" value="0" enum="BillboardType"> + Billboarding is disabled and the node does nothing. + </constant> + <constant name="BILLBOARD_TYPE_ENABLED" value="1" enum="BillboardType"> + A standard billboarding algorithm is enabled. + </constant> + <constant name="BILLBOARD_TYPE_FIXED_Y" value="2" enum="BillboardType"> + A billboarding algorithm to rotate around Y-axis is enabled. + </constant> + <constant name="BILLBOARD_TYPE_PARTICLES" value="3" enum="BillboardType"> + A billboarding algorithm designed to use on particles is enabled. + </constant> + <constant name="BILLBOARD_TYPE_MAX" value="4" enum="BillboardType"> + Represents the size of the [enum BillboardType] enum. + </constant> + </constants> +</class> |