@@ -73,32 +73,33 @@ opening the project, you should see an empty editor.
73
73
.. image :: img/nodes_and_scenes_01_empty_editor.webp
74
74
75
75
In an empty scene, the Scene dock on the left shows several options to add a
76
- root node quickly. " 2D Scene" adds a :ref: `Node2D <class_Node2D >` node,
77
- " 3D Scene" adds a :ref: `Node3D <class_Node3D >` node,
78
- and " User Interface" adds a :ref: `Control <class_Control >` node.
76
+ root node quickly. :button: ` 2D Scene ` adds a :ref: `Node2D <class_Node2D >` node,
77
+ :button: ` 3D Scene ` adds a :ref: `Node3D <class_Node3D >` node,
78
+ and :button: ` User Interface ` adds a :ref: `Control <class_Control >` node.
79
79
These presets are here for convenience; they are not mandatory.
80
- " Other Node" lets you select any node to be the root node.
81
- In an empty scene, " Other Node" is equivalent to pressing the " Add Child Node"
80
+ :button: ` Other Node ` lets you select any node to be the root node.
81
+ In an empty scene, :button: ` Other Node ` is equivalent to pressing the :button: ` Add Child Node `
82
82
button at the top-left of the Scene dock, which usually adds
83
83
a new node as a child of the currently selected node.
84
84
85
85
We're going to add a single :ref: `Label <class_Label >` node to our scene. Its function is to draw
86
86
text on the screen.
87
87
88
- Press the "Add Child Node" button or "Other Node" to create a root node.
88
+ Press the :button: `Add Child Node ` button or :button: `Other Node ` to create a
89
+ root node.
89
90
90
91
.. image :: img/nodes_and_scenes_02_scene_dock.webp
91
92
92
- The Create Node dialog opens, showing the long list of available nodes.
93
+ The :ui: ` Create New Node ` dialog opens, showing the long list of available nodes.
93
94
94
95
.. image :: img/nodes_and_scenes_03_create_node_window.webp
95
96
96
97
Select the Label node. You can type its name to filter down the list.
97
98
98
99
.. image :: img/nodes_and_scenes_04_create_label_window.webp
99
100
100
- Click on the Label node to select it and click the Create button at the bottom
101
- of the window.
101
+ Click on the Label node to select it and click the :button: ` Create ` button at
102
+ the bottom of the window.
102
103
103
104
.. image :: img/nodes_and_scenes_05_editor_with_label.webp
104
105
@@ -110,11 +111,11 @@ and the node's properties appear in the Inspector dock on the right.
110
111
Changing a node's properties
111
112
----------------------------
112
113
113
- The next step is to change the Label's " Text" property. Let's change it to
114
- "Hello World".
114
+ The next step is to change the Label's :uiproperty: ` Text ` property. Let's change
115
+ it to "Hello World".
115
116
116
117
Head to the Inspector dock on the right of the viewport. Click inside the field
117
- below the Text property and type "Hello World".
118
+ below the :uiproperty: ` Text ` property and type "Hello World".
118
119
119
120
.. image :: img/nodes_and_scenes_06_label_text.webp
120
121
@@ -137,17 +138,18 @@ move it to the center of the view delimited by the rectangle.
137
138
Running the scene
138
139
-----------------
139
140
140
- Everything's ready to run the scene! Press the **Run Current Scene ** button in
141
- the top-right of the screen or press :kbd: `F6 ` (:kbd: `Cmd + R ` on macOS).
141
+ Everything's ready to run the scene! Press the :button: `Run Current Scene `
142
+ button in the top-right of the screen or press :kbd: `F6 ` (:kbd: `Cmd + R ` on
143
+ macOS).
142
144
143
145
.. image :: img/nodes_and_scenes_09_play_scene_button.webp
144
146
145
- A popup invites you to save the scene, which is required to run it.
146
- Click the Save button in the file browser to save it as ``label.tscn ``.
147
+ A popup invites you to save the scene, which is required to run it. Click the
148
+ :button: ` Save ` button in the file browser to save it as ``label.tscn ``.
147
149
148
150
.. image :: img/nodes_and_scenes_10_save_scene_as.webp
149
151
150
- .. note :: The Save Scene As dialog, like other file dialogs in the editor, only
152
+ .. note :: The :ui:` Save Scene As` dialog, like other file dialogs in the editor, only
151
153
allows you to save files inside the project. The ``res:// `` path at
152
154
the top of the window represents the project's root directory and
153
155
stands for "resource path". For more information about file paths in
@@ -162,8 +164,8 @@ Close the window or press :kbd:`F8` (:kbd:`Cmd + .` on macOS) to quit the runnin
162
164
Setting the main scene
163
165
----------------------
164
166
165
- To run our test scene, we used the ** Run Current Scene ** button. Another button
166
- next to it, ** Run Project ** , allows you to set and run the project's
167
+ To run our test scene, we used the :button: ` Run Current Scene ` button. Another button
168
+ next to it, :button: ` Run Project ` , allows you to set and run the project's
167
169
**main scene **. You can also press :kbd: `F5 ` (:kbd: `Cmd + B ` on macOS) to do so.
168
170
169
171
.. image :: img/nodes_and_scenes_12_play_button.webp
@@ -176,8 +178,8 @@ A popup window appears and invites you to select the main scene.
176
178
177
179
.. image :: img/nodes_and_scenes_13_main_scene_popup.webp
178
180
179
- Click the Select button, and in the file dialog that appears, double click on
180
- ``label.tscn ``.
181
+ Click the :button: ` Select ` button, and in the file dialog that appears, double
182
+ click on ``label.tscn ``.
181
183
182
184
.. image :: img/nodes_and_scenes_14_select_main_scene.webp
183
185
@@ -186,9 +188,8 @@ will use this scene as a starting point.
186
188
187
189
.. note :: The editor saves the main scene's path in a project.godot file in your
188
190
project's directory. While you can edit this text file directly to
189
- change project settings, you can also use the "Project -> Project
190
- Settings" window to do so. For more information, see
191
- :ref: `doc_project_settings `.
191
+ change project settings, you can also use the :menu: `Project > Project Settings `
192
+ window to do so. For more information, see :ref: `doc_project_settings `.
192
193
193
194
In the next part, we will discuss another key concept in games and in Godot:
194
195
creating instances of a scene.
0 commit comments