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/VariablesContainer.h"
20 #include "GDCore/Project/Watermark.h"
21 #include "GDCore/Project/MemoryTrackedRegistry.h"
22 #include "GDCore/String.h"
23 namespace gd {
24 class Platform;
25 class Layout;
26 class ExternalEvents;
27 class ResourcesContainer;
28 class ExternalLayout;
29 class EventsFunctionsExtension;
30 class EventsBasedObject;
31 class EventsBasedBehavior;
32 class Object;
33 class ObjectConfiguration;
34 class VariablesContainer;
35 class ArbitraryResourceWorker;
36 class Behavior;
37 class BehaviorsSharedData;
38 class BaseEvent;
39 class SerializerElement;
40 } // namespace gd
41 #undef GetObject // Disable an annoying macro
42 #undef CreateEvent
43 
44 namespace gd {
51 class GD_CORE_API Project {
52  public:
53  Project();
54  Project(const Project&);
55  virtual ~Project();
56  Project& operator=(const Project& rhs);
57 
62 
66  void SetName(const gd::String& name_) { name = name_; };
67 
71  const gd::String& GetName() const { return name; }
72 
76  const std::vector<gd::String>& GetCategories() const { return categories; };
77 
81  std::vector<gd::String>& GetCategories() { return categories; };
82 
86  void SetDescription(const gd::String& description_) {
87  description = description_;
88  };
89 
93  const gd::String& GetDescription() const { return description; }
94 
100  void SetVersion(const gd::String& version_) { version = version_; };
101 
105  const gd::String& GetVersion() const { return version; }
106 
110  void SetAuthor(const gd::String& author_) { author = author_; };
111 
115  const gd::String& GetAuthor() const { return author; }
116 
120  const std::vector<gd::String>& GetAuthorIds() const { return authorIds; };
121 
125  std::vector<gd::String>& GetAuthorIds() { return authorIds; };
126 
130  const std::vector<gd::String>& GetAuthorUsernames() const {
131  return authorUsernames;
132  };
133 
137  std::vector<gd::String>& GetAuthorUsernames() { return authorUsernames; };
138 
143  void SetPlayableWithKeyboard(bool playable = true) {
144  isPlayableWithKeyboard = playable;
145  }
146 
150  bool IsPlayableWithKeyboard() const { return isPlayableWithKeyboard; }
151 
156  void SetPlayableWithGamepad(bool playable = true) {
157  isPlayableWithGamepad = playable;
158  }
159 
163  bool IsPlayableWithGamepad() const { return isPlayableWithGamepad; }
164 
169  void SetPlayableWithMobile(bool playable = true) {
170  isPlayableWithMobile = playable;
171  }
172 
176  bool IsPlayableWithMobile() const { return isPlayableWithMobile; }
177 
181  void SetPackageName(const gd::String& packageName_) {
182  packageName = packageName_;
183  };
184 
188  const gd::String& GetPackageName() const { return packageName; }
189 
193  void SetTemplateSlug(const gd::String& templateSlug_) {
194  templateSlug = templateSlug_;
195  };
196 
200  const gd::String& GetTemplateSlug() const { return templateSlug; }
201 
207  void SetOrientation(const gd::String& orientation_) {
208  orientation = orientation_;
209  };
210 
214  const gd::String& GetOrientation() const { return orientation; }
215 
219  void SetProjectFile(const gd::String& file) { projectFile = file; }
220 
225  const gd::String& GetProjectFile() const { return projectFile; }
226 
232  void SetFolderProject(bool enable = true) { folderProject = enable; }
233 
238  bool IsFolderProject() const { return folderProject; }
239 
244  latestCompilationDirectory = dir;
245  }
246 
252  return latestCompilationDirectory;
253  }
254 
260  return platformSpecificAssets;
261  }
262 
268  return platformSpecificAssets;
269  }
270 
274  gd::LoadingScreen& GetLoadingScreen() { return loadingScreen; }
275 
279  const gd::LoadingScreen& GetLoadingScreen() const { return loadingScreen; }
280 
284  gd::Watermark& GetWatermark() { return watermark; }
285 
289  const gd::Watermark& GetWatermark() const { return watermark; }
290 
298  void SetGameResolutionSize(unsigned int width, unsigned int height) {
299  windowWidth = width;
300  windowHeight = height;
301  }
302 
306  unsigned int GetGameResolutionWidth() const { return windowWidth; }
307 
311  unsigned int GetGameResolutionHeight() const { return windowHeight; }
312 
318  return adaptGameResolutionAtRuntime;
319  }
320 
325  void SetAdaptGameResolutionAtRuntime(bool adaptGameResolutionAtRuntime_) {
326  adaptGameResolutionAtRuntime = adaptGameResolutionAtRuntime_;
327  }
328 
332  const gd::String& GetSizeOnStartupMode() const { return sizeOnStartupMode; }
333 
339  void SetSizeOnStartupMode(const gd::String& mode) {
340  sizeOnStartupMode = mode;
341  }
342 
347  void SetMaximumFPS(int maxFPS_) { maxFPS = maxFPS_; }
348 
352  int GetMaximumFPS() const { return maxFPS; }
353 
358  void SetMinimumFPS(unsigned int minFPS_) { minFPS = minFPS_; }
359 
363  unsigned int GetMinimumFPS() const { return minFPS; }
364 
369  return verticalSync;
370  }
371 
375  void SetVerticalSyncActivatedByDefault(bool enable) { verticalSync = enable; }
376 
380  const gd::String& GetScaleMode() const { return scaleMode; }
381 
385  void SetScaleMode(const gd::String& scaleMode_) { scaleMode = scaleMode_; }
386 
390  bool GetPixelsRounding() const { return pixelsRounding; }
391 
395  void SetPixelsRounding(bool enable) { pixelsRounding = enable; }
396 
400  const gd::String& GetAntialiasingMode() const { return antialiasingMode; }
401 
405  void SetAntialiasingMode(const gd::String& antialiasingMode_) {
406  antialiasingMode = antialiasingMode_;
407  }
408 
413  return isAntialisingEnabledOnMobile;
414  }
415 
419  void SetAntialisingEnabledOnMobile(bool enable) {
420  isAntialisingEnabledOnMobile = enable;
421  }
422 
429  return useDeprecatedZeroAsDefaultZOrder;
430  }
431 
438  useDeprecatedZeroAsDefaultZOrder = enable;
439  }
440 
446  return useDeprecatedZeroAsDefaultStringVariable;
447  }
448 
454  useDeprecatedZeroAsDefaultStringVariable = enable;
455  }
456 
460  void SetProjectUuid(const gd::String& projectUuid_) {
461  projectUuid = projectUuid_;
462  };
463 
468  const gd::String& GetProjectUuid() const { return projectUuid; }
469 
473  void ResetProjectUuid();
474 
482  return extensionProperties;
483  };
484 
492  return extensionProperties;
493  };
494 
498  const std::vector<Platform*>& GetUsedPlatforms() const { return platforms; };
499 
503  void AddPlatform(Platform& platform);
504 
511  bool RemovePlatform(const gd::String& platformName);
512 
517  Platform& GetCurrentPlatform() const;
518 
524  void SetCurrentPlatform(const gd::String& platformName);
525 
529  bool AreEffectsHiddenInEditor() const { return areEffectsHiddenInEditor; }
530 
536  void SetEffectsHiddenInEditor(bool enable = true) {
537  areEffectsHiddenInEditor = enable;
538  }
539 
541 
546 
553  std::unique_ptr<gd::Object> CreateObject(const gd::String& type,
554  const gd::String& name) const;
555 
556  void EnsureObjectDefaultBehaviors(gd::Object& object) const;
557 
570  std::shared_ptr<gd::BaseEvent> CreateEvent(
571  const gd::String& type, const gd::String& platformName = "");
573 
578 
581  bool HasLayoutNamed(const gd::String& name) const;
582 
586  Layout& GetLayout(const gd::String& name);
587 
591  const Layout& GetLayout(const gd::String& name) const;
592 
597  Layout& GetLayout(std::size_t index);
598 
603  const Layout& GetLayout(std::size_t index) const;
604 
608  std::size_t GetLayoutPosition(const gd::String& name) const;
609 
613  void MoveLayout(std::size_t oldIndex, std::size_t newIndex);
614 
620  void SwapLayouts(std::size_t first, std::size_t second);
621 
625  std::size_t GetLayoutsCount() const;
626 
631  gd::Layout& InsertNewLayout(const gd::String& name, std::size_t position);
632 
645  gd::Layout& InsertLayout(const Layout& layout, std::size_t position);
646 
650  void RemoveLayout(const gd::String& name);
651 
653 
657  void UnserializeFrom(const SerializerElement& element);
658 
664  void SerializeTo(SerializerElement& element) const;
665 
669  unsigned int GetLastSaveGDMajorVersion() { return gdMajorVersion; };
670 
674  unsigned int GetLastSaveGDMinorVersion() { return gdMinorVersion; };
675 
679  unsigned int GetLastSaveGDBuildVersion() { return gdBuildVersion; };
680 
684  const gd::String& GetInitialGDVersion() const { return initialGDVersion; };
685 
690 
693  bool HasExternalEventsNamed(const gd::String& name) const;
694 
698  ExternalEvents& GetExternalEvents(const gd::String& name);
699 
703  const ExternalEvents& GetExternalEvents(const gd::String& name) const;
704 
709  ExternalEvents& GetExternalEvents(std::size_t index);
710 
715  const ExternalEvents& GetExternalEvents(std::size_t index) const;
716 
721  std::size_t GetExternalEventsPosition(const gd::String& name) const;
722 
726  void MoveExternalEvents(std::size_t oldIndex, std::size_t newIndex);
727 
733  void SwapExternalEvents(std::size_t first, std::size_t second);
734 
738  std::size_t GetExternalEventsCount() const;
739 
744  ExternalEvents& InsertNewExternalEvents(const gd::String& name,
745  std::size_t position);
746 
755  ExternalEvents& InsertExternalEvents(const ExternalEvents& externalEvents,
756  std::size_t position);
757 
761  void RemoveExternalEvents(const gd::String& name);
763 
768 
772  bool HasExternalLayoutNamed(const gd::String& name) const;
773 
777  ExternalLayout& GetExternalLayout(const gd::String& name);
778 
782  const ExternalLayout& GetExternalLayout(const gd::String& name) const;
783 
788  ExternalLayout& GetExternalLayout(std::size_t index);
789 
794  const ExternalLayout& GetExternalLayout(std::size_t index) const;
795 
800  std::size_t GetExternalLayoutPosition(const gd::String& name) const;
801 
805  void MoveExternalLayout(std::size_t oldIndex, std::size_t newIndex);
806 
812  void SwapExternalLayouts(std::size_t first, std::size_t second);
813 
817  std::size_t GetExternalLayoutsCount() const;
818 
823  gd::ExternalLayout& InsertNewExternalLayout(const gd::String& name,
824  std::size_t position);
825 
838  gd::ExternalLayout& InsertExternalLayout(const ExternalLayout& externalLayout,
839  std::size_t position);
840 
844  void RemoveExternalLayout(const gd::String& name);
845 
849  void SetFirstLayout(const gd::String& name) { firstLayout = name; }
850 
854  const gd::String& GetFirstLayout() { return firstLayout; }
855 
860  void SetPreviewLayout(const gd::String& name) { previewLayout = name; }
861 
866  const gd::String& GetPreviewLayout() const { return previewLayout; }
867 
869 
873 
876  bool HasEventsFunctionsExtensionNamed(const gd::String& name) const;
877 
881  EventsFunctionsExtension& GetEventsFunctionsExtension(const gd::String& name);
882 
886  const EventsFunctionsExtension& GetEventsFunctionsExtension(
887  const gd::String& name) const;
888 
893  EventsFunctionsExtension& GetEventsFunctionsExtension(std::size_t index);
894 
899  const EventsFunctionsExtension& GetEventsFunctionsExtension(
900  std::size_t index) const;
901 
906  std::size_t GetEventsFunctionsExtensionPosition(const gd::String& name) const;
907 
911  void MoveEventsFunctionsExtension(std::size_t oldIndex, std::size_t newIndex);
912 
918  void SwapEventsFunctionsExtensions(std::size_t first, std::size_t second);
919 
923  std::size_t GetEventsFunctionsExtensionsCount() const;
924 
929  gd::EventsFunctionsExtension& InsertNewEventsFunctionsExtension(
930  const gd::String& name, std::size_t position);
931 
939  gd::EventsFunctionsExtension& InsertEventsFunctionsExtension(
940  const EventsFunctionsExtension& eventsFunctionExtension,
941  std::size_t position);
942 
950  void UnserializeAndInsertExtensionsFrom(
951  const gd::SerializerElement& eventsFunctionsExtensionsElement);
952 
956  void RemoveEventsFunctionsExtension(const gd::String& name);
957 
961  void ClearEventsFunctionsExtensions();
962 
966  bool HasEventsBasedObject(const gd::String& type) const;
967 
971  gd::EventsBasedObject& GetEventsBasedObject(const gd::String& type);
972 
976  const gd::EventsBasedObject& GetEventsBasedObject(
977  const gd::String& type) const;
978 
982  bool HasEventsBasedBehavior(const gd::String& type) const;
983 
987  gd::EventsBasedBehavior& GetEventsBasedBehavior(const gd::String& type);
988 
992  const gd::EventsBasedBehavior& GetEventsBasedBehavior(
993  const gd::String& type) const;
994 
996 
1001 
1006  return resourcesContainer;
1007  }
1008 
1013  ResourcesContainer& GetResourcesManager() { return resourcesContainer; }
1014 
1019  void SetSceneResourcesPreloading(gd::String sceneResourcesPreloading_) {
1020  sceneResourcesPreloading = sceneResourcesPreloading_;
1021  }
1022 
1028  return sceneResourcesPreloading;
1029  }
1030 
1035  void SetSceneResourcesUnloading(gd::String sceneResourcesUnloading_) {
1036  sceneResourcesUnloading = sceneResourcesUnloading_;
1037  }
1038 
1044  return sceneResourcesUnloading;
1045  }
1047 
1052 
1057  inline const gd::VariablesContainer& GetVariables() const {
1058  return variables;
1059  }
1060 
1065  inline gd::VariablesContainer& GetVariables() { return variables; }
1066 
1068 
1072 
1075  gd::ObjectsContainer& GetObjects() { return objectsContainer; }
1076 
1080  const gd::ObjectsContainer& GetObjects() const { return objectsContainer; }
1082 
1086 
1091  static bool IsNameSafe(const gd::String& name);
1092 
1097  static gd::String GetSafeName(const gd::String& name);
1099 
1100  gd::WholeProjectDiagnosticReport& GetWholeProjectDiagnosticReport() {
1101  return wholeProjectDiagnosticReport;
1102  }
1103 
1104  private:
1109  void Init(const gd::Project& project);
1110 
1116  std::unique_ptr<gd::ObjectConfiguration> CreateObjectConfiguration(
1117  const gd::String& type) const;
1118 
1119  gd::MemoryTracked _memoryTracked{this, "Project"};
1120 
1121  gd::String name;
1122  gd::String description;
1123  gd::String version;
1124  unsigned int windowWidth = 0;
1125  unsigned int windowHeight = 0;
1126  int maxFPS = 0;
1127  unsigned int minFPS = 0;
1129  bool verticalSync =
1130  false;
1131  gd::String scaleMode;
1132  bool pixelsRounding = false;
1134  bool adaptGameResolutionAtRuntime =
1135  true;
1137  gd::String
1138  sizeOnStartupMode;
1140  gd::String antialiasingMode;
1141  bool isAntialisingEnabledOnMobile = false;
1142  gd::String projectUuid;
1144  bool useDeprecatedZeroAsDefaultZOrder =
1145  false;
1150  bool useDeprecatedZeroAsDefaultStringVariable =
1151  false;
1155  std::vector<std::unique_ptr<gd::Layout> > scenes;
1156  gd::VariablesContainer variables;
1157  gd::ObjectsContainer objectsContainer;
1158  std::vector<std::unique_ptr<gd::ExternalLayout> >
1159  externalLayouts;
1160  std::vector<std::unique_ptr<gd::EventsFunctionsExtension> >
1161  eventsFunctionsExtensions;
1163  resourcesContainer;
1164  std::vector<gd::Platform*>
1165  platforms;
1166  gd::String firstLayout;
1167  gd::String previewLayout;
1169  gd::String author;
1170  std::vector<gd::String>
1171  authorIds;
1172  std::vector<gd::String>
1173  authorUsernames;
1174  std::vector<gd::String> categories;
1175  bool isPlayableWithKeyboard =
1176  false;
1177  bool isPlayableWithGamepad =
1178  false;
1179  bool isPlayableWithMobile = false;
1180  gd::String packageName;
1181  gd::String templateSlug;
1183  gd::String orientation;
1185  bool folderProject =
1186  false;
1187  gd::String
1188  projectFile;
1189  gd::String latestCompilationDirectory;
1190  gd::Platform* currentPlatform =
1191  nullptr;
1192  gd::PlatformSpecificAssets platformSpecificAssets;
1193  gd::LoadingScreen loadingScreen;
1194  gd::Watermark watermark;
1195  std::vector<std::unique_ptr<gd::ExternalEvents> >
1196  externalEvents;
1197  ExtensionProperties
1198  extensionProperties;
1199  gd::WholeProjectDiagnosticReport wholeProjectDiagnosticReport;
1200  gd::String sceneResourcesPreloading;
1202  gd::String sceneResourcesUnloading;
1204  mutable unsigned int gdMajorVersion =
1205  0;
1207  mutable unsigned int gdMinorVersion =
1208  0;
1210  mutable unsigned int gdBuildVersion =
1211  0;
1213  gd::String initialGDVersion;
1214  bool areEffectsHiddenInEditor =
1215  false;
1217 };
1218 
1219 } // 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:41
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:51
unsigned int GetLastSaveGDMajorVersion()
Definition: Project.h:669
void SetUseDeprecatedZeroAsDefaultStringVariable(bool enable)
Set if the project should use "0" as the default value for unset string variables (deprecated behavio...
Definition: Project.h:453
const gd::String & GetPackageName() const
Get the project package name.
Definition: Project.h:188
const gd::String & GetSceneResourcesPreloading() const
Definition: Project.h:1027
void SetVerticalSyncActivatedByDefault(bool enable)
Definition: Project.h:375
void SetPlayableWithGamepad(bool playable=true)
Definition: Project.h:156
void SetProjectUuid(const gd::String &projectUuid_)
Change the project UUID.
Definition: Project.h:460
const gd::LoadingScreen & GetLoadingScreen() const
Return a reference to loading screen setup for the project.
Definition: Project.h:279
void SetAntialisingEnabledOnMobile(bool enable)
Definition: Project.h:419
void SetAdaptGameResolutionAtRuntime(bool adaptGameResolutionAtRuntime_)
Set if the game resolution should be adapted to the window size at runtime.
Definition: Project.h:325
const gd::String & GetPreviewLayout() const
Definition: Project.h:866
unsigned int GetGameResolutionWidth() const
Returns the default game resolution width.
Definition: Project.h:306
const gd::Watermark & GetWatermark() const
Return a reference to watermark setup for the project.
Definition: Project.h:289
const gd::String & GetSizeOnStartupMode() const
Get how the game size should be adapted to the screen.
Definition: Project.h:332
const gd::String & GetAntialiasingMode() const
Definition: Project.h:400
const gd::ExtensionProperties & GetExtensionProperties() const
Get the properties set by extensions.
Definition: Project.h:491
void SetSizeOnStartupMode(const gd::String &mode)
Set how to adapt the game size to the screen.
Definition: Project.h:339
const gd::String & GetInitialGDVersion() const
Definition: Project.h:684
bool GetPixelsRounding() const
Definition: Project.h:390
bool IsVerticalSynchronizationEnabledByDefault() const
Definition: Project.h:368
const gd::String & GetTemplateSlug() const
Get the slug of the template from which the project is created.
Definition: Project.h:200
unsigned int GetMinimumFPS() const
Definition: Project.h:363
bool IsPlayableWithGamepad() const
Definition: Project.h:163
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:100
unsigned int GetLastSaveGDBuildVersion()
Definition: Project.h:679
void SetSceneResourcesUnloading(gd::String sceneResourcesUnloading_)
Definition: Project.h:1035
void SetProjectFile(const gd::String &file)
Definition: Project.h:219
const std::vector< gd::String > & GetAuthorIds() const
Get the author ids of the project.
Definition: Project.h:120
bool GetAdaptGameResolutionAtRuntime() const
Returns true if the game resolution should be adapted to the window size at runtime.
Definition: Project.h:317
gd::PlatformSpecificAssets & GetPlatformSpecificAssets()
Return a reference to platform assets of the project (icons, splashscreen...).
Definition: Project.h:259
void SetGameResolutionSize(unsigned int width, unsigned int height)
Definition: Project.h:298
const ResourcesContainer & GetResourcesManager() const
Provide access to the ResourcesContainer member containing the list of the resources.
Definition: Project.h:1005
void SetPlayableWithMobile(bool playable=true)
Definition: Project.h:169
void SetFolderProject(bool enable=true)
Definition: Project.h:232
const gd::ObjectsContainer & GetObjects() const
Return the objects of the project.
Definition: Project.h:1080
const gd::String & GetLastCompilationDirectory() const
Definition: Project.h:251
void SetPlayableWithKeyboard(bool playable=true)
Definition: Project.h:143
const gd::String & GetScaleMode() const
Definition: Project.h:380
ResourcesContainer & GetResourcesManager()
Provide access to the ResourcesContainer member containing the list of the resources.
Definition: Project.h:1013
bool IsPlayableWithMobile() const
Definition: Project.h:176
void SetMinimumFPS(unsigned int minFPS_)
Definition: Project.h:358
gd::ExtensionProperties & GetExtensionProperties()
Get the properties set by extensions.
Definition: Project.h:481
const std::vector< gd::String > & GetAuthorUsernames() const
Get the author usernames of the project.
Definition: Project.h:130
const std::vector< gd::String > & GetCategories() const
Get the categories/genres of the project.
Definition: Project.h:76
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:207
const std::vector< Platform * > & GetUsedPlatforms() const
Definition: Project.h:498
void SetEffectsHiddenInEditor(bool enable=true)
Definition: Project.h:536
const gd::String & GetSceneResourcesUnloading() const
Definition: Project.h:1043
std::vector< gd::String > & GetCategories()
Get the categories of the project, to modify them (non-const).
Definition: Project.h:81
gd::LoadingScreen & GetLoadingScreen()
Return a reference to loading screen setup for the project.
Definition: Project.h:274
bool AreEffectsHiddenInEditor() const
Definition: Project.h:529
bool IsAntialisingEnabledOnMobile() const
Definition: Project.h:412
gd::VariablesContainer & GetVariables()
Definition: Project.h:1065
gd::Watermark & GetWatermark()
Return a reference to watermark setup for the project.
Definition: Project.h:284
const gd::PlatformSpecificAssets & GetPlatformSpecificAssets() const
Return a reference to platform assets of the project (icons, splashscreen...).
Definition: Project.h:267
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:437
const gd::VariablesContainer & GetVariables() const
Definition: Project.h:1057
const gd::String & GetVersion() const
Get the project version.
Definition: Project.h:105
const gd::String & GetName() const
Get the project name.
Definition: Project.h:71
int GetMaximumFPS() const
Definition: Project.h:352
void SetAuthor(const gd::String &author_)
Change the author of the project.
Definition: Project.h:110
void SetAntialiasingMode(const gd::String &antialiasingMode_)
Definition: Project.h:405
const gd::String & GetAuthor() const
Get the project author name.
Definition: Project.h:115
void SetTemplateSlug(const gd::String &templateSlug_)
Change the slug of the template from which the project is created.
Definition: Project.h:193
unsigned int GetLastSaveGDMinorVersion()
Definition: Project.h:674
bool IsPlayableWithKeyboard() const
Definition: Project.h:150
const gd::String & GetOrientation() const
Get the project orientation ("default", "landscape", "portrait").
Definition: Project.h:214
void SetPixelsRounding(bool enable)
Definition: Project.h:395
void SetMaximumFPS(int maxFPS_)
Definition: Project.h:347
void SetScaleMode(const gd::String &scaleMode_)
Definition: Project.h:385
void SetName(const gd::String &name_)
Change the project name.
Definition: Project.h:66
void SetSceneResourcesPreloading(gd::String sceneResourcesPreloading_)
Definition: Project.h:1019
unsigned int GetGameResolutionHeight() const
Returns the default game resolution height.
Definition: Project.h:311
std::vector< gd::String > & GetAuthorIds()
Get the author ids of the project, to modify them (non-const).
Definition: Project.h:125
const gd::String & GetDescription() const
Get the project description.
Definition: Project.h:93
bool IsFolderProject() const
Definition: Project.h:238
void SetPackageName(const gd::String &packageName_)
Change the project package name.
Definition: Project.h:181
void SetFirstLayout(const gd::String &name)
Definition: Project.h:849
bool GetUseDeprecatedZeroAsDefaultStringVariable() const
Check if the project should use "0" as the default value for unset string variables (deprecated behav...
Definition: Project.h:445
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:468
const gd::String & GetFirstLayout()
Definition: Project.h:854
const gd::String & GetProjectFile() const
Definition: Project.h:225
bool GetUseDeprecatedZeroAsDefaultZOrder() const
Return if the project should set 0 as Z-order for objects created from events (which is deprecated) -...
Definition: Project.h:428
void SetDescription(const gd::String &description_)
Change the project description.
Definition: Project.h:86
void SetLastCompilationDirectory(const gd::String &dir)
Definition: Project.h:243
void SetPreviewLayout(const gd::String &name)
Definition: Project.h:860
std::vector< gd::String > & GetAuthorUsernames()
Get the author usernames of the project, to modify them (non-const).
Definition: Project.h:137
gd::ObjectsContainer & GetObjects()
return the objects of the project.
Definition: Project.h:1075
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
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