GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Project.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2016 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 
7 #pragma once
8 
9 #include <memory>
10 #include <vector>
11 
12 #include "GDCore/Events/CodeGeneration/DiagnosticReport.h"
13 #include "GDCore/Project/ExtensionProperties.h"
14 #include "GDCore/Project/LoadingScreen.h"
15 #include "GDCore/Project/ObjectGroupsContainer.h"
16 #include "GDCore/Project/ObjectsContainer.h"
17 #include "GDCore/Project/PlatformSpecificAssets.h"
18 #include "GDCore/Project/ResourcesContainer.h"
19 #include "GDCore/Project/TestsContainer.h"
20 #include "GDCore/Project/VariablesContainer.h"
21 #include "GDCore/Project/Watermark.h"
22 #include "GDCore/Project/MemoryTrackedRegistry.h"
23 #include "GDCore/String.h"
24 namespace gd {
25 class Platform;
26 class Layout;
27 class ExternalEvents;
28 class ResourcesContainer;
29 class ExternalLayout;
30 class EventsFunctionsExtension;
31 class EventsBasedObject;
32 class EventsBasedBehavior;
33 class Object;
34 class ObjectConfiguration;
35 class VariablesContainer;
36 class ArbitraryResourceWorker;
37 class Behavior;
38 class BehaviorsSharedData;
39 class BaseEvent;
40 class SerializerElement;
41 } // namespace gd
42 #undef GetObject // Disable an annoying macro
43 #undef CreateEvent
44 
45 namespace gd {
52 class GD_CORE_API Project {
53  public:
54  Project();
55  Project(const Project&);
56  virtual ~Project();
57  Project& operator=(const Project& rhs);
58 
63 
67  void SetName(const gd::String& name_) { name = name_; };
68 
72  const gd::String& GetName() const { return name; }
73 
77  const std::vector<gd::String>& GetCategories() const { return categories; };
78 
82  std::vector<gd::String>& GetCategories() { return categories; };
83 
87  void SetDescription(const gd::String& description_) {
88  description = description_;
89  };
90 
94  const gd::String& GetDescription() const { return description; }
95 
101  void SetVersion(const gd::String& version_) { version = version_; };
102 
106  const gd::String& GetVersion() const { return version; }
107 
111  void SetAuthor(const gd::String& author_) { author = author_; };
112 
116  const gd::String& GetAuthor() const { return author; }
117 
121  const std::vector<gd::String>& GetAuthorIds() const { return authorIds; };
122 
126  std::vector<gd::String>& GetAuthorIds() { return authorIds; };
127 
131  const std::vector<gd::String>& GetAuthorUsernames() const {
132  return authorUsernames;
133  };
134 
138  std::vector<gd::String>& GetAuthorUsernames() { return authorUsernames; };
139 
144  void SetPlayableWithKeyboard(bool playable = true) {
145  isPlayableWithKeyboard = playable;
146  }
147 
151  bool IsPlayableWithKeyboard() const { return isPlayableWithKeyboard; }
152 
157  void SetPlayableWithGamepad(bool playable = true) {
158  isPlayableWithGamepad = playable;
159  }
160 
164  bool IsPlayableWithGamepad() const { return isPlayableWithGamepad; }
165 
170  void SetPlayableWithMobile(bool playable = true) {
171  isPlayableWithMobile = playable;
172  }
173 
177  bool IsPlayableWithMobile() const { return isPlayableWithMobile; }
178 
182  void SetPackageName(const gd::String& packageName_) {
183  packageName = packageName_;
184  };
185 
189  const gd::String& GetPackageName() const { return packageName; }
190 
194  void SetTemplateSlug(const gd::String& templateSlug_) {
195  templateSlug = templateSlug_;
196  };
197 
201  const gd::String& GetTemplateSlug() const { return templateSlug; }
202 
208  void SetOrientation(const gd::String& orientation_) {
209  orientation = orientation_;
210  };
211 
215  const gd::String& GetOrientation() const { return orientation; }
216 
220  void SetProjectFile(const gd::String& file) { projectFile = file; }
221 
226  const gd::String& GetProjectFile() const { return projectFile; }
227 
233  void SetFolderProject(bool enable = true) { folderProject = enable; }
234 
239  bool IsFolderProject() const { return folderProject; }
240 
245  latestCompilationDirectory = dir;
246  }
247 
253  return latestCompilationDirectory;
254  }
255 
261  return platformSpecificAssets;
262  }
263 
269  return platformSpecificAssets;
270  }
271 
275  gd::LoadingScreen& GetLoadingScreen() { return loadingScreen; }
276 
280  const gd::LoadingScreen& GetLoadingScreen() const { return loadingScreen; }
281 
285  gd::Watermark& GetWatermark() { return watermark; }
286 
290  const gd::Watermark& GetWatermark() const { return watermark; }
291 
299  void SetGameResolutionSize(unsigned int width, unsigned int height) {
300  windowWidth = width;
301  windowHeight = height;
302  }
303 
307  unsigned int GetGameResolutionWidth() const { return windowWidth; }
308 
312  unsigned int GetGameResolutionHeight() const { return windowHeight; }
313 
319  return adaptGameResolutionAtRuntime;
320  }
321 
326  void SetAdaptGameResolutionAtRuntime(bool adaptGameResolutionAtRuntime_) {
327  adaptGameResolutionAtRuntime = adaptGameResolutionAtRuntime_;
328  }
329 
333  const gd::String& GetSizeOnStartupMode() const { return sizeOnStartupMode; }
334 
340  void SetSizeOnStartupMode(const gd::String& mode) {
341  sizeOnStartupMode = mode;
342  }
343 
348  void SetMaximumFPS(int maxFPS_) { maxFPS = maxFPS_; }
349 
353  int GetMaximumFPS() const { return maxFPS; }
354 
359  void SetMinimumFPS(unsigned int minFPS_) { minFPS = minFPS_; }
360 
364  unsigned int GetMinimumFPS() const { return minFPS; }
365 
370  return verticalSync;
371  }
372 
376  void SetVerticalSyncActivatedByDefault(bool enable) { verticalSync = enable; }
377 
381  const gd::String& GetScaleMode() const { return scaleMode; }
382 
386  void SetScaleMode(const gd::String& scaleMode_) { scaleMode = scaleMode_; }
387 
391  bool GetPixelsRounding() const { return pixelsRounding; }
392 
396  void SetPixelsRounding(bool enable) { pixelsRounding = enable; }
397 
401  const gd::String& GetAntialiasingMode() const { return antialiasingMode; }
402 
406  void SetAntialiasingMode(const gd::String& antialiasingMode_) {
407  antialiasingMode = antialiasingMode_;
408  }
409 
414  return isAntialisingEnabledOnMobile;
415  }
416 
420  void SetAntialisingEnabledOnMobile(bool enable) {
421  isAntialisingEnabledOnMobile = enable;
422  }
423 
430  return useDeprecatedZeroAsDefaultZOrder;
431  }
432 
439  useDeprecatedZeroAsDefaultZOrder = enable;
440  }
441 
447  return useDeprecatedZeroAsDefaultStringVariable;
448  }
449 
455  useDeprecatedZeroAsDefaultStringVariable = enable;
456  }
457 
461  void SetProjectUuid(const gd::String& projectUuid_) {
462  projectUuid = projectUuid_;
463  };
464 
469  const gd::String& GetProjectUuid() const { return projectUuid; }
470 
474  void ResetProjectUuid();
475 
483  return extensionProperties;
484  };
485 
493  return extensionProperties;
494  };
495 
499  const std::vector<Platform*>& GetUsedPlatforms() const { return platforms; };
500 
504  void AddPlatform(Platform& platform);
505 
512  bool RemovePlatform(const gd::String& platformName);
513 
518  Platform& GetCurrentPlatform() const;
519 
525  void SetCurrentPlatform(const gd::String& platformName);
526 
530  bool AreEffectsHiddenInEditor() const { return areEffectsHiddenInEditor; }
531 
537  void SetEffectsHiddenInEditor(bool enable = true) {
538  areEffectsHiddenInEditor = enable;
539  }
540 
542 
547 
554  std::unique_ptr<gd::Object> CreateObject(const gd::String& type,
555  const gd::String& name) const;
556 
557  void EnsureObjectDefaultBehaviors(gd::Object& object) const;
558 
571  std::shared_ptr<gd::BaseEvent> CreateEvent(
572  const gd::String& type, const gd::String& platformName = "");
574 
579 
582  bool HasLayoutNamed(const gd::String& name) const;
583 
587  Layout& GetLayout(const gd::String& name);
588 
592  const Layout& GetLayout(const gd::String& name) const;
593 
598  Layout& GetLayout(std::size_t index);
599 
604  const Layout& GetLayout(std::size_t index) const;
605 
609  std::size_t GetLayoutPosition(const gd::String& name) const;
610 
614  void MoveLayout(std::size_t oldIndex, std::size_t newIndex);
615 
621  void SwapLayouts(std::size_t first, std::size_t second);
622 
626  std::size_t GetLayoutsCount() const;
627 
632  gd::Layout& InsertNewLayout(const gd::String& name, std::size_t position);
633 
646  gd::Layout& InsertLayout(const Layout& layout, std::size_t position);
647 
651  void RemoveLayout(const gd::String& name);
652 
654 
658  void UnserializeFrom(const SerializerElement& element);
659 
665  void SerializeTo(SerializerElement& element) const;
666 
670  unsigned int GetLastSaveGDMajorVersion() { return gdMajorVersion; };
671 
675  unsigned int GetLastSaveGDMinorVersion() { return gdMinorVersion; };
676 
680  unsigned int GetLastSaveGDBuildVersion() { return gdBuildVersion; };
681 
685  const gd::String& GetInitialGDVersion() const { return initialGDVersion; };
686 
691 
694  bool HasExternalEventsNamed(const gd::String& name) const;
695 
699  ExternalEvents& GetExternalEvents(const gd::String& name);
700 
704  const ExternalEvents& GetExternalEvents(const gd::String& name) const;
705 
710  ExternalEvents& GetExternalEvents(std::size_t index);
711 
716  const ExternalEvents& GetExternalEvents(std::size_t index) const;
717 
722  std::size_t GetExternalEventsPosition(const gd::String& name) const;
723 
727  void MoveExternalEvents(std::size_t oldIndex, std::size_t newIndex);
728 
734  void SwapExternalEvents(std::size_t first, std::size_t second);
735 
739  std::size_t GetExternalEventsCount() const;
740 
745  ExternalEvents& InsertNewExternalEvents(const gd::String& name,
746  std::size_t position);
747 
756  ExternalEvents& InsertExternalEvents(const ExternalEvents& externalEvents,
757  std::size_t position);
758 
762  void RemoveExternalEvents(const gd::String& name);
764 
769 
772  gd::TestsContainer& GetTests() { return tests; }
773 
777  const gd::TestsContainer& GetTests() const { return tests; }
779 
784 
788  bool HasExternalLayoutNamed(const gd::String& name) const;
789 
793  ExternalLayout& GetExternalLayout(const gd::String& name);
794 
798  const ExternalLayout& GetExternalLayout(const gd::String& name) const;
799 
804  ExternalLayout& GetExternalLayout(std::size_t index);
805 
810  const ExternalLayout& GetExternalLayout(std::size_t index) const;
811 
816  std::size_t GetExternalLayoutPosition(const gd::String& name) const;
817 
821  void MoveExternalLayout(std::size_t oldIndex, std::size_t newIndex);
822 
828  void SwapExternalLayouts(std::size_t first, std::size_t second);
829 
833  std::size_t GetExternalLayoutsCount() const;
834 
839  gd::ExternalLayout& InsertNewExternalLayout(const gd::String& name,
840  std::size_t position);
841 
854  gd::ExternalLayout& InsertExternalLayout(const ExternalLayout& externalLayout,
855  std::size_t position);
856 
860  void RemoveExternalLayout(const gd::String& name);
861 
865  void SetFirstLayout(const gd::String& name) { firstLayout = name; }
866 
870  const gd::String& GetFirstLayout() { return firstLayout; }
871 
876  void SetPreviewLayout(const gd::String& name) { previewLayout = name; }
877 
882  const gd::String& GetPreviewLayout() const { return previewLayout; }
883 
885 
889 
892  bool HasEventsFunctionsExtensionNamed(const gd::String& name) const;
893 
897  EventsFunctionsExtension& GetEventsFunctionsExtension(const gd::String& name);
898 
902  const EventsFunctionsExtension& GetEventsFunctionsExtension(
903  const gd::String& name) const;
904 
909  EventsFunctionsExtension& GetEventsFunctionsExtension(std::size_t index);
910 
915  const EventsFunctionsExtension& GetEventsFunctionsExtension(
916  std::size_t index) const;
917 
922  std::size_t GetEventsFunctionsExtensionPosition(const gd::String& name) const;
923 
927  void MoveEventsFunctionsExtension(std::size_t oldIndex, std::size_t newIndex);
928 
934  void SwapEventsFunctionsExtensions(std::size_t first, std::size_t second);
935 
939  std::size_t GetEventsFunctionsExtensionsCount() const;
940 
945  gd::EventsFunctionsExtension& InsertNewEventsFunctionsExtension(
946  const gd::String& name, std::size_t position);
947 
955  gd::EventsFunctionsExtension& InsertEventsFunctionsExtension(
956  const EventsFunctionsExtension& eventsFunctionExtension,
957  std::size_t position);
958 
966  void UnserializeAndInsertExtensionsFrom(
967  const gd::SerializerElement& eventsFunctionsExtensionsElement);
968 
972  void RemoveEventsFunctionsExtension(const gd::String& name);
973 
977  void ClearEventsFunctionsExtensions();
978 
982  bool HasEventsBasedObject(const gd::String& type) const;
983 
987  gd::EventsBasedObject& GetEventsBasedObject(const gd::String& type);
988 
992  const gd::EventsBasedObject& GetEventsBasedObject(
993  const gd::String& type) const;
994 
998  bool HasEventsBasedBehavior(const gd::String& type) const;
999 
1003  gd::EventsBasedBehavior& GetEventsBasedBehavior(const gd::String& type);
1004 
1008  const gd::EventsBasedBehavior& GetEventsBasedBehavior(
1009  const gd::String& type) const;
1010 
1012 
1017 
1022  return resourcesContainer;
1023  }
1024 
1029  ResourcesContainer& GetResourcesManager() { return resourcesContainer; }
1030 
1035  void SetSceneResourcesPreloading(gd::String sceneResourcesPreloading_) {
1036  sceneResourcesPreloading = sceneResourcesPreloading_;
1037  }
1038 
1044  return sceneResourcesPreloading;
1045  }
1046 
1051  void SetSceneResourcesUnloading(gd::String sceneResourcesUnloading_) {
1052  sceneResourcesUnloading = sceneResourcesUnloading_;
1053  }
1054 
1060  return sceneResourcesUnloading;
1061  }
1063 
1068 
1073  inline const gd::VariablesContainer& GetVariables() const {
1074  return variables;
1075  }
1076 
1081  inline gd::VariablesContainer& GetVariables() { return variables; }
1082 
1084 
1088 
1091  gd::ObjectsContainer& GetObjects() { return objectsContainer; }
1092 
1096  const gd::ObjectsContainer& GetObjects() const { return objectsContainer; }
1098 
1102 
1107  static bool IsNameSafe(const gd::String& name);
1108 
1113  static gd::String GetSafeName(const gd::String& name);
1115 
1116  gd::WholeProjectDiagnosticReport& GetWholeProjectDiagnosticReport() {
1117  return wholeProjectDiagnosticReport;
1118  }
1119 
1120  private:
1125  void Init(const gd::Project& project);
1126 
1132  std::unique_ptr<gd::ObjectConfiguration> CreateObjectConfiguration(
1133  const gd::String& type) const;
1134 
1135  gd::MemoryTracked _memoryTracked{this, "Project"};
1136 
1137  gd::String name;
1138  gd::String description;
1139  gd::String version;
1140  unsigned int windowWidth = 0;
1141  unsigned int windowHeight = 0;
1142  int maxFPS = 0;
1143  unsigned int minFPS = 0;
1145  bool verticalSync =
1146  false;
1147  gd::String scaleMode;
1148  bool pixelsRounding = false;
1150  bool adaptGameResolutionAtRuntime =
1151  true;
1153  gd::String
1154  sizeOnStartupMode;
1156  gd::String antialiasingMode;
1157  bool isAntialisingEnabledOnMobile = false;
1158  gd::String projectUuid;
1160  bool useDeprecatedZeroAsDefaultZOrder =
1161  false;
1166  bool useDeprecatedZeroAsDefaultStringVariable =
1167  false;
1171  std::vector<std::unique_ptr<gd::Layout> > scenes;
1172  gd::VariablesContainer variables;
1173  gd::ObjectsContainer objectsContainer;
1174  std::vector<std::unique_ptr<gd::ExternalLayout> >
1175  externalLayouts;
1176  std::vector<std::unique_ptr<gd::EventsFunctionsExtension> >
1177  eventsFunctionsExtensions;
1179  resourcesContainer;
1180  std::vector<gd::Platform*>
1181  platforms;
1182  gd::String firstLayout;
1183  gd::String previewLayout;
1185  gd::String author;
1186  std::vector<gd::String>
1187  authorIds;
1188  std::vector<gd::String>
1189  authorUsernames;
1190  std::vector<gd::String> categories;
1191  bool isPlayableWithKeyboard =
1192  false;
1193  bool isPlayableWithGamepad =
1194  false;
1195  bool isPlayableWithMobile = false;
1196  gd::String packageName;
1197  gd::String templateSlug;
1199  gd::String orientation;
1201  bool folderProject =
1202  false;
1203  gd::String
1204  projectFile;
1205  gd::String latestCompilationDirectory;
1206  gd::Platform* currentPlatform =
1207  nullptr;
1208  gd::PlatformSpecificAssets platformSpecificAssets;
1209  gd::LoadingScreen loadingScreen;
1210  gd::Watermark watermark;
1211  std::vector<std::unique_ptr<gd::ExternalEvents> >
1212  externalEvents;
1213  gd::TestsContainer tests;
1214  ExtensionProperties
1215  extensionProperties;
1216  gd::WholeProjectDiagnosticReport wholeProjectDiagnosticReport;
1217  gd::String sceneResourcesPreloading;
1219  gd::String sceneResourcesUnloading;
1221  mutable unsigned int gdMajorVersion =
1222  0;
1224  mutable unsigned int gdMinorVersion =
1225  0;
1227  mutable unsigned int gdBuildVersion =
1228  0;
1230  gd::String initialGDVersion;
1231  bool areEffectsHiddenInEditor =
1232  false;
1234 };
1235 
1236 } // namespace gd
Represents a behavior that is implemented with events.
Definition: EventsBasedBehavior.h:31
Represents an object that is implemented with events.
Definition: EventsBasedObject.h:32
Hold a list of Events Functions (gd::EventsFunction) and Events Based Behaviors.
Definition: EventsFunctionsExtension.h:42
Definition: ExtensionProperties.h:19
Contains a list of events not directly linked to a layout.
Definition: ExternalEvents.h:31
An external layout allows to create layouts of objects that can be then inserted on a layout.
Definition: ExternalLayout.h:24
Represent a layout ( also called a scene ) of a project.
Definition: Layout.h:41
Describe the content and set up of the loading screen.
Definition: LoadingScreen.h:23
A non-copyable, non-movable member object that registers/unregisters its owner with MemoryTrackedRegi...
Definition: MemoryTrackedRegistry.h:238
Represent an object of a platform.
Definition: Object.h:39
Used as a base class for classes that will own objects (see gd::Object).
Definition: ObjectsContainer.h:38
Base class for implementing a platform.
Definition: Platform.h:42
Store the icons, splashscreens or reference to any other asset that can be needed when exporting the ...
Definition: PlatformSpecificAssets.h:26
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:52
unsigned int GetLastSaveGDMajorVersion()
Definition: Project.h:670
void SetUseDeprecatedZeroAsDefaultStringVariable(bool enable)
Set if the project should use "0" as the default value for unset string variables (deprecated behavio...
Definition: Project.h:454
const gd::String & GetPackageName() const
Get the project package name.
Definition: Project.h:189
const gd::String & GetSceneResourcesPreloading() const
Definition: Project.h:1043
void SetVerticalSyncActivatedByDefault(bool enable)
Definition: Project.h:376
void SetPlayableWithGamepad(bool playable=true)
Definition: Project.h:157
void SetProjectUuid(const gd::String &projectUuid_)
Change the project UUID.
Definition: Project.h:461
const gd::LoadingScreen & GetLoadingScreen() const
Return a reference to loading screen setup for the project.
Definition: Project.h:280
void SetAntialisingEnabledOnMobile(bool enable)
Definition: Project.h:420
void SetAdaptGameResolutionAtRuntime(bool adaptGameResolutionAtRuntime_)
Set if the game resolution should be adapted to the window size at runtime.
Definition: Project.h:326
const gd::TestsContainer & GetTests() const
Return a const reference to the tests of the project.
Definition: Project.h:777
const gd::String & GetPreviewLayout() const
Definition: Project.h:882
unsigned int GetGameResolutionWidth() const
Returns the default game resolution width.
Definition: Project.h:307
const gd::Watermark & GetWatermark() const
Return a reference to watermark setup for the project.
Definition: Project.h:290
const gd::String & GetSizeOnStartupMode() const
Get how the game size should be adapted to the screen.
Definition: Project.h:333
const gd::String & GetAntialiasingMode() const
Definition: Project.h:401
const gd::ExtensionProperties & GetExtensionProperties() const
Get the properties set by extensions.
Definition: Project.h:492
void SetSizeOnStartupMode(const gd::String &mode)
Set how to adapt the game size to the screen.
Definition: Project.h:340
const gd::String & GetInitialGDVersion() const
Definition: Project.h:685
bool GetPixelsRounding() const
Definition: Project.h:391
bool IsVerticalSynchronizationEnabledByDefault() const
Definition: Project.h:369
const gd::String & GetTemplateSlug() const
Get the slug of the template from which the project is created.
Definition: Project.h:201
unsigned int GetMinimumFPS() const
Definition: Project.h:364
bool IsPlayableWithGamepad() const
Definition: Project.h:164
void SetVersion(const gd::String &version_)
Change the version of the project. This can be freely set, but should follow "X.Y....
Definition: Project.h:101
unsigned int GetLastSaveGDBuildVersion()
Definition: Project.h:680
void SetSceneResourcesUnloading(gd::String sceneResourcesUnloading_)
Definition: Project.h:1051
void SetProjectFile(const gd::String &file)
Definition: Project.h:220
const std::vector< gd::String > & GetAuthorIds() const
Get the author ids of the project.
Definition: Project.h:121
bool GetAdaptGameResolutionAtRuntime() const
Returns true if the game resolution should be adapted to the window size at runtime.
Definition: Project.h:318
gd::PlatformSpecificAssets & GetPlatformSpecificAssets()
Return a reference to platform assets of the project (icons, splashscreen...).
Definition: Project.h:260
void SetGameResolutionSize(unsigned int width, unsigned int height)
Definition: Project.h:299
const ResourcesContainer & GetResourcesManager() const
Provide access to the ResourcesContainer member containing the list of the resources.
Definition: Project.h:1021
void SetPlayableWithMobile(bool playable=true)
Definition: Project.h:170
void SetFolderProject(bool enable=true)
Definition: Project.h:233
const gd::ObjectsContainer & GetObjects() const
Return the objects of the project.
Definition: Project.h:1096
const gd::String & GetLastCompilationDirectory() const
Definition: Project.h:252
void SetPlayableWithKeyboard(bool playable=true)
Definition: Project.h:144
const gd::String & GetScaleMode() const
Definition: Project.h:381
ResourcesContainer & GetResourcesManager()
Provide access to the ResourcesContainer member containing the list of the resources.
Definition: Project.h:1029
bool IsPlayableWithMobile() const
Definition: Project.h:177
void SetMinimumFPS(unsigned int minFPS_)
Definition: Project.h:359
gd::ExtensionProperties & GetExtensionProperties()
Get the properties set by extensions.
Definition: Project.h:482
const std::vector< gd::String > & GetAuthorUsernames() const
Get the author usernames of the project.
Definition: Project.h:131
const std::vector< gd::String > & GetCategories() const
Get the categories/genres of the project.
Definition: Project.h:77
void SetOrientation(const gd::String &orientation_)
Change the project orientation (in particular when exported with Cordova). This has no effect on desk...
Definition: Project.h:208
const std::vector< Platform * > & GetUsedPlatforms() const
Definition: Project.h:499
void SetEffectsHiddenInEditor(bool enable=true)
Definition: Project.h:537
const gd::String & GetSceneResourcesUnloading() const
Definition: Project.h:1059
std::vector< gd::String > & GetCategories()
Get the categories of the project, to modify them (non-const).
Definition: Project.h:82
gd::LoadingScreen & GetLoadingScreen()
Return a reference to loading screen setup for the project.
Definition: Project.h:275
bool AreEffectsHiddenInEditor() const
Definition: Project.h:530
bool IsAntialisingEnabledOnMobile() const
Definition: Project.h:413
gd::VariablesContainer & GetVariables()
Definition: Project.h:1081
gd::Watermark & GetWatermark()
Return a reference to watermark setup for the project.
Definition: Project.h:285
const gd::PlatformSpecificAssets & GetPlatformSpecificAssets() const
Return a reference to platform assets of the project (icons, splashscreen...).
Definition: Project.h:268
void SetUseDeprecatedZeroAsDefaultZOrder(bool enable)
Set if the project should set 0 as Z-order for objects created from events (which is deprecated) - in...
Definition: Project.h:438
const gd::VariablesContainer & GetVariables() const
Definition: Project.h:1073
const gd::String & GetVersion() const
Get the project version.
Definition: Project.h:106
const gd::String & GetName() const
Get the project name.
Definition: Project.h:72
int GetMaximumFPS() const
Definition: Project.h:353
void SetAuthor(const gd::String &author_)
Change the author of the project.
Definition: Project.h:111
void SetAntialiasingMode(const gd::String &antialiasingMode_)
Definition: Project.h:406
const gd::String & GetAuthor() const
Get the project author name.
Definition: Project.h:116
void SetTemplateSlug(const gd::String &templateSlug_)
Change the slug of the template from which the project is created.
Definition: Project.h:194
unsigned int GetLastSaveGDMinorVersion()
Definition: Project.h:675
bool IsPlayableWithKeyboard() const
Definition: Project.h:151
const gd::String & GetOrientation() const
Get the project orientation ("default", "landscape", "portrait").
Definition: Project.h:215
void SetPixelsRounding(bool enable)
Definition: Project.h:396
void SetMaximumFPS(int maxFPS_)
Definition: Project.h:348
void SetScaleMode(const gd::String &scaleMode_)
Definition: Project.h:386
void SetName(const gd::String &name_)
Change the project name.
Definition: Project.h:67
gd::TestsContainer & GetTests()
Return a reference to the tests of the project.
Definition: Project.h:772
void SetSceneResourcesPreloading(gd::String sceneResourcesPreloading_)
Definition: Project.h:1035
unsigned int GetGameResolutionHeight() const
Returns the default game resolution height.
Definition: Project.h:312
std::vector< gd::String > & GetAuthorIds()
Get the author ids of the project, to modify them (non-const).
Definition: Project.h:126
const gd::String & GetDescription() const
Get the project description.
Definition: Project.h:94
bool IsFolderProject() const
Definition: Project.h:239
void SetPackageName(const gd::String &packageName_)
Change the project package name.
Definition: Project.h:182
void SetFirstLayout(const gd::String &name)
Definition: Project.h:865
bool GetUseDeprecatedZeroAsDefaultStringVariable() const
Check if the project should use "0" as the default value for unset string variables (deprecated behav...
Definition: Project.h:446
const gd::String & GetProjectUuid() const
Get the project UUID, useful when using the game on online services that would require a unique ident...
Definition: Project.h:469
const gd::String & GetFirstLayout()
Definition: Project.h:870
const gd::String & GetProjectFile() const
Definition: Project.h:226
bool GetUseDeprecatedZeroAsDefaultZOrder() const
Return if the project should set 0 as Z-order for objects created from events (which is deprecated) -...
Definition: Project.h:429
void SetDescription(const gd::String &description_)
Change the project description.
Definition: Project.h:87
void SetLastCompilationDirectory(const gd::String &dir)
Definition: Project.h:244
void SetPreviewLayout(const gd::String &name)
Definition: Project.h:876
std::vector< gd::String > & GetAuthorUsernames()
Get the author usernames of the project, to modify them (non-const).
Definition: Project.h:138
gd::ObjectsContainer & GetObjects()
return the objects of the project.
Definition: Project.h:1091
Inventory all resources used by a project.
Definition: ResourcesContainer.h:628
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
String represents an UTF8 encoded string.
Definition: String.h:33
A container of tests (gd::Test), used by gd::Project and gd::EventsFunctionsExtension.
Definition: TestsContainer.h:27
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:29
Describe the content and set up of the watermark.
Definition: Watermark.h:23
Definition: DiagnosticReport.h:95
Definition: CommonTools.h:24