diff --git a/getting_started/step_by_step/img/signals_01_new_scene.png b/getting_started/step_by_step/img/signals_01_new_scene.png deleted file mode 100644 index a72018df6..000000000 Binary files a/getting_started/step_by_step/img/signals_01_new_scene.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_01_new_scene.webp b/getting_started/step_by_step/img/signals_01_new_scene.webp new file mode 100644 index 000000000..3b397376c Binary files /dev/null and b/getting_started/step_by_step/img/signals_01_new_scene.webp differ diff --git a/getting_started/step_by_step/img/signals_02_2d_scene.png b/getting_started/step_by_step/img/signals_02_2d_scene.png deleted file mode 100644 index b6113054d..000000000 Binary files a/getting_started/step_by_step/img/signals_02_2d_scene.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_02_2d_scene.webp b/getting_started/step_by_step/img/signals_02_2d_scene.webp new file mode 100644 index 000000000..da91e3e4f Binary files /dev/null and b/getting_started/step_by_step/img/signals_02_2d_scene.webp differ diff --git a/getting_started/step_by_step/img/signals_04_add_child_node.png b/getting_started/step_by_step/img/signals_04_add_child_node.png deleted file mode 100644 index c624b3dc9..000000000 Binary files a/getting_started/step_by_step/img/signals_04_add_child_node.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_04_add_child_node.webp b/getting_started/step_by_step/img/signals_04_add_child_node.webp new file mode 100644 index 000000000..cea7e61a3 Binary files /dev/null and b/getting_started/step_by_step/img/signals_04_add_child_node.webp differ diff --git a/getting_started/step_by_step/img/signals_05_add_button.png b/getting_started/step_by_step/img/signals_05_add_button.png deleted file mode 100644 index e16f88966..000000000 Binary files a/getting_started/step_by_step/img/signals_05_add_button.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_05_add_button.webp b/getting_started/step_by_step/img/signals_05_add_button.webp new file mode 100644 index 000000000..07789d613 Binary files /dev/null and b/getting_started/step_by_step/img/signals_05_add_button.webp differ diff --git a/getting_started/step_by_step/img/signals_07_select_tool.png b/getting_started/step_by_step/img/signals_07_select_tool.png deleted file mode 100644 index 223cda2e6..000000000 Binary files a/getting_started/step_by_step/img/signals_07_select_tool.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_07_select_tool.webp b/getting_started/step_by_step/img/signals_07_select_tool.webp new file mode 100644 index 000000000..e489243ae Binary files /dev/null and b/getting_started/step_by_step/img/signals_07_select_tool.webp differ diff --git a/getting_started/step_by_step/img/signals_08_toggle_motion_text.png b/getting_started/step_by_step/img/signals_08_toggle_motion_text.png deleted file mode 100644 index 9d8b14d4f..000000000 Binary files a/getting_started/step_by_step/img/signals_08_toggle_motion_text.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_08_toggle_motion_text.webp b/getting_started/step_by_step/img/signals_08_toggle_motion_text.webp new file mode 100644 index 000000000..759c65333 Binary files /dev/null and b/getting_started/step_by_step/img/signals_08_toggle_motion_text.webp differ diff --git a/getting_started/step_by_step/img/signals_10_node_dock.png b/getting_started/step_by_step/img/signals_10_node_dock.png deleted file mode 100644 index a2dad389b..000000000 Binary files a/getting_started/step_by_step/img/signals_10_node_dock.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_10_node_dock.webp b/getting_started/step_by_step/img/signals_10_node_dock.webp new file mode 100644 index 000000000..a6a5acec3 Binary files /dev/null and b/getting_started/step_by_step/img/signals_10_node_dock.webp differ diff --git a/getting_started/step_by_step/img/signals_11_pressed_signals.png b/getting_started/step_by_step/img/signals_11_pressed_signals.png deleted file mode 100644 index 3b7752b11..000000000 Binary files a/getting_started/step_by_step/img/signals_11_pressed_signals.png and /dev/null differ diff --git a/getting_started/step_by_step/img/signals_11_pressed_signals.webp b/getting_started/step_by_step/img/signals_11_pressed_signals.webp new file mode 100644 index 000000000..1aba6c1ac Binary files /dev/null and b/getting_started/step_by_step/img/signals_11_pressed_signals.webp differ diff --git a/getting_started/step_by_step/signals.rst b/getting_started/step_by_step/signals.rst index dd716253f..e5d737b50 100644 --- a/getting_started/step_by_step/signals.rst +++ b/getting_started/step_by_step/signals.rst @@ -38,19 +38,19 @@ Scene setup ----------- To add a button to our game, we will create a new main scene which will include -both a button and the ``Sprite2D.tscn`` scene that we scripted in previous -lessons. +both a :ref:`Button ` and the ``sprite_2d.tscn`` scene we created in +the :ref:`doc_scripting_first_script` lesson. Create a new scene by going to the menu Scene -> New Scene. -.. image:: img/signals_01_new_scene.png +.. image:: img/signals_01_new_scene.webp -In the Scene dock, click the 2D Scene button. This will add a Node2D as our -root. +In the Scene dock, click the 2D Scene button. This will add +a :ref:`Node2D ` as our root. -.. image:: img/signals_02_2d_scene.png +.. image:: img/signals_02_2d_scene.webp -In the FileSystem dock, click and drag the ``Sprite2D.tscn`` file you saved +In the FileSystem dock, click and drag the ``sprite_2d.tscn`` file you saved previously onto the Node2D to instantiate it. .. image:: img/signals_03_dragging_scene.png @@ -58,11 +58,11 @@ previously onto the Node2D to instantiate it. We want to add another node as a sibling of the Sprite2D. To do so, right-click on Node2D and select Add Child Node. -.. image:: img/signals_04_add_child_node.png +.. image:: img/signals_04_add_child_node.webp -Search for the Button node type and add it. +Search for the :ref:`Button ` node and add it. -.. image:: img/signals_05_add_button.png +.. image:: img/signals_05_add_button.webp The node is small by default. Click and drag on the bottom-right handle of the Button in the viewport to resize it. @@ -71,20 +71,21 @@ Button in the viewport to resize it. If you don't see the handles, ensure the select tool is active in the toolbar. -.. image:: img/signals_07_select_tool.png +.. image:: img/signals_07_select_tool.webp Click and drag on the button itself to move it closer to the sprite. You can also write a label on the Button by editing its Text property in the -Inspector. Enter "Toggle motion". +Inspector. Enter ``Toggle motion``. -.. image:: img/signals_08_toggle_motion_text.png +.. image:: img/signals_08_toggle_motion_text.webp Your scene tree and viewport should look like this. .. image:: img/signals_09_scene_setup.png -Save your newly created scene. You can then run it with :kbd:`F6` (:kbd:`Cmd + R` on macOS). +Save your newly created scene as ``node_2d.tscn``, if you haven't already. +You can then run it with :kbd:`F6` (:kbd:`Cmd + R` on macOS). At the moment, the button will be visible, but nothing will happen if you press it. @@ -99,11 +100,11 @@ lesson. You can connect signals in the Node dock. Select the Button node and, on the right side of the editor, click on the tab named "Node" next to the Inspector. -.. image:: img/signals_10_node_dock.png +.. image:: img/signals_10_node_dock.webp The dock displays a list of signals available on the selected node. -.. image:: img/signals_11_pressed_signals.png +.. image:: img/signals_11_pressed_signals.webp Double-click the "pressed" signal to open the node connection window.