GDevelop JS Platform
Platform for developing HTML5/Javascript based games with GDevelop
JsPlatform.h
1 /*
2  * GDevelop JS Platform
3  * Copyright 2008-2016 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #ifndef JSPLATFORM_H
7 #define JSPLATFORM_H
8 #include "GDCore/CommonTools.h"
9 #include "GDCore/Extensions/Platform.h"
10 #include "GDCore/Extensions/PlatformExtension.h"
11 #include "GDCore/Tools/Localization.h"
12 
13 namespace gdjs {
14 
24 class GD_API JsPlatform : public gd::Platform {
25  public:
26  virtual gd::String GetName() const { return "GDevelop JS platform"; }
27  virtual gd::String GetFullName() const {
28  return _("HTML5 (Web and Android games)");
29  }
30  virtual gd::String GetSubtitle() const {
31  return _("HTML5 and javascript based games for web browsers.");
32  }
33  virtual gd::String GetDescription() const {
34  return _(
35  "Enables the creation of 2D games that can be played in web browsers. "
36  "These can also be exported to Android with third-party tools.");
37  }
38  virtual gd::String GetIcon() const { return "JsPlatform/icon32.png"; }
39 
43  virtual gd::String GetExtensionCreateFunctionName() {
44  return "CreateGDJSExtension";
45  }
46 
47  void AddNewExtension(const gd::PlatformExtension& extension);
48 
54  virtual void ReloadBuiltinExtensions();
55 
59  static JsPlatform& Get();
60 
66  static void DestroySingleton();
67 
68  JsPlatform();
69  virtual ~JsPlatform(){};
70 
71  private:
72 
73  static JsPlatform* singleton;
74 };
75 
76 } // namespace gdjs
77 
78 #endif // JSPLATFORM_H
GDevelop Javascript Platform.
Definition: JsPlatform.h:24
virtual gd::String GetExtensionCreateFunctionName()
The name of the function searched in an extension file to create the extension.
Definition: JsPlatform.h:43