GDevelop JS Platform
Platform for developing HTML5/Javascript based games with GDevelop
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
gdjs::Exporter Class Reference

Export a project or a layout to a playable HTML5/Javascript based game. More...

#include <Exporter.h>

Public Member Functions

 Exporter (gd::AbstractFileSystem &fileSystem, gd::String gdjsRoot_="./JsPlatform")
 
bool ExportLayoutForPixiPreview (gd::Project &project, gd::Layout &layout, gd::String exportDir)
 Create a preview for the specified layout. More...
 
bool ExportExternalLayoutForPixiPreview (gd::Project &project, gd::Layout &layout, gd::ExternalLayout &externalLayout, gd::String exportDir)
 Create a preview for the specified external layout and layout. More...
 
bool ExportWholePixiProject (gd::Project &project, gd::String exportDir, std::map< gd::String, bool > &exportOptions)
 Export the specified project, using Pixi.js. More...
 
bool ExportWholeCocos2dProject (gd::Project &project, bool debugMode, gd::String exportDir)
 Export the specified project, using Cocos2d. More...
 
const gd::String & GetLastError () const
 Return the error that occurred during the last export.
 
void SetCodeOutputDirectory (gd::String codeOutputDir_)
 Change the directory where code files are generated. More...
 

Detailed Description

Export a project or a layout to a playable HTML5/Javascript based game.

Member Function Documentation

bool gdjs::Exporter::ExportExternalLayoutForPixiPreview ( gd::Project &  project,
gd::Layout &  layout,
gd::ExternalLayout &  externalLayout,
gd::String  exportDir 
)

Create a preview for the specified external layout and layout.

Note
The preview is not launched, it is the caller responsibility to open a browser pointing to the preview.
Parameters
layoutThe layout to be previewed.
externalLayoutThe external layout with objects to be created at scene startup.
exportDirThe directory where the preview must be created.
Returns
true if export was successful.
bool gdjs::Exporter::ExportLayoutForPixiPreview ( gd::Project &  project,
gd::Layout &  layout,
gd::String  exportDir 
)

Create a preview for the specified layout.

Note
The preview is not launched, it is the caller responsibility to open a browser pointing to the preview.
Parameters
layoutThe layout to be previewed.
exportDirThe directory where the preview must be created.
Returns
true if export was successful.
bool gdjs::Exporter::ExportWholeCocos2dProject ( gd::Project &  project,
bool  debugMode,
gd::String  exportDir 
)

Export the specified project, using Cocos2d.

Called by ShowProjectExportDialog if the user clicked on Ok.

bool gdjs::Exporter::ExportWholePixiProject ( gd::Project &  project,
gd::String  exportDir,
std::map< gd::String, bool > &  exportOptions 
)

Export the specified project, using Pixi.js.

Called by ShowProjectExportDialog if the user clicked on Ok.

void gdjs::Exporter::SetCodeOutputDirectory ( gd::String  codeOutputDir_)
inline

Change the directory where code files are generated.

By default, this is set to a temporary directory.


The documentation for this class was generated from the following files: