Files
GDevelop/Extensions/SystemInfo/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

47 lines
1.3 KiB
C++

/**
GDevelop - SystemInfo Extension
Copyright (c) 2016 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 "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("SystemInfo",
_("System information"),
_("Provides information about the system running the game"),
"Florian Rival",
"Open source (MIT License)");
CloneExtension("GDevelop C++ platform", "SystemInfo");
GetAllConditions()["SystemInfo::IsMobile"].codeExtraInformation.SetIncludeFile("SystemInfo/systeminfotools.js")
.SetFunctionName("gdjs.evtTools.systemInfo.isMobile");
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