Files
GDevelop/Extensions/LinkedObjects/JsExtension.cpp
T
Victor Levasseur 72df404d7f Automatic versioning (#311)
* Use the port number in SendHttpRequest and DownloadFile

* Fix "Custom size" and "Custom viewports" not displayed in layer propgrid

* Fix Fedora spec file

* Use automatic versioning from git

* A "correct" version number is now generated even if git is unable to find a tag
2016-11-11 11:32:56 +01:00

57 lines
2.2 KiB
C++

/**
GDevelop - LinkedObjects Extension
Copyright (c) 2008-2013 Florian Rival (Florian.Rival@gmail.com)
This project is released under the MIT License.
*/
#if defined(GD_IDE_ONLY)
#include "GDCore/Extensions/PlatformExtension.h"
#include <iostream>
#include "GDCore/Tools/Localization.h"
/**
* \brief This class declares information about the JS extension.
*/
class JsExtension : public gd::PlatformExtension
{
public:
/**
* \brief Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
*/
JsExtension()
{
SetExtensionInformation("LinkedObjects",
_("Linked objects"),
_("Extension allowing to virtually link two objects."),
"Florian Rival",
"Open source (MIT License)");
CloneExtension("GDevelop C++ platform", "LinkedObjects");
GetAllActions()["LinkedObjects::LinkObjects"].codeExtraInformation.SetIncludeFile("LinkedObjects/linkedobjects.js")
.SetFunctionName("gdjs.evtTools.linkedObjects.linkObjects");
GetAllActions()["LinkedObjects::RemoveLinkBetween"].codeExtraInformation.SetIncludeFile("LinkedObjects/linkedobjects.js")
.SetFunctionName("gdjs.evtTools.linkedObjects.removeLinkBetween");
GetAllActions()["LinkedObjects::RemoveAllLinksOf"].codeExtraInformation.SetIncludeFile("LinkedObjects/linkedobjects.js")
.SetFunctionName("gdjs.evtTools.linkedObjects.removeAllLinksOf");
GetAllActions()["LinkedObjects::PickObjectsLinkedTo"].codeExtraInformation.SetIncludeFile("LinkedObjects/linkedobjects.js")
.SetFunctionName("gdjs.evtTools.linkedObjects.pickObjectsLinkedTo");
GetAllConditions()["LinkedObjects::PickObjectsLinkedTo"].codeExtraInformation.SetIncludeFile("LinkedObjects/linkedobjects.js")
.SetFunctionName("gdjs.evtTools.linkedObjects.pickObjectsLinkedTo");
StripUnimplementedInstructionsAndExpressions();
};
};
/**
* Used by GDevelop to create the extension class
* -- Do not need to be modified. --
*/
extern "C" gd::PlatformExtension * GD_EXTENSION_API CreateGDJSExtension() {
return new JsExtension;
}
#endif