Base class representing a project (game), including all resources, scenes, objects, extensions...
More...
|
| Project (const Project &) |
|
Project & | operator= (const Project &rhs) |
|
void | UnserializeFrom (const SerializerElement &element) |
| Unserialize the project from an element.
|
|
void | SerializeTo (SerializerElement &element) const |
| Serialize the project. More...
|
|
unsigned int | GetLastSaveGDMajorVersion () |
|
unsigned int | GetLastSaveGDMinorVersion () |
|
unsigned int | GetLastSaveGDBuildVersion () |
|
gd::WholeProjectDiagnosticReport & | GetWholeProjectDiagnosticReport () |
|
|
Some properties for the project
|
void | SetName (const gd::String &name_) |
| Change the project name.
|
|
const gd::String & | GetName () const |
| Get the project name.
|
|
const std::vector< gd::String > & | GetCategories () const |
| Get the categories/genres of the project.
|
|
std::vector< gd::String > & | GetCategories () |
| Get the categories of the project, to modify them (non-const).
|
|
void | SetDescription (const gd::String &description_) |
| Change the project description.
|
|
const gd::String & | GetDescription () const |
| Get the project description.
|
|
void | SetVersion (const gd::String &version_) |
| Change the version of the project. This can be freely set, but should follow "X.Y.Z" format for compatibility with some exporters.
|
|
const gd::String & | GetVersion () const |
| Get the project version.
|
|
void | SetAuthor (const gd::String &author_) |
| Change the author of the project.
|
|
const gd::String & | GetAuthor () const |
| Get the project author name.
|
|
const std::vector< gd::String > & | GetAuthorIds () const |
| Get the author ids of the project.
|
|
std::vector< gd::String > & | GetAuthorIds () |
| Get the author ids of the project, to modify them (non-const).
|
|
const std::vector< gd::String > & | GetAuthorUsernames () const |
| Get the author usernames of the project.
|
|
std::vector< gd::String > & | GetAuthorUsernames () |
| Get the author usernames of the project, to modify them (non-const).
|
|
void | SetPlayableWithKeyboard (bool playable=true) |
|
bool | IsPlayableWithKeyboard () const |
|
void | SetPlayableWithGamepad (bool playable=true) |
|
bool | IsPlayableWithGamepad () const |
|
void | SetPlayableWithMobile (bool playable=true) |
|
bool | IsPlayableWithMobile () const |
|
void | SetPackageName (const gd::String &packageName_) |
| Change the project package name.
|
|
const gd::String & | GetPackageName () const |
| Get the project package name.
|
|
void | SetTemplateSlug (const gd::String &templateSlug_) |
| Change the slug of the template from which the project is created.
|
|
const gd::String & | GetTemplateSlug () const |
| Get the slug of the template from which the project is created.
|
|
void | SetOrientation (const gd::String &orientation_) |
| Change the project orientation (in particular when exported with Cordova). This has no effect on desktop and web browsers. More...
|
|
const gd::String & | GetOrientation () const |
| Get the project orientation ("default", "landscape", "portrait").
|
|
void | SetProjectFile (const gd::String &file) |
|
const gd::String & | GetProjectFile () const |
|
void | SetFolderProject (bool enable=true) |
|
bool | IsFolderProject () const |
|
void | SetLastCompilationDirectory (const gd::String &dir) |
|
const gd::String & | GetLastCompilationDirectory () const |
|
gd::PlatformSpecificAssets & | GetPlatformSpecificAssets () |
| Return a reference to platform assets of the project (icons, splashscreen...).
|
|
const gd::PlatformSpecificAssets & | GetPlatformSpecificAssets () const |
| Return a reference to platform assets of the project (icons, splashscreen...).
|
|
gd::LoadingScreen & | GetLoadingScreen () |
| Return a reference to loading screen setup for the project.
|
|
const gd::LoadingScreen & | GetLoadingScreen () const |
| Return a reference to loading screen setup for the project.
|
|
gd::Watermark & | GetWatermark () |
| Return a reference to watermark setup for the project.
|
|
const gd::Watermark & | GetWatermark () const |
| Return a reference to watermark setup for the project.
|
|
void | SetGameResolutionSize (unsigned int width, unsigned int height) |
|
unsigned int | GetGameResolutionWidth () const |
| Returns the default game resolution width.
|
|
unsigned int | GetGameResolutionHeight () const |
| Returns the default game resolution height.
|
|
bool | GetAdaptGameResolutionAtRuntime () const |
| Returns true if the game resolution should be adapted to the window size at runtime.
|
|
void | SetAdaptGameResolutionAtRuntime (bool adaptGameResolutionAtRuntime_) |
| Set if the game resolution should be adapted to the window size at runtime. More...
|
|
const gd::String & | GetSizeOnStartupMode () const |
| Get how the game size should be adapted to the screen.
|
|
void | SetSizeOnStartupMode (const gd::String &mode) |
| Set how to adapt the game size to the screen. More...
|
|
void | SetMaximumFPS (int maxFPS_) |
|
int | GetMaximumFPS () const |
|
void | SetMinimumFPS (unsigned int minFPS_) |
|
unsigned int | GetMinimumFPS () const |
|
bool | IsVerticalSynchronizationEnabledByDefault () const |
|
void | SetVerticalSyncActivatedByDefault (bool enable) |
|
const gd::String & | GetScaleMode () const |
|
void | SetScaleMode (const gd::String &scaleMode_) |
|
bool | GetPixelsRounding () const |
|
void | SetPixelsRounding (bool enable) |
|
const gd::String & | GetAntialiasingMode () const |
|
void | SetAntialiasingMode (const gd::String &antialiasingMode_) |
|
bool | IsAntialisingEnabledOnMobile () const |
|
void | SetAntialisingEnabledOnMobile (bool enable) |
|
bool | GetUseDeprecatedZeroAsDefaultZOrder () const |
| Return if the project should set 0 as Z-order for objects created from events (which is deprecated) - instead of the highest Z order that was found on each layer when the scene started.
|
|
void | SetUseDeprecatedZeroAsDefaultZOrder (bool enable) |
| Set if the project should set 0 as Z-order for objects created from events (which is deprecated) - instead of the highest Z order that was found on each layer when the scene started.
|
|
void | SetProjectUuid (const gd::String &projectUuid_) |
| Change the project UUID.
|
|
const gd::String & | GetProjectUuid () const |
| Get the project UUID, useful when using the game on online services that would require a unique identifier.
|
|
void | ResetProjectUuid () |
| Create a new project UUID.
|
|
gd::ExtensionProperties & | GetExtensionProperties () |
| Get the properties set by extensions. More...
|
|
const gd::ExtensionProperties & | GetExtensionProperties () const |
| Get the properties set by extensions. More...
|
|
const std::vector< Platform * > & | GetUsedPlatforms () const |
|
void | AddPlatform (Platform &platform) |
|
bool | RemovePlatform (const gd::String &platformName) |
|
Platform & | GetCurrentPlatform () const |
| Return a reference to the platform being currently used to edit the project.
|
|
void | SetCurrentPlatform (const gd::String &platformName) |
| Set the platform to be used to edit the project. More...
|
|
|
Member functions used to create objects for the project
|
std::unique_ptr< gd::Object > | CreateObject (const gd::String &type, const gd::String &name) const |
|
void | EnsureObjectDefaultBehaviors (gd::Object &object) const |
|
std::shared_ptr< gd::BaseEvent > | CreateEvent (const gd::String &type, const gd::String &platformName="") |
|
|
Members functions related to layout management.
|
bool | HasLayoutNamed (const gd::String &name) const |
| Return true if layout called "name" exists.
|
|
Layout & | GetLayout (const gd::String &name) |
| Return a reference to the layout called "name".
|
|
const Layout & | GetLayout (const gd::String &name) const |
| Return a reference to the layout called "name".
|
|
Layout & | GetLayout (std::size_t index) |
| Return a reference to the layout at position "index" in the layout list.
|
|
const Layout & | GetLayout (std::size_t index) const |
| Return a reference to the layout at position "index" in the layout list.
|
|
std::size_t | GetLayoutPosition (const gd::String &name) const |
| Return the position of the layout called "name" in the layout list.
|
|
void | MoveLayout (std::size_t oldIndex, std::size_t newIndex) |
|
void | SwapLayouts (std::size_t first, std::size_t second) |
| Swap the specified layouts. More...
|
|
std::size_t | GetLayoutsCount () const |
| Return the number of layouts.
|
|
gd::Layout & | InsertNewLayout (const gd::String &name, std::size_t position) |
| Add a new empty layout called "name" at the specified position in the layout list.
|
|
gd::Layout & | InsertLayout (const Layout &layout, std::size_t position) |
| Add a new layout constructed from the layout passed as parameter. More...
|
|
void | RemoveLayout (const gd::String &name) |
| Delete layout named "name".
|
|
|
Members functions related to external events management.
|
bool | HasExternalEventsNamed (const gd::String &name) const |
|
ExternalEvents & | GetExternalEvents (const gd::String &name) |
|
const ExternalEvents & | GetExternalEvents (const gd::String &name) const |
|
ExternalEvents & | GetExternalEvents (std::size_t index) |
|
const ExternalEvents & | GetExternalEvents (std::size_t index) const |
|
std::size_t | GetExternalEventsPosition (const gd::String &name) const |
|
void | MoveExternalEvents (std::size_t oldIndex, std::size_t newIndex) |
|
void | SwapExternalEvents (std::size_t first, std::size_t second) |
| Swap the specified external events. More...
|
|
std::size_t | GetExternalEventsCount () const |
|
ExternalEvents & | InsertNewExternalEvents (const gd::String &name, std::size_t position) |
| Adds a new empty external events sheet called "name" at the specified position in the layout list.
|
|
ExternalEvents & | InsertExternalEvents (const ExternalEvents &externalEvents, std::size_t position) |
| Adds a new external events sheet constructed from the layout passed as parameter. More...
|
|
void | RemoveExternalEvents (const gd::String &name) |
| Delete external events named "name".
|
|
|
Members functions related to external layout management.
|
bool | HasExternalLayoutNamed (const gd::String &name) const |
|
ExternalLayout & | GetExternalLayout (const gd::String &name) |
|
const ExternalLayout & | GetExternalLayout (const gd::String &name) const |
|
ExternalLayout & | GetExternalLayout (std::size_t index) |
|
const ExternalLayout & | GetExternalLayout (std::size_t index) const |
|
std::size_t | GetExternalLayoutPosition (const gd::String &name) const |
|
void | MoveExternalLayout (std::size_t oldIndex, std::size_t newIndex) |
|
void | SwapExternalLayouts (std::size_t first, std::size_t second) |
| Swap the specified external layouts. More...
|
|
std::size_t | GetExternalLayoutsCount () const |
|
gd::ExternalLayout & | InsertNewExternalLayout (const gd::String &name, std::size_t position) |
| Adds a new empty external layout called "name" at the specified position in the layout list.
|
|
gd::ExternalLayout & | InsertExternalLayout (const ExternalLayout &externalLayout, std::size_t position) |
| Adds a new external layout constructed from the layout passed as parameter. More...
|
|
void | RemoveExternalLayout (const gd::String &name) |
| Delete external layout named "name".
|
|
void | SetFirstLayout (const gd::String &name) |
|
const gd::String & | GetFirstLayout () |
|
|
bool | HasEventsFunctionsExtensionNamed (const gd::String &name) const |
| Check if events functions extension called "name" exists.
|
|
EventsFunctionsExtension & | GetEventsFunctionsExtension (const gd::String &name) |
| Return a reference to the events functions extension called "name".
|
|
const EventsFunctionsExtension & | GetEventsFunctionsExtension (const gd::String &name) const |
| Return a reference to the events functions extension called "name".
|
|
EventsFunctionsExtension & | GetEventsFunctionsExtension (std::size_t index) |
| Return a reference to the events functions extension at position "index" in the list.
|
|
const EventsFunctionsExtension & | GetEventsFunctionsExtension (std::size_t index) const |
| Return a reference to the events functions extension at position "index" in the list.
|
|
std::size_t | GetEventsFunctionsExtensionPosition (const gd::String &name) const |
| Return the position of the events functions extension called "name" in the list.
|
|
void | MoveEventsFunctionsExtension (std::size_t oldIndex, std::size_t newIndex) |
|
void | SwapEventsFunctionsExtensions (std::size_t first, std::size_t second) |
| Swap the specified events functions extensions. More...
|
|
std::size_t | GetEventsFunctionsExtensionsCount () const |
| Returns the number of events functions extension.
|
|
gd::EventsFunctionsExtension & | InsertNewEventsFunctionsExtension (const gd::String &name, std::size_t position) |
| Adds a new empty events functions extension called "name" at the specified position in the list.
|
|
gd::EventsFunctionsExtension & | InsertEventsFunctionsExtension (const EventsFunctionsExtension &eventsFunctionExtension, std::size_t position) |
| Adds an events functions extension to the list. More...
|
|
void | UnserializeAndInsertExtensionsFrom (const gd::SerializerElement &eventsFunctionsExtensionsElement) |
| Unserialize and insert in the project the extensions. More...
|
|
void | RemoveEventsFunctionsExtension (const gd::String &name) |
| Delete the events functions extension named "name".
|
|
void | ClearEventsFunctionsExtensions () |
| Remove all the events functions extensions.
|
|
bool | HasEventsBasedObject (const gd::String &type) const |
| Check if events based object with a given type exists.
|
|
gd::EventsBasedObject & | GetEventsBasedObject (const gd::String &type) |
| Return the events based object with a given type.
|
|
const gd::EventsBasedObject & | GetEventsBasedObject (const gd::String &type) const |
| Return the events based object with a given type.
|
|
bool | HasEventsBasedBehavior (const gd::String &type) const |
| Check if events based behavior with a given type exists.
|
|
gd::EventsBasedBehavior & | GetEventsBasedBehavior (const gd::String &type) |
| Return the events based behavior with a given type.
|
|
const gd::EventsBasedBehavior & | GetEventsBasedBehavior (const gd::String &type) const |
| Return the events based behavior with a given type.
|
|
|
Members functions related to resources management.
|
const ResourcesManager & | GetResourcesManager () const |
| Provide access to the ResourceManager member containing the list of the resources.
|
|
ResourcesManager & | GetResourcesManager () |
| Provide access to the ResourceManager member containing the list of the resources.
|
|
|
Members functions related to global variables management.
|
const gd::VariablesContainer & | GetVariables () const |
|
gd::VariablesContainer & | GetVariables () |
|
|
gd::ObjectsContainer & | GetObjects () |
| return the objects of the project.
|
|
const gd::ObjectsContainer & | GetObjects () const |
| Return the objects of the project.
|
|
|
To manage external C++ or Javascript source files used by the game
|
bool | UseExternalSourceFiles () const |
| Return true if the game activated the use of external source files.
|
|
const std::vector< std::unique_ptr< gd::SourceFile > > & | GetAllSourceFiles () const |
| Return a const reference to the vector containing all the source files used by the game.
|
|
bool | HasSourceFile (gd::String name, gd::String language="") const |
| Return true if the source file with the specified name is used by the game. More...
|
|
SourceFile & | GetSourceFile (const gd::String &name) |
|
const SourceFile & | GetSourceFile (const gd::String &name) const |
|
void | RemoveSourceFile (const gd::String &name) |
|
gd::SourceFile & | InsertNewSourceFile (const gd::String &name, const gd::String &language, std::size_t position=-1) |
|