Skip to content

Commit 5db23c5

Browse files
authored
Improve Layers and Camera documentation
1 parent c150f76 commit 5db23c5

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

Core/GDCore/Extensions/Builtin/CameraExtension.cpp

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(
1919
"Each scene can be composed of multiple layers. These conditions "
2020
"and actions allow to manipulate them during the game. In "
2121
"particular, you can move the camera of a layer to center it on an "
22-
"object or a position.",
22+
"object or a position. The zoom of a layer camera (in 2D) or its "
23+
"position in the 3D space (for 3D games) can be changed.\n"
24+
"\n"
25+
"Each layer can be hidden or shown (but layers do not have opacity). "
26+
"Actions/conditions are available to enable/disable 2D/3D effects on "
27+
"layers. Parameters of each effect can be modified with actions.\n",
28+
"\n"
29+
"Each layer can have a time scale applied to it, which can be "
30+
"changed with actions (1: normal speed, 0.5: slow down, 2: double "
31+
"speed, etc...)."
2332
"Florian Rival",
2433
"Open source (MIT License)")
2534
.SetCategory("Camera")
@@ -328,22 +337,21 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(
328337
.SetDefaultValue("0");
329338

330339
extension
331-
.AddCondition(
332-
"CameraZoom",
333-
_("Camera zoom"),
334-
_("Compare the zoom of a camera of a layer."),
335-
_("Zoom of camera _PARAM2_ of layer _PARAM1_"),
336-
"",
337-
"res/conditions/camera24.png",
338-
"res/conditions/camera.png")
340+
.AddCondition("CameraZoom",
341+
_("Camera zoom"),
342+
_("Compare the zoom of a camera of a layer."),
343+
_("Zoom of camera _PARAM2_ of layer _PARAM1_"),
344+
"",
345+
"res/conditions/camera24.png",
346+
"res/conditions/camera.png")
339347
.AddCodeOnlyParameter("currentScene", "")
340348
.AddParameter("layer", _("Layer"), "", true)
341349
.SetDefaultValue("\"\"")
342350
.AddParameter("expression", _("Camera number (default : 0)"), "", true)
343351
.SetDefaultValue("0")
344352
.UseStandardRelationalOperatorParameters(
345-
"number", gd::ParameterOptions::MakeNewOptions().SetDescription(
346-
_("Zoom")))
353+
"number",
354+
gd::ParameterOptions::MakeNewOptions().SetDescription(_("Zoom")))
347355
.MarkAsAdvanced();
348356

349357
extension

0 commit comments

Comments
 (0)