diff --git a/tutorials/scripting/creating_script_templates.rst b/tutorials/scripting/creating_script_templates.rst index c1a5324a0..5a56e89b2 100644 --- a/tutorials/scripting/creating_script_templates.rst +++ b/tutorials/scripting/creating_script_templates.rst @@ -6,7 +6,7 @@ Creating script templates Godot provides a way to use script templates as seen in the ``Script Create Dialog`` while creating a new script: -.. image:: img/script_create_dialog_templates.png +.. image:: img/script_create_dialog_templates.webp A set of built-in script templates are provided with the editor, but it is also possible to create new ones and set them by default, both per project @@ -107,7 +107,7 @@ it will be set as the default template for the node in which directory it has be This is an example of utilizing custom templates at editor and project level: -.. image:: img/script_create_dialog_custom_templates.png +.. image:: img/script_create_dialog_custom_templates.webp .. note:: The script templates have the same extension as the regular script files. This may lead to an issue of a script parser treating those templates as diff --git a/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_dynamic.png b/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_dynamic.png deleted file mode 100644 index e1e573d52..000000000 Binary files a/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_dynamic.png and /dev/null differ diff --git a/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_dynamic.webp b/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_dynamic.webp new file mode 100644 index 000000000..6f169278b Binary files /dev/null and b/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_dynamic.webp differ diff --git a/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_typed.png b/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_typed.png deleted file mode 100644 index b9fcc259c..000000000 Binary files a/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_typed.png and /dev/null differ diff --git a/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_typed.webp b/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_typed.webp new file mode 100644 index 000000000..ec6641617 Binary files /dev/null and b/tutorials/scripting/gdscript/img/typed_gdscript_code_completion_typed.webp differ diff --git a/tutorials/scripting/gdscript/img/typed_gdscript_safe_unsafe_line.png b/tutorials/scripting/gdscript/img/typed_gdscript_safe_unsafe_line.png deleted file mode 100644 index 96bc2dff0..000000000 Binary files a/tutorials/scripting/gdscript/img/typed_gdscript_safe_unsafe_line.png and /dev/null differ diff --git a/tutorials/scripting/gdscript/img/typed_gdscript_safe_unsafe_line.webp b/tutorials/scripting/gdscript/img/typed_gdscript_safe_unsafe_line.webp new file mode 100644 index 000000000..e09e825ae Binary files /dev/null and b/tutorials/scripting/gdscript/img/typed_gdscript_safe_unsafe_line.webp differ diff --git a/tutorials/scripting/gdscript/img/typed_gdscript_warning_system_settings.png b/tutorials/scripting/gdscript/img/typed_gdscript_warning_system_settings.png deleted file mode 100644 index 9d086f037..000000000 Binary files a/tutorials/scripting/gdscript/img/typed_gdscript_warning_system_settings.png and /dev/null differ diff --git a/tutorials/scripting/gdscript/img/typed_gdscript_warning_system_settings.webp b/tutorials/scripting/gdscript/img/typed_gdscript_warning_system_settings.webp new file mode 100644 index 000000000..a4f9c9993 Binary files /dev/null and b/tutorials/scripting/gdscript/img/typed_gdscript_warning_system_settings.webp differ diff --git a/tutorials/scripting/gdscript/static_typing.rst b/tutorials/scripting/gdscript/static_typing.rst index 33bdc201b..4bff2acf9 100644 --- a/tutorials/scripting/gdscript/static_typing.rst +++ b/tutorials/scripting/gdscript/static_typing.rst @@ -59,14 +59,14 @@ options for a class called ``PlayerController``. You've probably stored a node in a variable before, and typed a dot to be left with no autocomplete suggestions: -.. figure:: img/typed_gdscript_code_completion_dynamic.png +.. figure:: img/typed_gdscript_code_completion_dynamic.webp :alt: code completion options for dynamic This is due to dynamic code. Godot cannot know what node or value type you're passing to the function. If you write the type explicitly however, you will get all public methods and variables from the node: -.. figure:: img/typed_gdscript_code_completion_typed.png +.. figure:: img/typed_gdscript_code_completion_typed.webp :alt: code completion options for typed In the future, typed GDScript will also increase code performance: @@ -202,7 +202,7 @@ node: ``($Timer as Timer)``, ``($Player as CharacterBody2D)``, etc. Godot will ensure the type works and if so, the line number will turn green at the left of the script editor. -.. figure:: img/typed_gdscript_safe_unsafe_line.png +.. figure:: img/typed_gdscript_safe_unsafe_line.webp :alt: Unsafe vs Safe Line Unsafe line (line 7) vs Safe Lines (line 6 and 8) diff --git a/tutorials/scripting/gdscript/warning_system.rst b/tutorials/scripting/gdscript/warning_system.rst index 04ec94399..6312f522c 100644 --- a/tutorials/scripting/gdscript/warning_system.rst +++ b/tutorials/scripting/gdscript/warning_system.rst @@ -9,13 +9,17 @@ mistakes that are hard to spot during development, and that may lead to runtime errors. You can configure warnings in the Project Settings under the section -called **Gdscript**: +called **GDScript**: -.. figure:: img/typed_gdscript_warning_system_settings.png +.. figure:: img/typed_gdscript_warning_system_settings.webp :alt: Warning system project settings Warning system project settings +.. note:: + + As shown in the image above, you must enable **Advanced Settings** in order to see the GDScript section. + You can find a list of warnings for the active GDScript file in the script editor's status bar. The example below has 3 warnings: diff --git a/tutorials/scripting/groups.rst b/tutorials/scripting/groups.rst index 759c33b44..0086885d1 100644 --- a/tutorials/scripting/groups.rst +++ b/tutorials/scripting/groups.rst @@ -32,27 +32,27 @@ Using the Node dock You can add nodes in the current scene to groups using the Groups tab in the Node dock. -.. image:: img/groups_node_tab.png +.. image:: img/groups_node_tab.webp Select one or more nodes in the Scene dock and write the group name in the field, then click Add. -.. image:: img/groups_add_node_to_group.png +.. image:: img/groups_add_node_to_group.webp You should now see the group appear. -.. image:: img/groups_node_after_adding.png +.. image:: img/groups_node_after_adding.webp In a complex project, you may end up with many groups or large scenes with many nodes. You can add or remove any node to groups using the Group Editor window. To access it, click the Manage Groups button. -.. image:: img/groups_manage_groups_button.png +.. image:: img/groups_manage_groups_button.webp The Group Editor window appears. Here's a screenshot from a complex project to illustrate the tool's purpose. -.. image:: img/groups_group_editor_window.png +.. image:: img/groups_group_editor_window.webp It has three columns: diff --git a/tutorials/scripting/how_to_read_the_godot_api.rst b/tutorials/scripting/how_to_read_the_godot_api.rst index e164d2e21..b5ac3d6c3 100644 --- a/tutorials/scripting/how_to_read_the_godot_api.rst +++ b/tutorials/scripting/how_to_read_the_godot_api.rst @@ -12,7 +12,7 @@ related to each other, what features they have, and how to use them. Inheritance ----------- -.. image:: img/class_api_inheritance.png +.. image:: img/class_api_inheritance.webp At the top of each file, you will see the name of the class. @@ -25,7 +25,7 @@ current class. Here ``Control`` and ``Node2D`` both inherit ``CanvasItem``. Brief Description ----------------- -.. image:: img/class_api_brief_description.png +.. image:: img/class_api_brief_description.webp Next a brief description of the class. This text appears in Godot Editor popups for creating Nodes, Resources, and other types. @@ -33,7 +33,7 @@ popups for creating Nodes, Resources, and other types. Description ----------- -.. image:: img/class_api_description.png +.. image:: img/class_api_description.webp Next a more detailed description the class, its features, and its use case(s). @@ -52,7 +52,7 @@ Things you may find here: Tutorials --------- -.. image:: img/class_api_tutorials.png +.. image:: img/class_api_tutorials.webp The page then provides links to parts of the manual which mention or make use of the current class. @@ -60,7 +60,7 @@ of the current class. Properties ---------- -.. image:: img/class_api_properties_table.png +.. image:: img/class_api_properties_table.webp The Properties table lists the variables which belong to each instance of the class, also known as the "properties." @@ -79,7 +79,7 @@ Inspector. Methods ------- -.. image:: img/class_api_methods_table.png +.. image:: img/class_api_methods_table.webp The Methods table lists the functions which belong to each instance of the class, also known as the "methods." @@ -102,7 +102,7 @@ Possible qualifiers include... Signals ------- -.. image:: img/class_api_signals.png +.. image:: img/class_api_signals.webp The Signals list details the names and parameters of events which "signal" a change in game state to other class instances. @@ -114,7 +114,7 @@ Each signal also has a detailed explanation of when the signal is emitted. Enumerations ------------ -.. image:: img/class_api_enumerations.png +.. image:: img/class_api_enumerations.webp The Enumerations list details the enumerable data types associated with the current class. @@ -128,7 +128,7 @@ an explanation of its use case(s) and/or affects. Constants --------- -.. image:: img/class_api_constants.png +.. image:: img/class_api_constants.webp The Constants list details named integer constants in the current class. @@ -141,7 +141,7 @@ triggers the notification. Property Descriptions --------------------- -.. image:: img/class_api_property_descriptions.png +.. image:: img/class_api_property_descriptions.webp The Property Descriptions list details everything about each property. @@ -160,7 +160,7 @@ and/or links to relevant parts of the Godot API. Method Descriptions ------------------- -.. image:: img/class_api_method_descriptions.png +.. image:: img/class_api_method_descriptions.webp The Method Descriptions list details everything about each method. diff --git a/tutorials/scripting/img/activescene.png b/tutorials/scripting/img/activescene.png deleted file mode 100644 index c18811a15..000000000 Binary files a/tutorials/scripting/img/activescene.png and /dev/null differ diff --git a/tutorials/scripting/img/activescene.webp b/tutorials/scripting/img/activescene.webp new file mode 100644 index 000000000..de83ea053 Binary files /dev/null and b/tutorials/scripting/img/activescene.webp differ diff --git a/tutorials/scripting/img/autoload_example.png b/tutorials/scripting/img/autoload_example.png deleted file mode 100644 index 1ad8f4ba1..000000000 Binary files a/tutorials/scripting/img/autoload_example.png and /dev/null differ diff --git a/tutorials/scripting/img/autoload_example.webp b/tutorials/scripting/img/autoload_example.webp new file mode 100644 index 000000000..0ab122861 Binary files /dev/null and b/tutorials/scripting/img/autoload_example.webp differ diff --git a/tutorials/scripting/img/autoload_runtime.png b/tutorials/scripting/img/autoload_runtime.png deleted file mode 100644 index a0327b282..000000000 Binary files a/tutorials/scripting/img/autoload_runtime.png and /dev/null differ diff --git a/tutorials/scripting/img/autoload_runtime.webp b/tutorials/scripting/img/autoload_runtime.webp new file mode 100644 index 000000000..2ead7a06f Binary files /dev/null and b/tutorials/scripting/img/autoload_runtime.webp differ diff --git a/tutorials/scripting/img/autoload_script.png b/tutorials/scripting/img/autoload_script.png deleted file mode 100644 index b3f4bcb9b..000000000 Binary files a/tutorials/scripting/img/autoload_script.png and /dev/null differ diff --git a/tutorials/scripting/img/autoload_script.webp b/tutorials/scripting/img/autoload_script.webp new file mode 100644 index 000000000..694ce957a Binary files /dev/null and b/tutorials/scripting/img/autoload_script.webp differ diff --git a/tutorials/scripting/img/autoload_tab.png b/tutorials/scripting/img/autoload_tab.png deleted file mode 100644 index 366865ad5..000000000 Binary files a/tutorials/scripting/img/autoload_tab.png and /dev/null differ diff --git a/tutorials/scripting/img/autoload_tab.webp b/tutorials/scripting/img/autoload_tab.webp new file mode 100644 index 000000000..2419ea54f Binary files /dev/null and b/tutorials/scripting/img/autoload_tab.webp differ diff --git a/tutorials/scripting/img/autoload_tutorial1.png b/tutorials/scripting/img/autoload_tutorial1.png deleted file mode 100644 index fbca25b2f..000000000 Binary files a/tutorials/scripting/img/autoload_tutorial1.png and /dev/null differ diff --git a/tutorials/scripting/img/autoload_tutorial1.webp b/tutorials/scripting/img/autoload_tutorial1.webp new file mode 100644 index 000000000..dcccaacc3 Binary files /dev/null and b/tutorials/scripting/img/autoload_tutorial1.webp differ diff --git a/tutorials/scripting/img/class_api_brief_description.png b/tutorials/scripting/img/class_api_brief_description.png deleted file mode 100644 index 00cd0ebce..000000000 Binary files a/tutorials/scripting/img/class_api_brief_description.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_brief_description.webp b/tutorials/scripting/img/class_api_brief_description.webp new file mode 100644 index 000000000..2852bf586 Binary files /dev/null and b/tutorials/scripting/img/class_api_brief_description.webp differ diff --git a/tutorials/scripting/img/class_api_constants.png b/tutorials/scripting/img/class_api_constants.png deleted file mode 100644 index 1f22c1121..000000000 Binary files a/tutorials/scripting/img/class_api_constants.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_constants.webp b/tutorials/scripting/img/class_api_constants.webp new file mode 100644 index 000000000..a0697de99 Binary files /dev/null and b/tutorials/scripting/img/class_api_constants.webp differ diff --git a/tutorials/scripting/img/class_api_description.png b/tutorials/scripting/img/class_api_description.png deleted file mode 100644 index 85b34423f..000000000 Binary files a/tutorials/scripting/img/class_api_description.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_description.webp b/tutorials/scripting/img/class_api_description.webp new file mode 100644 index 000000000..7a3c6f752 Binary files /dev/null and b/tutorials/scripting/img/class_api_description.webp differ diff --git a/tutorials/scripting/img/class_api_enumerations.png b/tutorials/scripting/img/class_api_enumerations.png deleted file mode 100644 index 1f68d433d..000000000 Binary files a/tutorials/scripting/img/class_api_enumerations.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_enumerations.webp b/tutorials/scripting/img/class_api_enumerations.webp new file mode 100644 index 000000000..3585c15d2 Binary files /dev/null and b/tutorials/scripting/img/class_api_enumerations.webp differ diff --git a/tutorials/scripting/img/class_api_inheritance.png b/tutorials/scripting/img/class_api_inheritance.png deleted file mode 100644 index e4e02f8f0..000000000 Binary files a/tutorials/scripting/img/class_api_inheritance.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_inheritance.webp b/tutorials/scripting/img/class_api_inheritance.webp new file mode 100644 index 000000000..5a01e65f8 Binary files /dev/null and b/tutorials/scripting/img/class_api_inheritance.webp differ diff --git a/tutorials/scripting/img/class_api_method_descriptions.png b/tutorials/scripting/img/class_api_method_descriptions.png deleted file mode 100644 index aa6c7272d..000000000 Binary files a/tutorials/scripting/img/class_api_method_descriptions.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_method_descriptions.webp b/tutorials/scripting/img/class_api_method_descriptions.webp new file mode 100644 index 000000000..6ee6e2996 Binary files /dev/null and b/tutorials/scripting/img/class_api_method_descriptions.webp differ diff --git a/tutorials/scripting/img/class_api_methods_table.png b/tutorials/scripting/img/class_api_methods_table.png deleted file mode 100644 index e966b4dbd..000000000 Binary files a/tutorials/scripting/img/class_api_methods_table.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_methods_table.webp b/tutorials/scripting/img/class_api_methods_table.webp new file mode 100644 index 000000000..3d1f49e42 Binary files /dev/null and b/tutorials/scripting/img/class_api_methods_table.webp differ diff --git a/tutorials/scripting/img/class_api_properties_table.png b/tutorials/scripting/img/class_api_properties_table.png deleted file mode 100644 index 90df19d29..000000000 Binary files a/tutorials/scripting/img/class_api_properties_table.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_properties_table.webp b/tutorials/scripting/img/class_api_properties_table.webp new file mode 100644 index 000000000..7370e5dbf Binary files /dev/null and b/tutorials/scripting/img/class_api_properties_table.webp differ diff --git a/tutorials/scripting/img/class_api_property_descriptions.png b/tutorials/scripting/img/class_api_property_descriptions.png deleted file mode 100644 index 3306d9966..000000000 Binary files a/tutorials/scripting/img/class_api_property_descriptions.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_property_descriptions.webp b/tutorials/scripting/img/class_api_property_descriptions.webp new file mode 100644 index 000000000..e71b878ba Binary files /dev/null and b/tutorials/scripting/img/class_api_property_descriptions.webp differ diff --git a/tutorials/scripting/img/class_api_signals.png b/tutorials/scripting/img/class_api_signals.png deleted file mode 100644 index dd429e259..000000000 Binary files a/tutorials/scripting/img/class_api_signals.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_signals.webp b/tutorials/scripting/img/class_api_signals.webp new file mode 100644 index 000000000..7c4d4aafb Binary files /dev/null and b/tutorials/scripting/img/class_api_signals.webp differ diff --git a/tutorials/scripting/img/class_api_tutorials.png b/tutorials/scripting/img/class_api_tutorials.png deleted file mode 100644 index 4ad472863..000000000 Binary files a/tutorials/scripting/img/class_api_tutorials.png and /dev/null differ diff --git a/tutorials/scripting/img/class_api_tutorials.webp b/tutorials/scripting/img/class_api_tutorials.webp new file mode 100644 index 000000000..ab0d13526 Binary files /dev/null and b/tutorials/scripting/img/class_api_tutorials.webp differ diff --git a/tutorials/scripting/img/groups_add_node_to_group.png b/tutorials/scripting/img/groups_add_node_to_group.png deleted file mode 100644 index 7a0f6efeb..000000000 Binary files a/tutorials/scripting/img/groups_add_node_to_group.png and /dev/null differ diff --git a/tutorials/scripting/img/groups_add_node_to_group.webp b/tutorials/scripting/img/groups_add_node_to_group.webp new file mode 100644 index 000000000..93fcace00 Binary files /dev/null and b/tutorials/scripting/img/groups_add_node_to_group.webp differ diff --git a/tutorials/scripting/img/groups_group_editor_window.png b/tutorials/scripting/img/groups_group_editor_window.png deleted file mode 100644 index cfc0272b5..000000000 Binary files a/tutorials/scripting/img/groups_group_editor_window.png and /dev/null differ diff --git a/tutorials/scripting/img/groups_group_editor_window.webp b/tutorials/scripting/img/groups_group_editor_window.webp new file mode 100644 index 000000000..5ff5ee8b1 Binary files /dev/null and b/tutorials/scripting/img/groups_group_editor_window.webp differ diff --git a/tutorials/scripting/img/groups_manage_groups_button.png b/tutorials/scripting/img/groups_manage_groups_button.png deleted file mode 100644 index f35a3c2cb..000000000 Binary files a/tutorials/scripting/img/groups_manage_groups_button.png and /dev/null differ diff --git a/tutorials/scripting/img/groups_manage_groups_button.webp b/tutorials/scripting/img/groups_manage_groups_button.webp new file mode 100644 index 000000000..fd754dd6a Binary files /dev/null and b/tutorials/scripting/img/groups_manage_groups_button.webp differ diff --git a/tutorials/scripting/img/groups_node_after_adding.png b/tutorials/scripting/img/groups_node_after_adding.png deleted file mode 100644 index 7220854a9..000000000 Binary files a/tutorials/scripting/img/groups_node_after_adding.png and /dev/null differ diff --git a/tutorials/scripting/img/groups_node_after_adding.webp b/tutorials/scripting/img/groups_node_after_adding.webp new file mode 100644 index 000000000..9dad5135c Binary files /dev/null and b/tutorials/scripting/img/groups_node_after_adding.webp differ diff --git a/tutorials/scripting/img/groups_node_tab.png b/tutorials/scripting/img/groups_node_tab.png deleted file mode 100644 index 5ce280615..000000000 Binary files a/tutorials/scripting/img/groups_node_tab.png and /dev/null differ diff --git a/tutorials/scripting/img/groups_node_tab.webp b/tutorials/scripting/img/groups_node_tab.webp new file mode 100644 index 000000000..c7b64aa89 Binary files /dev/null and b/tutorials/scripting/img/groups_node_tab.webp differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_player_scene_example.png b/tutorials/scripting/img/nodes_and_scene_instances_player_scene_example.png deleted file mode 100644 index c8d9f5357..000000000 Binary files a/tutorials/scripting/img/nodes_and_scene_instances_player_scene_example.png and /dev/null differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_player_scene_example.webp b/tutorials/scripting/img/nodes_and_scene_instances_player_scene_example.webp new file mode 100644 index 000000000..01ce527ce Binary files /dev/null and b/tutorials/scripting/img/nodes_and_scene_instances_player_scene_example.webp differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_no_sprite.png b/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_no_sprite.png deleted file mode 100644 index d6ed475f9..000000000 Binary files a/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_no_sprite.png and /dev/null differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_no_sprite.webp b/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_no_sprite.webp new file mode 100644 index 000000000..d6016d6b4 Binary files /dev/null and b/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_no_sprite.webp differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_with_sprite.png b/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_with_sprite.png deleted file mode 100644 index 15eb66bf3..000000000 Binary files a/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_with_sprite.png and /dev/null differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_with_sprite.webp b/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_with_sprite.webp new file mode 100644 index 000000000..dfb2d79dd Binary files /dev/null and b/tutorials/scripting/img/nodes_and_scene_instances_remote_tree_with_sprite.webp differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_sprite_node.png b/tutorials/scripting/img/nodes_and_scene_instances_sprite_node.png deleted file mode 100644 index c2cf7ccaa..000000000 Binary files a/tutorials/scripting/img/nodes_and_scene_instances_sprite_node.png and /dev/null differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_sprite_node.webp b/tutorials/scripting/img/nodes_and_scene_instances_sprite_node.webp new file mode 100644 index 000000000..2138a8966 Binary files /dev/null and b/tutorials/scripting/img/nodes_and_scene_instances_sprite_node.webp differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_sprite_node_renamed.png b/tutorials/scripting/img/nodes_and_scene_instances_sprite_node_renamed.png deleted file mode 100644 index e952b3f44..000000000 Binary files a/tutorials/scripting/img/nodes_and_scene_instances_sprite_node_renamed.png and /dev/null differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_sprite_node_renamed.webp b/tutorials/scripting/img/nodes_and_scene_instances_sprite_node_renamed.webp new file mode 100644 index 000000000..b4e20858a Binary files /dev/null and b/tutorials/scripting/img/nodes_and_scene_instances_sprite_node_renamed.webp differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_ui_scene_example.png b/tutorials/scripting/img/nodes_and_scene_instances_ui_scene_example.png deleted file mode 100644 index 0d26ef82d..000000000 Binary files a/tutorials/scripting/img/nodes_and_scene_instances_ui_scene_example.png and /dev/null differ diff --git a/tutorials/scripting/img/nodes_and_scene_instances_ui_scene_example.webp b/tutorials/scripting/img/nodes_and_scene_instances_ui_scene_example.webp new file mode 100644 index 000000000..a5c148154 Binary files /dev/null and b/tutorials/scripting/img/nodes_and_scene_instances_ui_scene_example.webp differ diff --git a/tutorials/scripting/img/nodes_resources.png b/tutorials/scripting/img/nodes_resources.png deleted file mode 100644 index a57f711b6..000000000 Binary files a/tutorials/scripting/img/nodes_resources.png and /dev/null differ diff --git a/tutorials/scripting/img/nodes_resources.webp b/tutorials/scripting/img/nodes_resources.webp new file mode 100644 index 000000000..5f4a08013 Binary files /dev/null and b/tutorials/scripting/img/nodes_resources.webp differ diff --git a/tutorials/scripting/img/pausemode.png b/tutorials/scripting/img/pausemode.png deleted file mode 100644 index 1fa77d056..000000000 Binary files a/tutorials/scripting/img/pausemode.png and /dev/null differ diff --git a/tutorials/scripting/img/pausemode.webp b/tutorials/scripting/img/pausemode.webp new file mode 100644 index 000000000..9e7e90e67 Binary files /dev/null and b/tutorials/scripting/img/pausemode.webp differ diff --git a/tutorials/scripting/img/percent.png b/tutorials/scripting/img/percent.png deleted file mode 100644 index b702315fa..000000000 Binary files a/tutorials/scripting/img/percent.png and /dev/null differ diff --git a/tutorials/scripting/img/percent.webp b/tutorials/scripting/img/percent.webp new file mode 100644 index 000000000..043b2b807 Binary files /dev/null and b/tutorials/scripting/img/percent.webp differ diff --git a/tutorials/scripting/img/resourcerobi.png b/tutorials/scripting/img/resourcerobi.png deleted file mode 100644 index f69045136..000000000 Binary files a/tutorials/scripting/img/resourcerobi.png and /dev/null differ diff --git a/tutorials/scripting/img/resourcerobi.webp b/tutorials/scripting/img/resourcerobi.webp new file mode 100644 index 000000000..a5488c1c5 Binary files /dev/null and b/tutorials/scripting/img/resourcerobi.webp differ diff --git a/tutorials/scripting/img/script_create_dialog_custom_templates.png b/tutorials/scripting/img/script_create_dialog_custom_templates.png deleted file mode 100644 index 8684898c5..000000000 Binary files a/tutorials/scripting/img/script_create_dialog_custom_templates.png and /dev/null differ diff --git a/tutorials/scripting/img/script_create_dialog_custom_templates.webp b/tutorials/scripting/img/script_create_dialog_custom_templates.webp new file mode 100644 index 000000000..2a4843aec Binary files /dev/null and b/tutorials/scripting/img/script_create_dialog_custom_templates.webp differ diff --git a/tutorials/scripting/img/script_create_dialog_templates.png b/tutorials/scripting/img/script_create_dialog_templates.png deleted file mode 100644 index 8c7240680..000000000 Binary files a/tutorials/scripting/img/script_create_dialog_templates.png and /dev/null differ diff --git a/tutorials/scripting/img/script_create_dialog_templates.webp b/tutorials/scripting/img/script_create_dialog_templates.webp new file mode 100644 index 000000000..a0c2d9f67 Binary files /dev/null and b/tutorials/scripting/img/script_create_dialog_templates.webp differ diff --git a/tutorials/scripting/img/singleton.png b/tutorials/scripting/img/singleton.png deleted file mode 100644 index fb6f49ffa..000000000 Binary files a/tutorials/scripting/img/singleton.png and /dev/null differ diff --git a/tutorials/scripting/img/singleton.webp b/tutorials/scripting/img/singleton.webp new file mode 100644 index 000000000..ad56c7e73 Binary files /dev/null and b/tutorials/scripting/img/singleton.webp differ diff --git a/tutorials/scripting/img/spriteprop.png b/tutorials/scripting/img/spriteprop.png deleted file mode 100644 index f7cfa1b80..000000000 Binary files a/tutorials/scripting/img/spriteprop.png and /dev/null differ diff --git a/tutorials/scripting/img/spriteprop.webp b/tutorials/scripting/img/spriteprop.webp new file mode 100644 index 000000000..d8f76e290 Binary files /dev/null and b/tutorials/scripting/img/spriteprop.webp differ diff --git a/tutorials/scripting/img/toptobottom.png b/tutorials/scripting/img/toptobottom.png deleted file mode 100644 index bd2232dcd..000000000 Binary files a/tutorials/scripting/img/toptobottom.png and /dev/null differ diff --git a/tutorials/scripting/img/toptobottom.webp b/tutorials/scripting/img/toptobottom.webp new file mode 100644 index 000000000..8950336f2 Binary files /dev/null and b/tutorials/scripting/img/toptobottom.webp differ diff --git a/tutorials/scripting/img/unique_name.png b/tutorials/scripting/img/unique_name.png deleted file mode 100644 index bcbdcc9cb..000000000 Binary files a/tutorials/scripting/img/unique_name.png and /dev/null differ diff --git a/tutorials/scripting/img/unique_name.webp b/tutorials/scripting/img/unique_name.webp new file mode 100644 index 000000000..4c1f65224 Binary files /dev/null and b/tutorials/scripting/img/unique_name.webp differ diff --git a/tutorials/scripting/img/unique_name_scene_instance_example.png b/tutorials/scripting/img/unique_name_scene_instance_example.png deleted file mode 100644 index 3d5145ab7..000000000 Binary files a/tutorials/scripting/img/unique_name_scene_instance_example.png and /dev/null differ diff --git a/tutorials/scripting/img/unique_name_scene_instance_example.webp b/tutorials/scripting/img/unique_name_scene_instance_example.webp new file mode 100644 index 000000000..a9d52fbb9 Binary files /dev/null and b/tutorials/scripting/img/unique_name_scene_instance_example.webp differ diff --git a/tutorials/scripting/nodes_and_scene_instances.rst b/tutorials/scripting/nodes_and_scene_instances.rst index 2359d8f90..ca3ab7ee0 100644 --- a/tutorials/scripting/nodes_and_scene_instances.rst +++ b/tutorials/scripting/nodes_and_scene_instances.rst @@ -17,7 +17,7 @@ guarantees that. If, for example, you have a scene tree like this, and you want to get a reference to the Sprite2D and Camera2D nodes to access them in your script. -.. image:: img/nodes_and_scene_instances_player_scene_example.png +.. image:: img/nodes_and_scene_instances_player_scene_example.webp To do so, you can use the following code. @@ -28,7 +28,7 @@ To do so, you can use the following code. var camera2d func _ready(): - sprite2d = get_node("Sprite") + sprite2d = get_node("Sprite2D") camera2d = get_node("Camera2D") .. code-tab:: csharp @@ -40,19 +40,19 @@ To do so, you can use the following code. { base._Ready(); - _sprite2D = GetNode("Sprite"); + _sprite2D = GetNode("Sprite2D"); _camera2D = GetNode("Camera2D"); } Note that you get nodes using their name, not their type. Above, "Sprite2D" and "Camera2D" are the nodes' names in the scene. -.. image:: img/nodes_and_scene_instances_sprite_node.png +.. image:: img/nodes_and_scene_instances_sprite_node.webp If you rename the Sprite2D node as Skin in the Scene dock, you have to change the line that gets the node to ``get_node("Skin")`` in the script. -.. image:: img/nodes_and_scene_instances_sprite_node_renamed.png +.. image:: img/nodes_and_scene_instances_sprite_node_renamed.webp Node paths ---------- @@ -64,27 +64,27 @@ separate nodes. Take the following example scene, with the script attached to the UserInterface node. -.. image:: img/nodes_and_scene_instances_ui_scene_example.png +.. image:: img/nodes_and_scene_instances_ui_scene_example.webp -To get the Tween node, you would use the following code. +To get the AnimationPlayer node, you would use the following code. .. tabs:: .. code-tab:: gdscript GDScript - var tween + var animation_player func _ready(): - tween = get_node("ShieldBar/Tween") + animation_player = get_node("ShieldBar/AnimationPlayer") .. code-tab:: csharp - private Tween _tween; + private AnimationPlayer _animationPlayer; public override void _Ready() { base._Ready(); - _tween = GetNode("ShieldBar/Tween"); + _animationPlayer = GetNode("ShieldBar/AnimationPlayer"); } .. note:: As with file paths, you can use ".." to get a parent node. The best @@ -110,7 +110,7 @@ place it before the name or path of the node you want to get. .. code-block:: gdscript @onready var sprite2d = $Sprite2D - @onready var tween = $ShieldBar/Tween + @onready var animation_player = $ShieldBar/AnimationPlayer Creating nodes -------------- @@ -159,12 +159,12 @@ the scene and frees the object in memory. Before calling ``sprite2d.queue_free()``, the remote scene tree looks like this. -.. image:: img/nodes_and_scene_instances_remote_tree_with_sprite.png +.. image:: img/nodes_and_scene_instances_remote_tree_with_sprite.webp After the engine freed the node, the remote scene tree doesn't display the sprite anymore. -.. image:: img/nodes_and_scene_instances_remote_tree_no_sprite.png +.. image:: img/nodes_and_scene_instances_remote_tree_no_sprite.webp You can alternatively call ``free()`` to immediately destroy the node. You should do this with care as any reference to it will instantly become ``null``. diff --git a/tutorials/scripting/pausing_games.rst b/tutorials/scripting/pausing_games.rst index f18f85469..807513692 100644 --- a/tutorials/scripting/pausing_games.rst +++ b/tutorials/scripting/pausing_games.rst @@ -40,7 +40,7 @@ Process Modes Each node in Godot has a "Process Mode" that defines when it processes. It can be found and changed under a node's :ref:`Node ` properties in the inspector. -.. image:: img/pausemode.png +.. image:: img/pausemode.webp You can also alter the property with code: diff --git a/tutorials/scripting/resources.rst b/tutorials/scripting/resources.rst index f712419b1..6df993fb2 100644 --- a/tutorials/scripting/resources.rst +++ b/tutorials/scripting/resources.rst @@ -37,7 +37,7 @@ types of Properties, like String, integer, Vector2, etc., and any of these types can become a resource. This means that both nodes and resources can contain resources as properties: -.. image:: img/nodes_resources.png +.. image:: img/nodes_resources.webp External vs built-in -------------------- @@ -50,11 +50,11 @@ There are two ways to save resources. They can be: To be more specific, here's a :ref:`Texture2D ` in a :ref:`Sprite2D ` node: -.. image:: img/spriteprop.png +.. image:: img/spriteprop.webp -Clicking the resource preview allows us to view and edit the resource's properties. +Clicking the resource preview allows us to view the resource's properties. -.. image:: img/resourcerobi.png +.. image:: img/resourcerobi.webp The path property tells us where the resource comes from. In this case, it comes from a PNG image called ``robi.png``. When the resource comes from a file like diff --git a/tutorials/scripting/scene_tree.rst b/tutorials/scripting/scene_tree.rst index 12028b726..943230efc 100644 --- a/tutorials/scripting/scene_tree.rst +++ b/tutorials/scripting/scene_tree.rst @@ -95,7 +95,7 @@ viewport, it becomes part of the *scene tree*. This means that as explained in previous tutorials, it will get the ``_enter_tree()`` and ``_ready()`` callbacks (as well as ``_exit_tree()``). -.. image:: img/activescene.png +.. image:: img/activescene.webp When nodes enter the *Scene Tree*, they become active. They get access to everything they need to process, get input, display 2D and 3D visuals, @@ -113,7 +113,7 @@ on. However, children of a node will get called before their parent, also in top to bottom order. So the top child node of the top node will get its ``_ready()`` function called first. -.. image:: img/toptobottom.png +.. image:: img/toptobottom.webp This can also be overridden using the ``process_priority`` node property. Nodes with a lower number are called first. For example, nodes with the diff --git a/tutorials/scripting/scene_unique_nodes.rst b/tutorials/scripting/scene_unique_nodes.rst index b7cd2d033..3b7ca0c02 100644 --- a/tutorials/scripting/scene_unique_nodes.rst +++ b/tutorials/scripting/scene_unique_nodes.rst @@ -21,12 +21,12 @@ Creation and usage In the Scene tree dock, right-click on a node and select **Access as Unique Name** in the context menu. -.. image:: img/unique_name.png +.. image:: img/unique_name.webp After selecting the option, the node will now have a percent symbol (**%**) next to its name in the scene tree: -.. image:: img/percent.png +.. image:: img/percent.webp You can now use the node in your script. For example, you can reference it with a ``get_node()`` method call by typing the % symbol, followed by the node's @@ -50,7 +50,7 @@ A scene unique node can only be retrieved by a node inside the same scene. To demonstrate this limitation, consider this example **Player** scene that instances a **Sword** scene: -.. image:: img/unique_name_scene_instance_example.png +.. image:: img/unique_name_scene_instance_example.webp Here are the results of ``get_node()`` calls inside the **Player** script: diff --git a/tutorials/scripting/singletons_autoload.rst b/tutorials/scripting/singletons_autoload.rst index 2d32478d9..76919be38 100644 --- a/tutorials/scripting/singletons_autoload.rst +++ b/tutorials/scripting/singletons_autoload.rst @@ -58,12 +58,12 @@ You can create an AutoLoad to load a scene or a script that inherits from attached to it. This node will be added to the root viewport before any other scenes are loaded. -.. image:: img/singleton.png +.. image:: img/singleton.webp To autoload a scene or script, select **Project > Project Settings** from the menu and switch to the **AutoLoad** tab. -.. image:: img/autoload_tab.png +.. image:: img/autoload_tab.webp Here you can add any number of scenes or scripts. Each entry in the list requires a name, which is assigned as the node's ``name`` property. The order of @@ -71,7 +71,7 @@ the entries as they are added to the global scene tree can be manipulated using the up/down arrow keys. Like regular scenes, the engine will read these nodes in top-to-bottom order. -.. image:: img/autoload_example.png +.. image:: img/autoload_example.webp This means that any node can access a singleton named "PlayerVariables" with: @@ -103,7 +103,7 @@ Note that autoload objects (scripts and/or scenes) are accessed just like any other node in the scene tree. In fact, if you look at the running scene tree, you'll see the autoloaded nodes appear: -.. image:: img/autoload_runtime.png +.. image:: img/autoload_runtime.webp .. warning:: @@ -127,26 +127,26 @@ scene contains a label displaying the scene name and a button with its ``pressed()`` signal connected. When you run the project, it starts in ``Scene1.tscn``. However, pressing the button does nothing. -Global.gd -~~~~~~~~~ +Creating the script +~~~~~~~~~~~~~~~~~~~~~ -Switch to the **Script** tab and create a new script called ``Global.gd``. +Open the **Script** window and create a new script called ``global.gd``. Make sure it inherits from ``Node``: -.. image:: img/autoload_script.png +.. image:: img/autoload_script.webp The next step is to add this script to the autoLoad list. Open **Project > Project Settings** from the menu, switch to the **AutoLoad** tab and select the script by clicking the browse button or typing its path: -``res://Global.gd``. Press **Add** to add it to the autoload list: +``res://global.gd``. Press **Add** to add it to the autoload list: -.. image:: img/autoload_tutorial1.png +.. image:: img/autoload_tutorial1.webp Now whenever we run any scene in the project, this script will always be loaded. Returning to the script, it needs to fetch the current scene in the `_ready()` function. Both the current scene (the one with the button) and -``Global.gd`` are children of root, but autoloaded nodes are always first. This +``global.gd`` are children of root, but autoloaded nodes are always first. This means that the last child of root is always the loaded scene. .. tabs::