diff --git a/Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp b/Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp index 2426aa43aa74..7edd01ffd7c7 100644 --- a/Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinAdvanced", - _("Advanced control features"), - _("Built-in extension providing advanced control features."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinAdvanced", + _("Advanced control features"), + _("Built-in extension providing advanced control features."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/AudioExtension.cpp b/Core/GDCore/Extensions/Builtin/AudioExtension.cpp index f58591f4beb6..51c35ff002a8 100644 --- a/Core/GDCore/Extensions/Builtin/AudioExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/AudioExtension.cpp @@ -11,11 +11,13 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation("BuiltinAudio", - _("Audio"), - _("Builtin audio extension"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation("BuiltinAudio", + _("Audio"), + _("Builtin audio extension"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/all-features/audio"); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/BaseObjectExtension.cpp b/Core/GDCore/Extensions/Builtin/BaseObjectExtension.cpp index 6ced6713eaf8..e81ebabdb9a0 100644 --- a/Core/GDCore/Extensions/Builtin/BaseObjectExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/BaseObjectExtension.cpp @@ -12,11 +12,13 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation("BuiltinObject", - _("Base object"), - _("Base object"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation("BuiltinObject", + _("Base object"), + _("Base object"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/base_object"); gd::ObjectMetadata& obj = extension.AddObject( "", _("Base object"), _("Base object"), "res/objeticon24.png"); @@ -34,7 +36,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("relationalOperator", _("Sign of the test")) .AddParameter("expression", _("X position")) .MarkAsSimple() - .SetHelpPage("gdevelop/documentation/manual/base") .SetManipulatedType("number"); obj.AddAction("MettreX", @@ -49,7 +50,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("operator", _("Modification's sign")) .AddParameter("expression", _("Value")) .MarkAsSimple() - .SetHelpPage("gdevelop/documentation/manual/base") .SetManipulatedType("number"); obj.AddCondition("PosY", @@ -64,7 +64,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("relationalOperator", _("Sign of the test")) .AddParameter("expression", _("Y position")) .MarkAsSimple() - .SetHelpPage("gdevelop/documentation/manual/base") .SetManipulatedType("number"); obj.AddAction("MettreY", @@ -79,7 +78,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("operator", _("Modification's sign")) .AddParameter("expression", _("Value")) .MarkAsSimple() - .SetHelpPage("gdevelop/documentation/manual/base") .SetManipulatedType("number"); obj.AddAction( @@ -96,7 +94,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("expression", _("X position")) .AddParameter("operator", _("Modification's sign")) .AddParameter("expression", _("Y position")) - .SetHelpPage("gdevelop/documentation/manual/base") .MarkAsSimple(); obj.AddAction("MettreAutourPos", @@ -115,7 +112,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("expression", _("Y position")) .AddParameter("expression", _("Distance")) .AddParameter("expression", _("Angle, in degrees")) - .SetHelpPage("gdevelop/documentation/manual/base") .MarkAsAdvanced(); obj.AddAction("SetAngle", @@ -129,7 +125,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("object", _("Object")) .AddParameter("operator", _("Modification's sign")) .AddParameter("expression", _("Value")) - .SetHelpPage("gdevelop/documentation/manual/base") .SetManipulatedType("number"); obj.AddAction("Rotate", @@ -144,7 +139,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("object", _("Object")) .AddParameter("expression", _("Angular speed (in degrees per second)")) .AddCodeOnlyParameter("currentScene", "") - .SetHelpPage("gdevelop/documentation/manual/base") .MarkAsSimple(); obj.AddAction( @@ -161,7 +155,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter( "expression", _("Angular speed (in degrees per second) (0 for immediate rotation)")) - .SetHelpPage("gdevelop/documentation/manual/base") .AddCodeOnlyParameter("currentScene", ""); obj.AddAction( @@ -181,7 +174,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( "expression", _("Angular speed (in degrees per second) (0 for immediate rotation)")) .AddCodeOnlyParameter("currentScene", "") - .SetHelpPage("gdevelop/documentation/manual/base") .MarkAsAdvanced(); obj.AddAction("AddForceXY", @@ -197,8 +189,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("object", _("Object")) .AddParameter("expression", _("Speed on X axis (in pixels per second)")) .AddParameter("expression", _("Speed on Y axis (in pixels per second)")) - .AddParameter("expression", _("Damping (Default: 0)")) - .SetHelpPage("gdevelop/documentation/manual/base"); + .AddParameter("expression", _("Damping (Default: 0)")); obj.AddAction("AddForceAL", _("Add a force (angle)"), @@ -215,7 +206,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("expression", _("Angle")) .AddParameter("expression", _("Speed (in pixels per second)")) .AddParameter("expression", _("Damping (Default: 0)")) - .SetHelpPage("gdevelop/documentation/manual/base") .MarkAsAdvanced(); obj.AddAction( @@ -233,7 +223,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( .AddParameter("expression", _("Y position")) .AddParameter("expression", _("Speed (in pixels per second)")) .AddParameter("expression", _("Damping (Default: 0)")) - .SetHelpPage("gdevelop/documentation/manual/base#displacement") .MarkAsAdvanced(); obj.AddAction( @@ -266,7 +255,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension( "res/actions/arreter.png") .AddParameter("object", _("Object")) - .SetHelpPage("gdevelop/documentation/manual/base#displacement") .MarkAsAdvanced(); obj.AddAction("Delete", diff --git a/Core/GDCore/Extensions/Builtin/CameraExtension.cpp b/Core/GDCore/Extensions/Builtin/CameraExtension.cpp index edd2aeb6738f..b47f9c7da413 100644 --- a/Core/GDCore/Extensions/Builtin/CameraExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/CameraExtension.cpp @@ -11,11 +11,13 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation("BuiltinCamera", - _("Cameras and layers features"), - _("Built-in camera extension"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation("BuiltinCamera", + _("Cameras and layers features"), + _("Built-in camera extension"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/CommonConversionsExtension.cpp b/Core/GDCore/Extensions/Builtin/CommonConversionsExtension.cpp index 1d7d4a9230bd..803fad423c63 100644 --- a/Core/GDCore/Extensions/Builtin/CommonConversionsExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/CommonConversionsExtension.cpp @@ -12,12 +12,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCommonConversionsExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinCommonConversions", - _("Standard Conversions"), - _("Built-in extension providing standard conversions expressions."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinCommonConversions", + _("Standard Conversions"), + _("Built-in extension providing standard conversions expressions."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) diff --git a/Core/GDCore/Extensions/Builtin/CommonInstructionsExtension.cpp b/Core/GDCore/Extensions/Builtin/CommonInstructionsExtension.cpp index 963e23634530..694a7e76391c 100644 --- a/Core/GDCore/Extensions/Builtin/CommonInstructionsExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/CommonInstructionsExtension.cpp @@ -22,12 +22,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCommonInstructionsExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinCommonInstructions", - _("Standard events"), - _("Built-in extension providing standard events."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinCommonInstructions", + _("Standard events"), + _("Built-in extension providing standard events."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/ExternalLayoutsExtension.cpp b/Core/GDCore/Extensions/Builtin/ExternalLayoutsExtension.cpp index 878c16472f05..d8b22dc75455 100644 --- a/Core/GDCore/Extensions/Builtin/ExternalLayoutsExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/ExternalLayoutsExtension.cpp @@ -12,13 +12,15 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsExternalLayoutsExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinExternalLayouts", - _("External layouts"), - _("Built-in extension providing actions and conditions related to " - "external layouts"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinExternalLayouts", + _("External layouts"), + _("Built-in extension providing actions and conditions related to " + "external layouts"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/FileExtension.cpp b/Core/GDCore/Extensions/Builtin/FileExtension.cpp index 4786455c66a0..2f2fc85e63a6 100644 --- a/Core/GDCore/Extensions/Builtin/FileExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/FileExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsFileExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation("BuiltinFile", - _("Storage and files"), - _("Built-in extension providing functions " - "to store data and manipulate files."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation("BuiltinFile", + _("Storage and files"), + _("Built-in extension providing functions " + "to store data and manipulate files."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/all-features/storage"); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/JoystickExtension.cpp b/Core/GDCore/Extensions/Builtin/JoystickExtension.cpp index e4ae015a93b5..323d655e30a3 100644 --- a/Core/GDCore/Extensions/Builtin/JoystickExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/JoystickExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsJoystickExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinJoystick", - _("Joysticks features"), - _("Built-in extension that enables the use of joysticks"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinJoystick", + _("Joysticks features"), + _("Built-in extension that enables the use of joysticks"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/KeyboardExtension.cpp b/Core/GDCore/Extensions/Builtin/KeyboardExtension.cpp index bc75a7c23207..c68073fec657 100644 --- a/Core/GDCore/Extensions/Builtin/KeyboardExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/KeyboardExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsKeyboardExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinKeyboard", - _("Keyboard features"), - _("Built-in extension that enables the use of a keyboard"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinKeyboard", + _("Keyboard features"), + _("Built-in extension that enables the use of a keyboard"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/MouseExtension.cpp b/Core/GDCore/Extensions/Builtin/MouseExtension.cpp index c6952644c8b2..c420dc4504d0 100644 --- a/Core/GDCore/Extensions/Builtin/MouseExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/MouseExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinMouse", - _("Mouse features"), - _("Built-in extension that enables the use of a mouse"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinMouse", + _("Mouse features"), + _("Built-in extension that enables the use of a mouse"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/events/mouse-touch"); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/NetworkExtension.cpp b/Core/GDCore/Extensions/Builtin/NetworkExtension.cpp index b1ba96cd76d6..6c1f72de73ea 100644 --- a/Core/GDCore/Extensions/Builtin/NetworkExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/NetworkExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsNetworkExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinNetwork", - _("Basic internet features"), - _("Built-in extension providing network features."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinNetwork", + _("Basic internet features"), + _("Built-in extension providing network features."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/all-features/network"); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/SceneExtension.cpp b/Core/GDCore/Extensions/Builtin/SceneExtension.cpp index be7d88bd8ead..078b9869deea 100644 --- a/Core/GDCore/Extensions/Builtin/SceneExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/SceneExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinScene", - _("Scene management features"), - _("This Built-in extension allows you to manipulate scenes"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinScene", + _("Scene management features"), + _("Built-in extension allowing to manipulate scenes and providing common features"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) diff --git a/Core/GDCore/Extensions/Builtin/SpriteExtension/SpriteExtension.cpp b/Core/GDCore/Extensions/Builtin/SpriteExtension/SpriteExtension.cpp index 1db874f7bee6..2fba9edcf76b 100644 --- a/Core/GDCore/Extensions/Builtin/SpriteExtension/SpriteExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/SpriteExtension/SpriteExtension.cpp @@ -14,13 +14,13 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSpriteExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "Sprite", - _("Sprite"), - _("Extension for adding animated objects in the scene, which can contain " - "animations with directions within each."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation("Sprite", + _("Sprite"), + _("Sprite are animated object which can be used for most elements of a game."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/sprite"); gd::ObjectMetadata& obj = extension.AddObject( "Sprite", diff --git a/Core/GDCore/Extensions/Builtin/StringInstructionsExtension.cpp b/Core/GDCore/Extensions/Builtin/StringInstructionsExtension.cpp index edd1fa8829ee..996b8e39dcbd 100644 --- a/Core/GDCore/Extensions/Builtin/StringInstructionsExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/StringInstructionsExtension.cpp @@ -12,13 +12,15 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsStringInstructionsExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinStringInstructions", - _("Text manipulation"), - _("Built-in extension providing expressions for manipulating text " - "objects."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinStringInstructions", + _("Text manipulation"), + _("Built-in extension providing expressions for manipulating text " + "objects."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) extension.AddStrExpression("NewLine", diff --git a/Core/GDCore/Extensions/Builtin/TimeExtension.cpp b/Core/GDCore/Extensions/Builtin/TimeExtension.cpp index 416d66dd3ffd..486871c13057 100644 --- a/Core/GDCore/Extensions/Builtin/TimeExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/TimeExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsTimeExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinTime", - _("Time"), - _("Built-in extension providing actions and conditions related to time."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation("BuiltinTime", + _("Time"), + _("Built-in extension providing actions and " + "conditions related to time."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/all-features/timers"); #if defined(GD_IDE_ONLY) diff --git a/Core/GDCore/Extensions/Builtin/VariablesExtension.cpp b/Core/GDCore/Extensions/Builtin/VariablesExtension.cpp index f7eca0fe7c26..9f1a93c898a1 100644 --- a/Core/GDCore/Extensions/Builtin/VariablesExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/VariablesExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsVariablesExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "BuiltinVariables", - _("Variable features"), - _("This Built-in extension allows the manipulation of variables"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "BuiltinVariables", + _("Variable features"), + _("Built-in extension allowing to manipulate variables"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/all-features/variables"); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Builtin/WindowExtension.cpp b/Core/GDCore/Extensions/Builtin/WindowExtension.cpp index 003796a586f9..a8d8af8011dc 100644 --- a/Core/GDCore/Extensions/Builtin/WindowExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/WindowExtension.cpp @@ -11,12 +11,14 @@ namespace gd { void GD_CORE_API BuiltinExtensionsImplementer::ImplementsWindowExtension( gd::PlatformExtension& extension) { - extension.SetExtensionInformation("BuiltinWindow", - _("Window features"), - _("This Built-in extension enables the " - "manipulation of the game's window"), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation("BuiltinWindow", + _("Window features"), + _("Built-in extension allowing to manipulate " + "the game window and canvas"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); #if defined(GD_IDE_ONLY) extension diff --git a/Core/GDCore/Extensions/Metadata/BehaviorMetadata.cpp b/Core/GDCore/Extensions/Metadata/BehaviorMetadata.cpp index 94ca4ebb3662..04c331986b75 100644 --- a/Core/GDCore/Extensions/Metadata/BehaviorMetadata.cpp +++ b/Core/GDCore/Extensions/Metadata/BehaviorMetadata.cpp @@ -75,7 +75,8 @@ gd::InstructionMetadata& BehaviorMetadata::AddCondition( sentence, group, icon, - smallicon); + smallicon) + .SetHelpPath(GetHelpPath()); return conditionsInfos[nameWithNamespace]; #endif } @@ -98,7 +99,8 @@ gd::InstructionMetadata& BehaviorMetadata::AddAction( sentence, group, icon, - smallicon); + smallicon) + .SetHelpPath(GetHelpPath()); return actionsInfos[nameWithNamespace]; #endif } diff --git a/Core/GDCore/Extensions/Metadata/BehaviorMetadata.h b/Core/GDCore/Extensions/Metadata/BehaviorMetadata.h index 2ec9c852e7ac..2f274785733c 100644 --- a/Core/GDCore/Extensions/Metadata/BehaviorMetadata.h +++ b/Core/GDCore/Extensions/Metadata/BehaviorMetadata.h @@ -14,16 +14,10 @@ #endif namespace gd { class Behavior; -} -namespace gd { class BehaviorsSharedData; -} -namespace gd { class InstructionMetadata; -} -namespace gd { class ExpressionMetadata; -} +} // namespace gd class wxBitmap; namespace gd { @@ -110,6 +104,22 @@ class GD_CORE_API BehaviorMetadata { */ BehaviorMetadata& AddIncludeFile(const gd::String& includeFile); + /** + * Get the help path of the behavior, relative to the documentation root. + */ + const gd::String &GetHelpPath() const { return helpPath; } + + /** + * Set the help path of the behavior, relative to the documentation root. + * + * The behavior instructions will have this help path set by + * default, unless you call SetHelpPath on them. + */ + BehaviorMetadata &SetHelpPath(const gd::String &path) { + helpPath = path; + return *this; + } + #if defined(GD_IDE_ONLY) const gd::String& GetFullName() const { return fullname; } const gd::String& GetDefaultName() const { return defaultName; } @@ -136,6 +146,7 @@ class GD_CORE_API BehaviorMetadata { #endif private: gd::String extensionNamespace; + gd::String helpPath; #if defined(GD_IDE_ONLY) gd::String fullname; gd::String defaultName; diff --git a/Core/GDCore/Extensions/Metadata/InstructionMetadata.cpp b/Core/GDCore/Extensions/Metadata/InstructionMetadata.cpp index f6447368e11c..604e76c2c1ce 100644 --- a/Core/GDCore/Extensions/Metadata/InstructionMetadata.cpp +++ b/Core/GDCore/Extensions/Metadata/InstructionMetadata.cpp @@ -28,7 +28,7 @@ InstructionMetadata::InstructionMetadata(const gd::String& extensionNamespace_, const gd::String& smallIcon_) : fullname(fullname_), description(description_), - helpPage(), + helpPath(""), sentence(sentence_), group(group_), iconFilename(icon_), diff --git a/Core/GDCore/Extensions/Metadata/InstructionMetadata.h b/Core/GDCore/Extensions/Metadata/InstructionMetadata.h index 9a75a4cdda4f..f53c122c9367 100644 --- a/Core/GDCore/Extensions/Metadata/InstructionMetadata.h +++ b/Core/GDCore/Extensions/Metadata/InstructionMetadata.h @@ -22,7 +22,7 @@ class Project; class Layout; class EventsCodeGenerator; class EventsCodeGenerationContext; -} +} // namespace gd namespace gd { @@ -86,7 +86,8 @@ class GD_CORE_API ParameterMetadata { * "objectList". \see gd::ParameterMetadata::GetType */ static bool IsObject(const gd::String ¶meterType) { - return parameterType == "object" || parameterType == "objectPtr" || parameterType == "objectList" || + return parameterType == "object" || parameterType == "objectPtr" || + parameterType == "objectList" || parameterType == "objectListWithoutPicking"; } @@ -94,7 +95,8 @@ class GD_CORE_API ParameterMetadata { * \brief Return true if the type of the parameter is "object", "objectPtr" or * "objectList". \see gd::ParameterMetadata::GetType */ - static bool IsExpression(const gd::String &type, const gd::String ¶meterType) { + static bool IsExpression(const gd::String &type, + const gd::String ¶meterType) { if (type == "number") { return parameterType == "expression" || parameterType == "camera"; } else if (type == "string") { @@ -141,15 +143,15 @@ class GD_CORE_API InstructionMetadata { bool CanHaveSubInstructions() const { return canHaveSubInstructions; } /** - * Get the help page of the instruction. + * Get the help path of the instruction, relative to the documentation root. */ - const gd::String &GetHelpPage() const { return helpPage; } + const gd::String &GetHelpPath() const { return helpPath; } /** - * Set the help page of the instruction. + * Set the help path of the instruction, relative to the documentation root. */ - InstructionMetadata &SetHelpPage(const gd::String &page) { - helpPage = page; + InstructionMetadata &SetHelpPath(const gd::String &path) { + helpPath = path; return *this; } @@ -387,9 +389,7 @@ class GD_CORE_API InstructionMetadata { * \brief Return the structure containing the information about code * generation for the instruction. */ - ExtraInformation &GetCodeExtraInformation() { - return codeExtraInformation; - } + ExtraInformation &GetCodeExtraInformation() { return codeExtraInformation; } /** * \brief Declare if the instruction being declared is somewhat manipulating @@ -421,7 +421,7 @@ class GD_CORE_API InstructionMetadata { private: gd::String fullname; gd::String description; - gd::String helpPage; + gd::String helpPath; gd::String sentence; gd::String group; #if !defined(GD_NO_WX_GUI) diff --git a/Core/GDCore/Extensions/Metadata/MetadataProvider.h b/Core/GDCore/Extensions/Metadata/MetadataProvider.h index 28864e6f7d62..e6cf2a0db852 100644 --- a/Core/GDCore/Extensions/Metadata/MetadataProvider.h +++ b/Core/GDCore/Extensions/Metadata/MetadataProvider.h @@ -9,17 +9,9 @@ #include "GDCore/String.h" namespace gd { class BehaviorMetadata; -} -namespace gd { class ObjectMetadata; -} -namespace gd { class ExpressionMetadata; -} -namespace gd { class ExpressionMetadata; -} -namespace gd { class Platform; } @@ -47,14 +39,14 @@ class GD_CORE_API MetadataProvider { /** * Get the metadata of an action. - * Must work for object, behaviors and static actions. + * Works for object, behaviors and static actions. */ static const gd::InstructionMetadata& GetActionMetadata( const gd::Platform& platform, gd::String actionType); /** * Get the metadata of a condition. - * Must Work for object, behaviors and static conditions. + * Works for object, behaviors and static conditions. */ static const gd::InstructionMetadata& GetConditionMetadata( const gd::Platform& platform, gd::String conditionType); @@ -81,109 +73,109 @@ class GD_CORE_API MetadataProvider { const gd::Platform& platform, gd::String autoType, gd::String exprType); /** - * Get information about a gd::String expression from its type + * Get information about a string expression from its type * Works for static expressions. */ static const gd::ExpressionMetadata& GetStrExpressionMetadata( const gd::Platform& platform, gd::String exprType); /** - * Get information about a gd::String expression from its type + * Get information about a string expression from its type * Works for object expressions. */ static const gd::ExpressionMetadata& GetObjectStrExpressionMetadata( const gd::Platform& platform, gd::String objectType, gd::String exprType); /** - * Get information about a gd::String expression from its type + * Get information about a string expression from its type * Works for behavior expressions. */ static const gd::ExpressionMetadata& GetBehaviorStrExpressionMetadata( const gd::Platform& platform, gd::String autoType, gd::String exprType); /** - * Verifying if a ( static ) condition exists - * @return true if the ( static ) condition exists + * \brief Check if a (static) condition exists + * @return true if the (static) condition exists */ static bool HasCondition(const gd::Platform& platform, gd::String name); /** - * Verifying if a ( static ) action exists - * @return true if the ( static ) action exists + * \brief Check if a (static) action exists + * @return true if the (static) action exists */ static bool HasAction(const gd::Platform& platform, gd::String name); /** - * Verifying if a ( object ) action exists - * @return true if the ( object ) action exists + * \brief Check if a (object) action exists + * @return true if the (object) action exists */ static bool HasObjectAction(const gd::Platform& platform, gd::String objectType, gd::String name); /** - * Verifying if a ( object ) condition exists - * @return true if the ( object ) condition exists + * \brief Check if a (object) condition exists + * @return true if the (object) condition exists */ static bool HasObjectCondition(const gd::Platform& platform, gd::String objectType, gd::String name); /** - * Verifying if a ( Behavior ) action exists - * @return true if the ( Behavior ) action exists + * \brief Check if a (behavior) action exists + * @return true if the (behavior) action exists */ static bool HasBehaviorAction(const gd::Platform& platform, gd::String behaviorType, gd::String name); /** - * Verifying if a ( Behavior ) condition exists - * @return true if the ( Behavior ) condition exists + * \brief Check if a (behavior) condition exists + * @return true if the (behavior) condition exists */ static bool HasBehaviorCondition(const gd::Platform& platform, gd::String behaviorType, gd::String name); /** - * Verifying if a ( static ) expression exists - * @return true if the ( static ) expression exists + * \brief Check if a (static) expression exists + * @return true if the (static) expression exists */ static bool HasExpression(const gd::Platform& platform, gd::String name); /** - * Verifying if a ( object ) expression exists - * @return true if the ( object ) expression exists + * \brief Check if a (object) expression exists + * @return true if the (object) expression exists */ static bool HasObjectExpression(const gd::Platform& platform, gd::String objectType, gd::String name); /** - * Verifying if a ( behavior ) expression exists - * @return true if the ( behavior ) expression exists + * \brief Check if a (behavior) expression exists + * @return true if the (behavior) expression exists */ static bool HasBehaviorExpression(const gd::Platform& platform, gd::String behaviorType, gd::String name); /** - * Verifying if a ( static ) gd::String expression exists - * @return true if the ( static ) gd::String expression exists + * \brief Check if a (static) string expression exists + * @return true if the (static) string expression exists */ static bool HasStrExpression(const gd::Platform& platform, gd::String name); /** - * Verifying if a ( object ) gd::String expression exists - * @return true if the ( object ) gd::String expression exists + * \brief Check if a (object) string expression exists + * @return true if the (object) string expression exists */ static bool HasObjectStrExpression(const gd::Platform& platform, gd::String objectType, gd::String name); /** - * Verifying if a ( object ) gd::String expression exists - * @return true if the ( object ) gd::String expression exists + * \brief Check if a (behavior) string expression exists + * @return true if the (behavior) string expression exists */ static bool HasBehaviorStrExpression(const gd::Platform& platform, gd::String behaviorType, diff --git a/Core/GDCore/Extensions/Metadata/ObjectMetadata.cpp b/Core/GDCore/Extensions/Metadata/ObjectMetadata.cpp index e77a6111d90e..0336a6871392 100644 --- a/Core/GDCore/Extensions/Metadata/ObjectMetadata.cpp +++ b/Core/GDCore/Extensions/Metadata/ObjectMetadata.cpp @@ -109,7 +109,8 @@ gd::InstructionMetadata& ObjectMetadata::AddCondition( sentence, group, icon, - smallicon); + smallicon) + .SetHelpPath(GetHelpPath()); return conditionsInfos[nameWithNamespace]; #endif } @@ -132,7 +133,8 @@ gd::InstructionMetadata& ObjectMetadata::AddAction( sentence, group, icon, - smallicon); + smallicon) + .SetHelpPath(GetHelpPath()); return actionsInfos[nameWithNamespace]; #endif } diff --git a/Core/GDCore/Extensions/Metadata/ObjectMetadata.h b/Core/GDCore/Extensions/Metadata/ObjectMetadata.h index fae0dbcc1c28..7ab6280f9de7 100644 --- a/Core/GDCore/Extensions/Metadata/ObjectMetadata.h +++ b/Core/GDCore/Extensions/Metadata/ObjectMetadata.h @@ -117,6 +117,22 @@ class GD_CORE_API ObjectMetadata { */ ObjectMetadata& SetBitmapIcon(const wxBitmap& bitmap_); + /** + * Get the help path of the object, relative to the documentation root. + */ + const gd::String &GetHelpPath() const { return helpPath; } + + /** + * Set the help path of the object, relative to the documentation root. + * + * The object instructions will have this help path set by + * default, unless you call SetHelpPath on them. + */ + ObjectMetadata &SetHelpPath(const gd::String &path) { + helpPath = path; + return *this; + } + const gd::String& GetName() const { return name; } #if defined(GD_IDE_ONLY) const gd::String& GetFullName() const { return fullname; } @@ -131,6 +147,7 @@ class GD_CORE_API ObjectMetadata { /** * \brief Set the URL pointing to the help page about this object * \note The path to the page must be relative to the wiki url. + * \deprecated Use SetHelpPath instead */ ObjectMetadata& SetHelpUrl(const gd::String& url); @@ -160,8 +177,9 @@ class GD_CORE_API ObjectMetadata { private: gd::String extensionNamespace; gd::String name; + gd::String helpPath; #if defined(GD_IDE_ONLY) - gd::String helpUrl; + gd::String helpUrl; ///< Deprecated. Use helpPath instead. gd::String fullname; gd::String description; gd::String iconFilename; diff --git a/Core/GDCore/Extensions/PlatformExtension.cpp b/Core/GDCore/Extensions/PlatformExtension.cpp index 2740f203882a..1fc153e0d104 100644 --- a/Core/GDCore/Extensions/PlatformExtension.cpp +++ b/Core/GDCore/Extensions/PlatformExtension.cpp @@ -50,7 +50,8 @@ gd::InstructionMetadata& PlatformExtension::AddCondition( sentence, group, icon, - smallicon); + smallicon) + .SetHelpPath(GetHelpPath()); return conditionsInfos[nameWithNamespace]; #endif } @@ -73,7 +74,8 @@ gd::InstructionMetadata& PlatformExtension::AddAction( sentence, group, icon, - smallicon); + smallicon) + .SetHelpPath(GetHelpPath()); return actionsInfos[nameWithNamespace]; #endif } @@ -124,13 +126,13 @@ gd::ObjectMetadata& PlatformExtension::AddObject( std::shared_ptr instance) { gd::String nameWithNamespace = GetNameSpace().empty() ? name : GetNameSpace() + name; - objectsInfos[nameWithNamespace] = - ObjectMetadata(GetNameSpace(), - nameWithNamespace, - fullname, - description, - icon24x24, - instance); + objectsInfos[nameWithNamespace] = ObjectMetadata(GetNameSpace(), + nameWithNamespace, + fullname, + description, + icon24x24, + instance) + .SetHelpPath(GetHelpPath()); return objectsInfos[nameWithNamespace]; } @@ -156,7 +158,8 @@ gd::BehaviorMetadata& PlatformExtension::AddBehavior( icon24x24, className, instance, - sharedDatasInstance); + sharedDatasInstance) + .SetHelpPath(GetHelpPath()); return behaviorsInfo[nameWithNamespace]; } @@ -180,17 +183,19 @@ gd::EventMetadata& PlatformExtension::AddEvent( #endif } -void PlatformExtension::SetExtensionInformation(const gd::String& name_, - const gd::String& fullname_, - const gd::String& description_, - const gd::String& author_, - const gd::String& license_) { +PlatformExtension& PlatformExtension::SetExtensionInformation( + const gd::String& name_, + const gd::String& fullname_, + const gd::String& description_, + const gd::String& author_, + const gd::String& license_) { name = name_; fullname = fullname_; informations = description_; author = author_; license = license_; SetNameSpace(name_); + return *this; } std::vector PlatformExtension::GetExtensionObjectsTypes() const { diff --git a/Core/GDCore/Extensions/PlatformExtension.h b/Core/GDCore/Extensions/PlatformExtension.h index eded921cad45..ee4da2b56943 100644 --- a/Core/GDCore/Extensions/PlatformExtension.h +++ b/Core/GDCore/Extensions/PlatformExtension.h @@ -30,9 +30,10 @@ class ArbitraryResourceWorker; class BehaviorsSharedData; class Behavior; class Object; -} +} // namespace gd -typedef std::function(gd::String name)> CreateFunPtr; +typedef std::function(gd::String name)> + CreateFunPtr; namespace gd { @@ -85,11 +86,24 @@ class GD_CORE_API PlatformExtension { /** * \brief Must be called to declare the main information about the extension. */ - void SetExtensionInformation(const gd::String& name_, - const gd::String& fullname_, - const gd::String& description_, - const gd::String& author_, - const gd::String& license_); + PlatformExtension& SetExtensionInformation(const gd::String& name_, + const gd::String& fullname_, + const gd::String& description_, + const gd::String& author_, + const gd::String& license_); + + /** + * \brief Set the path to the help, relative to the wiki/documentation root. + * For example, "/all-features/collisions" for + * "http://wiki.compilgames.net/doku.php/gdevelop5/all-features/collisions". + * + * The instructions, objects and behaviors will have this help path set by + * default, unless you call SetHelpPath on them. + */ + PlatformExtension& SetExtensionHelpPath(const gd::String& helpPath_) { + helpPath = helpPath_; + return *this; + } /** * \brief Mark this extension as deprecated: the IDE will hide it from the @@ -165,7 +179,8 @@ class GD_CORE_API PlatformExtension { * \param icon The 24x24 icon of the object: res/icons_[SkinName]/[iconName]24.png will be first tried, * and then if it does not exists, the full entered name will be tried. - * \param instance The "blueprint" object to be copied when a new object is asked for. + * \param instance The "blueprint" object to be copied when a new object is + asked for. */ gd::ObjectMetadata& AddObject(const gd::String& name_, const gd::String& fullname_, @@ -234,6 +249,12 @@ class GD_CORE_API PlatformExtension { */ const gd::String& GetLicense() const { return license; } + /** + * \brief Return the help path of extension, relative to the + * wiki/documentation root. + */ + const gd::String& GetHelpPath() const { return helpPath; } + /** * \brief Check if the extension is flagged as being deprecated. */ @@ -427,7 +448,10 @@ class GD_CORE_API PlatformExtension { gd::String informations; ///< Description displayed to users at edittime gd::String author; ///< Author displayed to users at edittime gd::String license; ///< License name displayed to users at edittime - bool deprecated; + bool deprecated; ///< true if the extension is deprecated and shouldn't be + ///< shown in IDE. + gd::String helpPath; ///< The relative path to the help for this extension in + ///< the documentation. std::map objectsInfos; std::map behaviorsInfo; diff --git a/Core/GDCore/Extensions/PlatformExtension.inl b/Core/GDCore/Extensions/PlatformExtension.inl index dd7b5b092089..8587ed1940d8 100644 --- a/Core/GDCore/Extensions/PlatformExtension.inl +++ b/Core/GDCore/Extensions/PlatformExtension.inl @@ -27,7 +27,8 @@ gd::ObjectMetadata& PlatformExtension::AddObject(const gd::String& name, icon24x24, [](gd::String name) -> std::unique_ptr { return gd::make_unique(name); - }); + }) + .SetHelpPath(GetHelpPath()); return objectsInfos[nameWithNamespace]; } diff --git a/Extensions/AdMobObject/Extension.cpp b/Extensions/AdMobObject/Extension.cpp index 97fc8911b281..1aa2b399e78b 100644 --- a/Extensions/AdMobObject/Extension.cpp +++ b/Extensions/AdMobObject/Extension.cpp @@ -11,12 +11,14 @@ This project is released under the MIT License. #include "AdMobObject.h" void DeclareAdMobObjectExtension(gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "AdMobObject", - _("AdMob banners and interstitial screens"), - _("Display an ads banner and interstitial screens powered by AdMob."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "AdMobObject", + _("AdMob banners and interstitial screens"), + _("Display an ads banner and interstitial screens powered by AdMob."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/admob"); gd::ObjectMetadata& obj = extension.AddObject( "AdMob", diff --git a/Extensions/AnchorBehavior/Extension.cpp b/Extensions/AnchorBehavior/Extension.cpp index b3c7d80b6e55..083690626e71 100644 --- a/Extensions/AnchorBehavior/Extension.cpp +++ b/Extensions/AnchorBehavior/Extension.cpp @@ -10,11 +10,13 @@ This project is released under the MIT License. #include "GDCpp/Runtime/Project/BehaviorsSharedData.h" void DeclareAnchorBehaviorExtension(gd::PlatformExtension& extension) { - extension.SetExtensionInformation("AnchorBehavior", - _("Anchor"), - _("Anchor objects to the window's bounds."), - "Victor Levasseur", - "Open source (MIT License)"); + extension + .SetExtensionInformation("AnchorBehavior", + _("Anchor"), + _("Anchor objects to the window's bounds."), + "Victor Levasseur", + "Open source (MIT License)") + .SetExtensionHelpPath("/behaviors/anchor"); gd::BehaviorMetadata& aut = extension.AddBehavior( "AnchorBehavior", diff --git a/Extensions/Box3DObject/Extension.cpp b/Extensions/Box3DObject/Extension.cpp index 0dd2e859e38f..cbf1ecaa0e63 100644 --- a/Extensions/Box3DObject/Extension.cpp +++ b/Extensions/Box3DObject/Extension.cpp @@ -26,7 +26,8 @@ class Extension : public ExtensionBase { _("3D Box Object"), _("This Extension enables the use of 3D Box objects."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); { gd::ObjectMetadata& obj = diff --git a/Extensions/CommonDialogs/Extension.cpp b/Extensions/CommonDialogs/Extension.cpp index 4c1b1624a403..68c74186b023 100644 --- a/Extensions/CommonDialogs/Extension.cpp +++ b/Extensions/CommonDialogs/Extension.cpp @@ -7,96 +7,108 @@ This project is released under the MIT License. #include "GDCpp/Extensions/ExtensionBase.h" - - /** * \brief This class declares information about the extension. */ -class Extension : public ExtensionBase -{ -public: - - /** - * Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions. - */ - Extension() - { - SetExtensionInformation("CommonDialogs", - _("Common dialogs"), - _("This Extension can display common dialogs ( Message box, open file dialog... )"), - "Florian Rival", - "Open source (MIT License)"); - #if defined(GD_IDE_ONLY) - - AddAction("ShowMsgBox", - _("Show a message box"), - _("Display a message box with the specified text and an Ok button."), - _("Display message \"_PARAM1_\" with title \"_PARAM2_\""), - _("Interfaces"), - "res/actions/msgbox24.png", - "res/actions/msgbox.png") - - .AddCodeOnlyParameter("currentScene", "") - .AddParameter("string", _("Message")) - .AddParameter("string", _("Title")) - - .SetFunctionName("GDpriv::CommonDialogs::ShowMessageBox").SetIncludeFile("CommonDialogs/CommonDialogs.h"); - - AddAction("ShowOpenFile", - _("Show a window to choose a file"), - _("Display a window that allows a player to choose a file.\nThe name and the directory of the file will be saved in the specified variable."), - _("Open a window for choosing a file, and save the result in _PARAM1_"), - _("Interfaces"), - "res/actions/openfile24.png", - "res/actions/openfile.png") - - .AddCodeOnlyParameter("currentScene", "") - .AddParameter("scenevar", _("Save result to scene variable")) - .AddParameter("string", _("Title")) - .AddParameter("string", _("Wildcard filter ( \"FileType|*.ext;*.ext2|2ndFileType|*.ext3\" ) ( Windows only ) ")) - - .SetFunctionName("GDpriv::CommonDialogs::ShowOpenFile").SetIncludeFile("CommonDialogs/CommonDialogs.h"); - - AddAction("ShowTextInput", - _("Show a window to enter a text"), - _("Show a window that allows a player to enter text.\nThe text will be saved in the specified scene variable."), - _("Open a text input dialog, and save the result in _PARAM1_"), - _("Interfaces"), - "res/actions/textenter24.png", - "res/actions/textenter.png") - - .AddCodeOnlyParameter("currentScene", "") - .AddParameter("scenevar", _("Save result to scene variable")) - .AddParameter("string", _("Message")) - .AddParameter("string", _("Title")) - - .SetFunctionName("GDpriv::CommonDialogs::ShowTextInput").SetIncludeFile("CommonDialogs/CommonDialogs.h"); - - AddAction("ShowYesNoMsgBox", - _("Display a Yes/No message box"), - _("Open a message box that allows a player to choose Yes or No.\nThe answer ( \"yes\"/\"no\" ) will be saved in the specified variable."), - _("Open a Yes/No message box, and save the result in _PARAM1_"), - _("Interfaces"), - "res/actions/msgbox24.png", - "res/actions/msgbox.png") - - .AddCodeOnlyParameter("currentScene", "") - .AddParameter("scenevar", _("Save result to scene variable")) - .AddParameter("string", _("Message")) - .AddParameter("string", _("Title")) - - .SetFunctionName("GDpriv::CommonDialogs::ShowYesNoMsgBox").SetIncludeFile("CommonDialogs/CommonDialogs.h"); - - #endif - - GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION(); - }; +class Extension : public ExtensionBase { + public: + /** + * Constructor of an extension declares everything the extension contains: + * objects, actions, conditions and expressions. + */ + Extension() { + SetExtensionInformation("CommonDialogs", + _("Common dialogs"), + _("This Extension can display common dialogs ( " + "Message box, open file dialog... )"), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("" /*TODO: Add a documentation page for this */); +#if defined(GD_IDE_ONLY) + + AddAction( + "ShowMsgBox", + _("Show a message box"), + _("Display a message box with the specified text and an Ok button."), + _("Display message \"_PARAM1_\" with title \"_PARAM2_\""), + _("Interfaces"), + "res/actions/msgbox24.png", + "res/actions/msgbox.png") + + .AddCodeOnlyParameter("currentScene", "") + .AddParameter("string", _("Message")) + .AddParameter("string", _("Title")) + + .SetFunctionName("GDpriv::CommonDialogs::ShowMessageBox") + .SetIncludeFile("CommonDialogs/CommonDialogs.h"); + + AddAction( + "ShowOpenFile", + _("Show a window to choose a file"), + _("Display a window that allows a player to choose a file.\nThe name " + "and the directory of the file will be saved in the specified " + "variable."), + _("Open a window for choosing a file, and save the result in _PARAM1_"), + _("Interfaces"), + "res/actions/openfile24.png", + "res/actions/openfile.png") + + .AddCodeOnlyParameter("currentScene", "") + .AddParameter("scenevar", _("Save result to scene variable")) + .AddParameter("string", _("Title")) + .AddParameter( + "string", + _("Wildcard filter ( \"FileType|*.ext;*.ext2|2ndFileType|*.ext3\" " + ") ( Windows only ) ")) + + .SetFunctionName("GDpriv::CommonDialogs::ShowOpenFile") + .SetIncludeFile("CommonDialogs/CommonDialogs.h"); + + AddAction("ShowTextInput", + _("Show a window to enter a text"), + _("Show a window that allows a player to enter text.\nThe text " + "will be saved in the specified scene variable."), + _("Open a text input dialog, and save the result in _PARAM1_"), + _("Interfaces"), + "res/actions/textenter24.png", + "res/actions/textenter.png") + + .AddCodeOnlyParameter("currentScene", "") + .AddParameter("scenevar", _("Save result to scene variable")) + .AddParameter("string", _("Message")) + .AddParameter("string", _("Title")) + + .SetFunctionName("GDpriv::CommonDialogs::ShowTextInput") + .SetIncludeFile("CommonDialogs/CommonDialogs.h"); + + AddAction( + "ShowYesNoMsgBox", + _("Display a Yes/No message box"), + _("Open a message box that allows a player to choose Yes or No.\nThe " + "answer ( \"yes\"/\"no\" ) will be saved in the specified variable."), + _("Open a Yes/No message box, and save the result in _PARAM1_"), + _("Interfaces"), + "res/actions/msgbox24.png", + "res/actions/msgbox.png") + + .AddCodeOnlyParameter("currentScene", "") + .AddParameter("scenevar", _("Save result to scene variable")) + .AddParameter("string", _("Message")) + .AddParameter("string", _("Title")) + + .SetFunctionName("GDpriv::CommonDialogs::ShowYesNoMsgBox") + .SetIncludeFile("CommonDialogs/CommonDialogs.h"); + +#endif + + GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION(); + }; }; /** * Used by GDevelop to create the extension class * -- Do not need to be modified. -- */ -extern "C" ExtensionBase * GD_EXTENSION_API CreateGDExtension() { - return new Extension; +extern "C" ExtensionBase* GD_EXTENSION_API CreateGDExtension() { + return new Extension; } diff --git a/Extensions/DestroyOutsideBehavior/Extension.cpp b/Extensions/DestroyOutsideBehavior/Extension.cpp index f1a95857be29..a7641877a5d3 100644 --- a/Extensions/DestroyOutsideBehavior/Extension.cpp +++ b/Extensions/DestroyOutsideBehavior/Extension.cpp @@ -16,7 +16,8 @@ void DeclareDestroyOutsideBehaviorExtension(gd::PlatformExtension& extension) { _("This Extension can be used to destroy objects when they go outside of " "the borders of the game's window."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/behaviors/destroyoutside"); gd::BehaviorMetadata& aut = extension.AddBehavior("DestroyOutside", diff --git a/Extensions/DestroyOutsideBehavior/JsExtension.cpp b/Extensions/DestroyOutsideBehavior/JsExtension.cpp index 03db2e861cbb..b8643b65046d 100644 --- a/Extensions/DestroyOutsideBehavior/JsExtension.cpp +++ b/Extensions/DestroyOutsideBehavior/JsExtension.cpp @@ -22,12 +22,6 @@ class DestroyOutsideBehaviorJsExtension : public gd::PlatformExtension { * contains: objects, actions, conditions and expressions. */ DestroyOutsideBehaviorJsExtension() { - SetExtensionInformation( - "DestroyOutsideBehavior", - _("Destroy Outside Screen Behavior"), - _("Behavior destroying object when they go outside the screen"), - "Florian Rival", - "Open source (MIT License)"); DeclareDestroyOutsideBehaviorExtension(*this); GetBehaviorMetadata("DestroyOutsideBehavior::DestroyOutside") diff --git a/Extensions/DraggableBehavior/Extension.cpp b/Extensions/DraggableBehavior/Extension.cpp index 9ef3bb793253..8f3bea98e710 100644 --- a/Extensions/DraggableBehavior/Extension.cpp +++ b/Extensions/DraggableBehavior/Extension.cpp @@ -15,7 +15,8 @@ void DeclareDraggableBehaviorExtension(gd::PlatformExtension& extension) { _("Draggable Behavior"), _("This Extension enables the movement of objects with a mouse."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("behaviors/draggable"); gd::BehaviorMetadata& aut = extension.AddBehavior("Draggable", diff --git a/Extensions/Inventory/Extension.cpp b/Extensions/Inventory/Extension.cpp index 6958d618e0b6..9d940dc76558 100644 --- a/Extensions/Inventory/Extension.cpp +++ b/Extensions/Inventory/Extension.cpp @@ -17,7 +17,8 @@ void DeclareInventoryExtension(gd::PlatformExtension& extension) { _("Provides actions and conditions to add an inventory to your game, " "with items in memory."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("all-features/inventory"); #if defined(GD_IDE_ONLY) extension diff --git a/Extensions/LinkedObjects/Extension.cpp b/Extensions/LinkedObjects/Extension.cpp index 990864ca9d7c..b58512f6fe95 100644 --- a/Extensions/LinkedObjects/Extension.cpp +++ b/Extensions/LinkedObjects/Extension.cpp @@ -11,12 +11,14 @@ This project is released under the MIT License. #include void DeclareLinkedObjectsExtension(gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "LinkedObjects", - _("Linked objects"), - _("This Extension can virtually link two objects."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "LinkedObjects", + _("Linked objects"), + _("This Extension can virtually link two objects."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/all-features/linked-objects"); #if defined(GD_IDE_ONLY) diff --git a/Extensions/PanelSpriteObject/Extension.cpp b/Extensions/PanelSpriteObject/Extension.cpp index fc15b67fad64..968d57494cb9 100644 --- a/Extensions/PanelSpriteObject/Extension.cpp +++ b/Extensions/PanelSpriteObject/Extension.cpp @@ -14,12 +14,14 @@ This project is released under the MIT License. #include "PanelSpriteObject.h" void DeclarePanelSpriteObjectExtension(gd::PlatformExtension& extension) { - extension.SetExtensionInformation("PanelSpriteObject", - _("Panel Sprite (9-patch) Object"), - _("This Extension enables the use of Panel " - "Sprite (\"9-patch\") Objects."), - "Victor Levasseur and Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation("PanelSpriteObject", + _("Panel Sprite (9-patch) Object"), + _("This Extension enables the use of Panel " + "Sprite (\"9-patch\") Objects."), + "Victor Levasseur and Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/panel_sprite"); gd::ObjectMetadata& obj = extension.AddObject( "PanelSprite", diff --git a/Extensions/ParticleSystem/Extension.cpp b/Extensions/ParticleSystem/Extension.cpp index 085c756475d9..9ad6abf7b099 100644 --- a/Extensions/ParticleSystem/Extension.cpp +++ b/Extensions/ParticleSystem/Extension.cpp @@ -20,7 +20,8 @@ void DeclareParticleSystemExtension(gd::PlatformExtension& extension) { _("Particle system"), _("This Extension can display a large number of small particles."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/particles_emitter"); // Declaration of all objects available { diff --git a/Extensions/PathfindingBehavior/Extension.cpp b/Extensions/PathfindingBehavior/Extension.cpp index e9b7248f07e5..5a94f2f67db9 100644 --- a/Extensions/PathfindingBehavior/Extension.cpp +++ b/Extensions/PathfindingBehavior/Extension.cpp @@ -16,7 +16,8 @@ void DeclarePathfindingBehaviorExtension(gd::PlatformExtension& extension) { _("Pathfinding behavior"), _("Compute paths for objects avoiding obstacles."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/behaviors/pathfinding"); { gd::BehaviorMetadata& aut = extension.AddBehavior( diff --git a/Extensions/PhysicsBehavior/Extension.cpp b/Extensions/PhysicsBehavior/Extension.cpp index 4446c6bfef16..d2c65437de3f 100644 --- a/Extensions/PhysicsBehavior/Extension.cpp +++ b/Extensions/PhysicsBehavior/Extension.cpp @@ -20,7 +20,8 @@ void DeclarePhysicsBehaviorExtension(gd::PlatformExtension& extension) { _("This extension enables the movement of objects as if they are subject " "to the laws of physics."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/behaviors/physics"); { gd::BehaviorMetadata& aut = extension.AddBehavior( diff --git a/Extensions/PlatformBehavior/Extension.cpp b/Extensions/PlatformBehavior/Extension.cpp index 057bbb6486bc..6a1f2d5daf79 100644 --- a/Extensions/PlatformBehavior/Extension.cpp +++ b/Extensions/PlatformBehavior/Extension.cpp @@ -18,7 +18,8 @@ void DeclarePlatformBehaviorExtension(gd::PlatformExtension& extension) { _("This Extension enables the use of controllable objects that can run " "and jump on platforms."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/behaviors/platformer"); { gd::BehaviorMetadata& aut = extension.AddBehavior( diff --git a/Extensions/PlatformBehavior/JsExtension.cpp b/Extensions/PlatformBehavior/JsExtension.cpp index 3c9e9e11260e..230d48b1d64f 100644 --- a/Extensions/PlatformBehavior/JsExtension.cpp +++ b/Extensions/PlatformBehavior/JsExtension.cpp @@ -23,12 +23,6 @@ class PlatformBehaviorJsExtension : public gd::PlatformExtension { * contains: objects, actions, conditions and expressions. */ PlatformBehaviorJsExtension() { - SetExtensionInformation("PlatformBehavior", - _("Platform Behavior"), - _("Allows to use controllable objects which can " - "run and jump on platforms."), - "Florian Rival", - "Open source (MIT License)"); DeclarePlatformBehaviorExtension(*this); GetBehaviorMetadata("PlatformBehavior::PlatformBehavior") diff --git a/Extensions/PrimitiveDrawing/Extension.cpp b/Extensions/PrimitiveDrawing/Extension.cpp index a001ae4928ad..4cfc1b79c92f 100644 --- a/Extensions/PrimitiveDrawing/Extension.cpp +++ b/Extensions/PrimitiveDrawing/Extension.cpp @@ -10,12 +10,14 @@ This project is released under the MIT License. #include "ShapePainterObject.h" void DeclarePrimitiveDrawingExtension(gd::PlatformExtension& extension) { - extension.SetExtensionInformation( - "PrimitiveDrawing", - _("Primitive drawing"), - _("This Extension allows you to draw shapes and manipulate images."), - "Florian Rival", - "Open source (MIT License)"); + extension + .SetExtensionInformation( + "PrimitiveDrawing", + _("Primitive drawing"), + _("This Extension allows you to draw shapes and manipulate images."), + "Florian Rival", + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/shape_painter"); gd::ObjectMetadata& obj = extension.AddObject( "Drawer", //"Drawer" is kept for compatibility with GD<=3.6.76 diff --git a/Extensions/Shopify/JsExtension.cpp b/Extensions/Shopify/JsExtension.cpp index 196f8d463182..724d655606cf 100644 --- a/Extensions/Shopify/JsExtension.cpp +++ b/Extensions/Shopify/JsExtension.cpp @@ -15,7 +15,8 @@ void DeclareShopifyExtension(gd::PlatformExtension& extension) { _("Interact with products and generate URLs for checkouts with your " "Shopify shop."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/all-features/shopify"); #if defined(GD_IDE_ONLY) extension diff --git a/Extensions/TextEntryObject/Extension.cpp b/Extensions/TextEntryObject/Extension.cpp index 699f46ac39eb..d81d5d644df5 100644 --- a/Extensions/TextEntryObject/Extension.cpp +++ b/Extensions/TextEntryObject/Extension.cpp @@ -16,7 +16,8 @@ void DeclareTextEntryObjectExtension(gd::PlatformExtension& extension) { _("This Extension enables the use of an object that captures text " "entered with a keyboard by a player."), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/text_entry"); gd::ObjectMetadata& obj = extension.AddObject( "TextEntry", diff --git a/Extensions/TextObject/Extension.cpp b/Extensions/TextObject/Extension.cpp index 44d10e2eb485..d230de9eabf3 100644 --- a/Extensions/TextObject/Extension.cpp +++ b/Extensions/TextObject/Extension.cpp @@ -20,7 +20,8 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) { _("Text object"), _("This Extension enables the use of an object that displays text."), "Florian Rival and Victor Levasseur", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/text"); gd::ObjectMetadata& obj = extension.AddObject("Text", diff --git a/Extensions/TiledSpriteObject/Extension.cpp b/Extensions/TiledSpriteObject/Extension.cpp index 242bbeaa48e8..cee67d59c8b9 100644 --- a/Extensions/TiledSpriteObject/Extension.cpp +++ b/Extensions/TiledSpriteObject/Extension.cpp @@ -17,7 +17,8 @@ void DeclareTiledSpriteObjectExtension(gd::PlatformExtension& extension) { _("Tiled Sprite Object"), _("This Extension enables the use of Tiled Sprite Objects."), "Victor Levasseur and Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/objects/tiled_sprite"); gd::ObjectMetadata& obj = extension.AddObject( "TiledSprite", diff --git a/Extensions/TopDownMovementBehavior/Extension.cpp b/Extensions/TopDownMovementBehavior/Extension.cpp index 1e35d94a21e5..393466255eaf 100644 --- a/Extensions/TopDownMovementBehavior/Extension.cpp +++ b/Extensions/TopDownMovementBehavior/Extension.cpp @@ -14,9 +14,10 @@ void DeclareTopDownMovementBehaviorExtension(gd::PlatformExtension& extension) { extension.SetExtensionInformation( "TopDownMovementBehavior", _("Top-down movement"), - _("Move objects with either 4 or 8 directions"), + _("Move objects in either 4 or 8 directions"), "Florian Rival", - "Open source (MIT License)"); + "Open source (MIT License)") + .SetExtensionHelpPath("/behaviors/topdown"); gd::BehaviorMetadata& aut = extension.AddBehavior("TopDownMovementBehavior", diff --git a/GDJS/GDJS/Extensions/Builtin/AdvancedExtension.cpp b/GDJS/GDJS/Extensions/Builtin/AdvancedExtension.cpp index 3d9b70618e62..bae3b493d412 100644 --- a/GDJS/GDJS/Extensions/Builtin/AdvancedExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/AdvancedExtension.cpp @@ -14,13 +14,6 @@ namespace gdjs { AdvancedExtension::AdvancedExtension() { gd::BuiltinExtensionsImplementer::ImplementsAdvancedExtension(*this); - SetExtensionInformation( - "BuiltinAdvanced", - _("Advanced control features"), - _("Built-in extension providing advanced control features."), - "Florian Rival", - "Open source (MIT License)"); - GetAllConditions()["Toujours"].SetFunctionName( "gdjs.evtTools.common.logicalNegation"); } diff --git a/GDJS/GDJS/Extensions/Builtin/AudioExtension.cpp b/GDJS/GDJS/Extensions/Builtin/AudioExtension.cpp index 06a7888585b7..a92efef8a8ea 100644 --- a/GDJS/GDJS/Extensions/Builtin/AudioExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/AudioExtension.cpp @@ -15,12 +15,6 @@ namespace gdjs { AudioExtension::AudioExtension() { gd::BuiltinExtensionsImplementer::ImplementsAudioExtension(*this); - SetExtensionInformation("BuiltinAudio", - _("Audio"), - _("Builtin audio extension"), - "Florian Rival", - "Open source (MIT License)"); - GetAllActions()["PlaySound"].SetFunctionName("gdjs.evtTools.sound.playSound"); GetAllActions()["PlaySoundCanal"].SetFunctionName( "gdjs.evtTools.sound.playSoundOnChannel"); diff --git a/GDJS/GDJS/Extensions/Builtin/BaseObjectExtension.cpp b/GDJS/GDJS/Extensions/Builtin/BaseObjectExtension.cpp index 40391aa00b5c..85ebafcaa3a3 100644 --- a/GDJS/GDJS/Extensions/Builtin/BaseObjectExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/BaseObjectExtension.cpp @@ -17,12 +17,6 @@ namespace gdjs { BaseObjectExtension::BaseObjectExtension() { gd::BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(*this); - SetExtensionInformation("BuiltinObject", - _("Base object"), - _("Base object"), - "Florian Rival", - "Open source (MIT License)"); - std::map &objectActions = GetAllActionsForObject(""); std::map &objectConditions = diff --git a/GDJS/GDJS/Extensions/Builtin/CameraExtension.cpp b/GDJS/GDJS/Extensions/Builtin/CameraExtension.cpp index 553d587aa73f..0e4ffdfd7ec5 100644 --- a/GDJS/GDJS/Extensions/Builtin/CameraExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/CameraExtension.cpp @@ -13,12 +13,6 @@ namespace gdjs { CameraExtension::CameraExtension() { gd::BuiltinExtensionsImplementer::ImplementsCameraExtension(*this); - SetExtensionInformation("BuiltinCamera", - _("Cameras and layers features"), - _("Builtin camera extension"), - "Florian Rival", - "Open source (MIT License)"); - GetAllActions()["CameraX"] .SetFunctionName("gdjs.evtTools.camera.setCameraX") .SetGetter("gdjs.evtTools.camera.getCameraX"); diff --git a/GDJS/GDJS/Extensions/Builtin/CommonConversionsExtension.cpp b/GDJS/GDJS/Extensions/Builtin/CommonConversionsExtension.cpp index d2cf4901cc69..3702ca7b3964 100644 --- a/GDJS/GDJS/Extensions/Builtin/CommonConversionsExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/CommonConversionsExtension.cpp @@ -15,13 +15,6 @@ namespace gdjs { CommonConversionsExtension::CommonConversionsExtension() { gd::BuiltinExtensionsImplementer::ImplementsCommonConversionsExtension(*this); - SetExtensionInformation( - "BuiltinCommonConversions", - _("Standard Conversions"), - _("Built-in extension providing standard conversions expressions."), - "Florian Rival", - "Open source (MIT License)"); - GetAllExpressions()["ToNumber"].SetFunctionName( "gdjs.evtTools.common.toNumber"); GetAllStrExpressions()["ToString"].SetFunctionName( diff --git a/GDJS/GDJS/Extensions/Builtin/CommonInstructionsExtension.cpp b/GDJS/GDJS/Extensions/Builtin/CommonInstructionsExtension.cpp index cd470de82fdc..9381dec65d18 100644 --- a/GDJS/GDJS/Extensions/Builtin/CommonInstructionsExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/CommonInstructionsExtension.cpp @@ -37,12 +37,6 @@ CommonInstructionsExtension::CommonInstructionsExtension() { gd::BuiltinExtensionsImplementer::ImplementsCommonInstructionsExtension( *this); - SetExtensionInformation("BuiltinCommonInstructions", - _("Standard events"), - _("Built-in extension providing standard events."), - "Florian Rival", - "Open source (MIT License)"); - GetAllEvents()["BuiltinCommonInstructions::Link"].SetPreprocessing( [](gd::BaseEvent& event_, gd::EventsCodeGenerator& codeGenerator, diff --git a/GDJS/GDJS/Extensions/Builtin/ExternalLayoutsExtension.cpp b/GDJS/GDJS/Extensions/Builtin/ExternalLayoutsExtension.cpp index f034c0795c0f..df773ddb2239 100644 --- a/GDJS/GDJS/Extensions/Builtin/ExternalLayoutsExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/ExternalLayoutsExtension.cpp @@ -15,13 +15,6 @@ namespace gdjs { ExternalLayoutsExtension::ExternalLayoutsExtension() { gd::BuiltinExtensionsImplementer::ImplementsExternalLayoutsExtension(*this); - SetExtensionInformation("BuiltinExternalLayouts", - _("External layouts"), - _("Built-in extension providing actions and " - "conditions related to external layouts"), - "Florian Rival", - "Open source (MIT License)"); - GetAllActions()["BuiltinExternalLayouts::CreateObjectsFromExternalLayout"] .SetFunctionName( "gdjs.evtTools.runtimeScene.createObjectsFromExternalLayout"); diff --git a/GDJS/GDJS/Extensions/Builtin/FileExtension.cpp b/GDJS/GDJS/Extensions/Builtin/FileExtension.cpp index 3f98d5cca68a..bb4a05c8d445 100644 --- a/GDJS/GDJS/Extensions/Builtin/FileExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/FileExtension.cpp @@ -15,13 +15,6 @@ namespace gdjs { FileExtension::FileExtension() { gd::BuiltinExtensionsImplementer::ImplementsFileExtension(*this); - SetExtensionInformation( - "BuiltinFile", - _("Files"), - _("Built-in extension providing functions for storing data."), - "Florian Rival", - "Open source (MIT License)"); - GetAllActions()["LoadFile"].SetFunctionName( "gdjs.evtTools.storage.loadJSONFileFromStorage"); GetAllConditions()["GroupExists"].SetFunctionName( diff --git a/GDJS/GDJS/Extensions/Builtin/JoystickExtension.cpp b/GDJS/GDJS/Extensions/Builtin/JoystickExtension.cpp index 7467be9e777b..07ea972be1b0 100644 --- a/GDJS/GDJS/Extensions/Builtin/JoystickExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/JoystickExtension.cpp @@ -17,12 +17,6 @@ namespace gdjs { JoystickExtension::JoystickExtension() { gd::BuiltinExtensionsImplementer::ImplementsJoystickExtension(*this); - SetExtensionInformation("BuiltinJoystick", - _("Joysticks features"), - _("Built-in extension allowing to use joysticks"), - "Florian Rival", - "Open source (MIT License)"); - // Nothing is available for now. StripUnimplementedInstructionsAndExpressions(); // Unimplemented things are // listed here: diff --git a/GDJS/GDJS/Extensions/Builtin/MathematicalToolsExtension.cpp b/GDJS/GDJS/Extensions/Builtin/MathematicalToolsExtension.cpp index da62cf48c412..c81f61de28b6 100644 --- a/GDJS/GDJS/Extensions/Builtin/MathematicalToolsExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/MathematicalToolsExtension.cpp @@ -17,12 +17,6 @@ namespace gdjs { MathematicalToolsExtension::MathematicalToolsExtension() { gd::BuiltinExtensionsImplementer::ImplementsMathematicalToolsExtension(*this); - SetExtensionInformation("BuiltinMathematicalTools", - _("Mathematical tools"), - _("Built-in extension providing mathematical tools"), - "Florian Rival", - "Open source (MIT License)"); - GetAllExpressions()["cos"].SetFunctionName("Math.cos"); GetAllExpressions()["sin"].SetFunctionName("Math.sin"); GetAllExpressions()["tan"].SetFunctionName("Math.tan"); diff --git a/GDJS/GDJS/Extensions/Builtin/MouseExtension.cpp b/GDJS/GDJS/Extensions/Builtin/MouseExtension.cpp index 3d719270ba91..3414d96258cc 100644 --- a/GDJS/GDJS/Extensions/Builtin/MouseExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/MouseExtension.cpp @@ -17,12 +17,6 @@ namespace gdjs { MouseExtension::MouseExtension() { gd::BuiltinExtensionsImplementer::ImplementsMouseExtension(*this); - SetExtensionInformation("BuiltinMouse", - _("Mouse features"), - _("Built-in extension allowing to use the mouse"), - "Florian Rival", - "Open source (MIT License)"); - GetAllConditions()["SourisX"].SetFunctionName( "gdjs.evtTools.input.getMouseX"); GetAllConditions()["SourisY"].SetFunctionName( diff --git a/GDJS/GDJS/Extensions/Builtin/NetworkExtension.cpp b/GDJS/GDJS/Extensions/Builtin/NetworkExtension.cpp index 4bfd70aecfcb..0c32b20e7586 100644 --- a/GDJS/GDJS/Extensions/Builtin/NetworkExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/NetworkExtension.cpp @@ -15,12 +15,6 @@ namespace gdjs { NetworkExtension::NetworkExtension() { gd::BuiltinExtensionsImplementer::ImplementsNetworkExtension(*this); - SetExtensionInformation("BuiltinNetwork", - _("Basic internet features"), - _("Built-in extension providing network features."), - "Florian Rival", - "Open source (MIT License)"); - GetAllActions()["SendRequest"].SetFunctionName( "gdjs.evtTools.network.sendHttpRequest"); GetAllActions()["JSONToVariableStructure"].SetFunctionName( diff --git a/GDJS/GDJS/Extensions/Builtin/SceneExtension.cpp b/GDJS/GDJS/Extensions/Builtin/SceneExtension.cpp index 8fce8ac329d6..d46a5e4d8706 100644 --- a/GDJS/GDJS/Extensions/Builtin/SceneExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/SceneExtension.cpp @@ -17,12 +17,6 @@ namespace gdjs { SceneExtension::SceneExtension() { gd::BuiltinExtensionsImplementer::ImplementsSceneExtension(*this); - SetExtensionInformation("BuiltinScene", - _("Scene management features"), - _("Built-in extension allowing to manipulate scenes"), - "Florian Rival", - "Open source (MIT License)"); - GetAllExpressions()["Random"].SetFunctionName("gdjs.random"); GetAllExpressions()["RandomInRange"].SetFunctionName("gdjs.randomInRange"); GetAllExpressions()["RandomFloat"].SetFunctionName("gdjs.randomFloat"); diff --git a/GDJS/GDJS/Extensions/Builtin/SpriteExtension.cpp b/GDJS/GDJS/Extensions/Builtin/SpriteExtension.cpp index b68c7598b262..0c128b907fb0 100644 --- a/GDJS/GDJS/Extensions/Builtin/SpriteExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/SpriteExtension.cpp @@ -13,14 +13,6 @@ namespace gdjs { SpriteExtension::SpriteExtension() { gd::BuiltinExtensionsImplementer::ImplementsSpriteExtension(*this); - SetExtensionInformation( - "Sprite", - _("Sprite"), - _("Extension for adding animated objects in the scene, which can contain " - "animations with directions within each."), - "Florian Rival", - "Open source (MIT License)"); - auto& spriteActions = GetAllActionsForObject("Sprite"); auto& spriteConditions = GetAllConditionsForObject("Sprite"); auto& spriteExpressions = GetAllExpressionsForObject("Sprite"); diff --git a/GDJS/GDJS/Extensions/Builtin/StringInstructionsExtension.cpp b/GDJS/GDJS/Extensions/Builtin/StringInstructionsExtension.cpp index ecc02cbfb7b7..2b23ac9955b4 100644 --- a/GDJS/GDJS/Extensions/Builtin/StringInstructionsExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/StringInstructionsExtension.cpp @@ -16,13 +16,6 @@ StringInstructionsExtension::StringInstructionsExtension() { gd::BuiltinExtensionsImplementer::ImplementsStringInstructionsExtension( *this); - SetExtensionInformation( - "BuiltinStringInstructions", - _("Text manipulation"), - _("Built-in extension providing expressions related to strings."), - "Florian Rival", - "Open source (MIT License)"); - GetAllStrExpressions()["NewLine"].SetFunctionName( "gdjs.evtTools.string.newLine"); GetAllStrExpressions()["FromCodePoint"].SetFunctionName( diff --git a/GDJS/GDJS/Extensions/Builtin/TimeExtension.cpp b/GDJS/GDJS/Extensions/Builtin/TimeExtension.cpp index 545ca3b5be76..51bbb4de716b 100644 --- a/GDJS/GDJS/Extensions/Builtin/TimeExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/TimeExtension.cpp @@ -17,13 +17,6 @@ namespace gdjs { TimeExtension::TimeExtension() { gd::BuiltinExtensionsImplementer::ImplementsTimeExtension(*this); - SetExtensionInformation( - "BuiltinTime", - _("Time"), - _("Built-in extension providing actions and conditions about the time."), - "Florian Rival", - "Open source (MIT License)"); - GetAllConditions()["Timer"].SetFunctionName( "gdjs.evtTools.runtimeScene.timerElapsedTime"); GetAllConditions()["TimerPaused"].SetFunctionName( diff --git a/GDJS/GDJS/Extensions/Builtin/VariablesExtension.cpp b/GDJS/GDJS/Extensions/Builtin/VariablesExtension.cpp index e5b914c5df8a..daa7687c62c2 100644 --- a/GDJS/GDJS/Extensions/Builtin/VariablesExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/VariablesExtension.cpp @@ -22,13 +22,6 @@ namespace gdjs { VariablesExtension::VariablesExtension() { gd::BuiltinExtensionsImplementer::ImplementsVariablesExtension(*this); - SetExtensionInformation( - "BuiltinVariables", - _("Variable features"), - _("Built-in extension allowing to manipulate variables"), - "Florian Rival", - "Open source (MIT License)"); - GetAllConditions()["VarScene"].SetFunctionName( "gdjs.evtTools.common.getVariableNumber"); GetAllConditions()["VarSceneTxt"].SetFunctionName( diff --git a/GDJS/GDJS/Extensions/Builtin/WindowExtension.cpp b/GDJS/GDJS/Extensions/Builtin/WindowExtension.cpp index 6ed117bde1a7..5807e5eaae4e 100644 --- a/GDJS/GDJS/Extensions/Builtin/WindowExtension.cpp +++ b/GDJS/GDJS/Extensions/Builtin/WindowExtension.cpp @@ -15,13 +15,6 @@ namespace gdjs { WindowExtension::WindowExtension() { gd::BuiltinExtensionsImplementer::ImplementsWindowExtension(*this); - SetExtensionInformation( - "BuiltinWindow", - _("Window features"), - _("Built-in extension allowing to manipulate the game's window"), - "Florian Rival", - "Open source (MIT License)"); - GetAllActions()["SetFullScreen"].SetFunctionName( "gdjs.evtTools.window.setFullScreen"); GetAllActions()["SetWindowMargins"].SetFunctionName( diff --git a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionParametersEditor.js b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionParametersEditor.js index 9daed28272c9..6a8158c815c6 100644 --- a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionParametersEditor.js +++ b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionParametersEditor.js @@ -4,6 +4,7 @@ import Toggle from 'material-ui/Toggle'; import { mapFor } from '../../Utils/MapFor'; import EmptyMessage from '../../UI/EmptyMessage'; import ParameterRenderingService from './ParameterRenderingService'; +import HelpButton from '../../UI/HelpButton'; const gd = global.gd; const styles = { @@ -69,6 +70,7 @@ export default class InstructionParametersEditor extends Component { project.getCurrentPlatform(), type ); + const helpPage = instructionMetadata.getHelpPath(); //TODO? instruction.setParametersCount(instructionMetadata.getParametersCount()); @@ -136,6 +138,18 @@ export default class InstructionParametersEditor extends Component { /> )} +
+ {helpPage && ( + + )} +
); }