diff --git a/.vscode/GDevelopExtensions.code-snippets b/.vscode/GDevelopExtensions.code-snippets
index 3f153bd3941d..db5ce5c3865a 100644
--- a/.vscode/GDevelopExtensions.code-snippets
+++ b/.vscode/GDevelopExtensions.code-snippets
@@ -107,7 +107,7 @@
"description": "Define a parameter in a GDevelop extension definition.",
"prefix": "gdparam",
"body": [
- ".addParameter('${1|string,expression,object,behavior,yesorno,stringWithSelector,scenevar,globalvar,objectvar,objectList,objectListWithoutPicking,color,key,sceneName,file,layer,relationalOperator,operator,trueorfalse,musicfile,soundfile,police,mouse,passwordjoyaxis,camera,objectPtr,forceMultiplier|}', '${2:Parameter description}', '${3:Optional parameter data}', /*parameterIsOptional=*/${4|false,true|})"
+ ".addParameter('${1|string,expression,object,behavior,yesorno,stringWithSelector,scenevar,globalvar,objectvar,objectList,objectListWithoutPicking,color,key,sceneName,file,layer,relationalOperator,operator,trueorfalse,musicfile,soundfile,mouse,passwordjoyaxis,camera,objectPtr,forceMultiplier|}', '${2:Parameter description}', '${3:Optional parameter data}', /*parameterIsOptional=*/${4|false,true|})"
]
},
"Add code only parameter": {
diff --git a/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.cpp b/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.cpp
index 185f87becf6f..cb2aaa73b9d2 100644
--- a/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.cpp
+++ b/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.cpp
@@ -77,11 +77,11 @@ gd::String EventsCodeGenerator::GenerateRelationalOperatorCall(
/**
* @brief Generate a relational operation
- *
+ *
* @param relationalOperator the operator
* @param lhs the left hand operand
* @param rhs the right hand operand
- * @return gd::String
+ * @return gd::String
*/
gd::String EventsCodeGenerator::GenerateRelationalOperation(
const gd::String& relationalOperator,
@@ -828,7 +828,7 @@ gd::String EventsCodeGenerator::GenerateParameterCodes(
metadata.GetType() == "spineResource" ||
// Deprecated, old parameter names:
metadata.GetType() == "password" || metadata.GetType() == "musicfile" ||
- metadata.GetType() == "soundfile" || metadata.GetType() == "police") {
+ metadata.GetType() == "soundfile") {
argOutput = "\"" + ConvertToString(parameter.GetPlainString()) + "\"";
} else if (metadata.GetType() == "mouse") {
argOutput = "\"" + ConvertToString(parameter.GetPlainString()) + "\"";
@@ -1007,7 +1007,7 @@ gd::String EventsCodeGenerator::GenerateEventsListCode(
output += "\n" + scopeBegin + "\n" + declarationsCode + "\n" +
eventCoreCode + "\n" + scopeEnd + "\n";
-
+
if (event.HasVariables()) {
GetProjectScopedContainers().GetVariablesContainersList().Pop();
}
diff --git a/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.h b/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.h
index 9351cd00c1c3..bc942c59a2ea 100644
--- a/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.h
+++ b/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.h
@@ -528,7 +528,7 @@ class GD_CORE_API EventsCodeGenerator {
parameter -> string
* - operator : Used to update a value using a setter and a getter -> string
* - key, mouse, objectvar, scenevar, globalvar, password, musicfile,
- soundfile, police -> string
+ soundfile -> string
* - trueorfalse, yesorno -> boolean ( See GenerateTrue/GenerateFalse ).
*
*
@@ -849,7 +849,7 @@ class GD_CORE_API EventsCodeGenerator {
instructionUniqueIds; ///< The unique ids generated for instructions.
size_t eventsListNextUniqueId; ///< The next identifier to use for an events
///< list function name.
-
+
gd::DiagnosticReport* diagnosticReport;
};
diff --git a/Core/GDCore/IDE/Project/ArbitraryResourceWorker.cpp b/Core/GDCore/IDE/Project/ArbitraryResourceWorker.cpp
index 03c5efb5dec0..198ee881dde1 100644
--- a/Core/GDCore/IDE/Project/ArbitraryResourceWorker.cpp
+++ b/Core/GDCore/IDE/Project/ArbitraryResourceWorker.cpp
@@ -225,9 +225,7 @@ bool ResourceWorkerInEventsWorker::DoVisitInstruction(gd::Instruction& instructi
size_t parameterIndex,
const gd::String& lastObjectName) {
const String& parameterValue = parameterExpression.GetPlainString();
- if (parameterMetadata.GetType() ==
- "police" || // Should be renamed fontResource
- parameterMetadata.GetType() == "fontResource") {
+ if (parameterMetadata.GetType() == "fontResource") {
gd::String updatedParameterValue = parameterValue;
worker.ExposeFont(updatedParameterValue);
instruction.SetParameter(parameterIndex, updatedParameterValue);
diff --git a/Extensions/TextObject/Extension.cpp b/Extensions/TextObject/Extension.cpp
index 1dd0143cbde6..bd668dbd5848 100644
--- a/Extensions/TextObject/Extension.cpp
+++ b/Extensions/TextObject/Extension.cpp
@@ -49,7 +49,7 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
"res/actions/font.png")
.AddParameter("object", _("Object"), "Text")
- .AddParameter("police", _("Font"))
+ .AddParameter("fontResource", _("Font resource name"))
.SetFunctionName("ChangeFont");
obj.AddAction(
diff --git a/Extensions/TextObject/JsExtension.cpp b/Extensions/TextObject/JsExtension.cpp
index 50fb98d72f8b..7901ae5be991 100644
--- a/Extensions/TextObject/JsExtension.cpp
+++ b/Extensions/TextObject/JsExtension.cpp
@@ -38,6 +38,9 @@ class TextObjectJsExtension : public gd::PlatformExtension {
GetAllExpressionsForObject("TextObject::Text")["FontSize"]
.SetFunctionName("getCharacterSize");
+ GetAllActionsForObject("TextObject::Text")["TextObject::Font"]
+ .SetFunctionName("setFontName");
+
GetAllActionsForObject("TextObject::Text")["TextObject::SetBold"]
.SetFunctionName("setBold");
GetAllConditionsForObject("TextObject::Text")["TextObject::IsBold"]
@@ -188,8 +191,6 @@ class TextObjectJsExtension : public gd::PlatformExtension {
.SetFunctionName("setShadow");
// Unimplemented actions and conditions:
- GetAllActionsForObject("TextObject::Text")["TextObject::Font"]
- .SetFunctionName("");
GetAllActionsForObject("TextObject::Text")["TextObject::SetUnderlined"]
.SetFunctionName("");
GetAllConditionsForObject("TextObject::Text")["TextObject::IsUnderlined"]
diff --git a/newIDE/app/src/EventsSheet/ParameterRenderingService.js b/newIDE/app/src/EventsSheet/ParameterRenderingService.js
index 66c8d92df9d6..ad70e1de3c11 100644
--- a/newIDE/app/src/EventsSheet/ParameterRenderingService.js
+++ b/newIDE/app/src/EventsSheet/ParameterRenderingService.js
@@ -103,7 +103,6 @@ const components = {
atlasResource: AtlasResourceField,
spineResource: SpineResourceField,
color: ColorExpressionField,
- police: DefaultField, //TODO
forceMultiplier: ForceMultiplierField,
sceneName: SceneNameField,
layerEffectName: LayerEffectNameField,