mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Added new condition to check the zoom of a camera of a layer (#6747)
This commit is contained in:
@@ -327,6 +327,25 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(
|
||||
.AddParameter("expression", _("Camera number (default : 0)"), "", true)
|
||||
.SetDefaultValue("0");
|
||||
|
||||
extension
|
||||
.AddCondition(
|
||||
"CameraZoom",
|
||||
_("Camera zoom"),
|
||||
_("Compare the zoom of a camera of a layer."),
|
||||
_("Zoom of camera _PARAM2_ of layer _PARAM1_"),
|
||||
"",
|
||||
"res/conditions/camera24.png",
|
||||
"res/conditions/camera.png")
|
||||
.AddCodeOnlyParameter("currentScene", "")
|
||||
.AddParameter("layer", _("Layer"), "", true)
|
||||
.SetDefaultValue("\"\"")
|
||||
.AddParameter("expression", _("Camera number (default : 0)"), "", true)
|
||||
.SetDefaultValue("0")
|
||||
.UseStandardRelationalOperatorParameters(
|
||||
"number", gd::ParameterOptions::MakeNewOptions().SetDescription(
|
||||
_("Zoom")))
|
||||
.MarkAsAdvanced();
|
||||
|
||||
extension
|
||||
.AddAction(
|
||||
"FixCamera",
|
||||
|
@@ -69,6 +69,8 @@ CameraExtension::CameraExtension() {
|
||||
.SetGetter("gdjs.evtTools.camera.getCameraRotation");
|
||||
GetAllActions()["ZoomCamera"].SetFunctionName(
|
||||
"gdjs.evtTools.camera.setCameraZoom");
|
||||
GetAllConditions()["CameraZoom"].SetFunctionName(
|
||||
"gdjs.evtTools.camera.getCameraZoom");
|
||||
|
||||
GetAllExpressions()["CameraX"].SetFunctionName(
|
||||
"gdjs.evtTools.camera.getCameraX"); // Deprecated
|
||||
|
Reference in New Issue
Block a user