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/String.h"
22 namespace gd {
23 class Platform;
24 class Layout;
25 class ExternalEvents;
26 class ResourcesContainer;
27 class ExternalLayout;
28 class EventsFunctionsExtension;
29 class EventsBasedObject;
30 class EventsBasedBehavior;
31 class Object;
32 class ObjectConfiguration;
33 class VariablesContainer;
34 class ArbitraryResourceWorker;
35 class Behavior;
36 class BehaviorsSharedData;
37 class BaseEvent;
38 class SerializerElement;
39 } // namespace gd
40 #undef GetObject // Disable an annoying macro
41 #undef CreateEvent
42 
43 namespace gd {
50 class GD_CORE_API Project {
51  public:
52  Project();
53  Project(const Project&);
54  virtual ~Project();
55  Project& operator=(const Project& rhs);
56 
61 
65  void SetName(const gd::String& name_) { name = name_; };
66 
70  const gd::String& GetName() const { return name; }
71 
75  const std::vector<gd::String>& GetCategories() const { return categories; };
76 
80  std::vector<gd::String>& GetCategories() { return categories; };
81 
85  void SetDescription(const gd::String& description_) {
86  description = description_;
87  };
88 
92  const gd::String& GetDescription() const { return description; }
93 
99  void SetVersion(const gd::String& version_) { version = version_; };
100 
104  const gd::String& GetVersion() const { return version; }
105 
109  void SetAuthor(const gd::String& author_) { author = author_; };
110 
114  const gd::String& GetAuthor() const { return author; }
115 
119  const std::vector<gd::String>& GetAuthorIds() const { return authorIds; };
120 
124  std::vector<gd::String>& GetAuthorIds() { return authorIds; };
125 
129  const std::vector<gd::String>& GetAuthorUsernames() const {
130  return authorUsernames;
131  };
132 
136  std::vector<gd::String>& GetAuthorUsernames() { return authorUsernames; };
137 
142  void SetPlayableWithKeyboard(bool playable = true) {
143  isPlayableWithKeyboard = playable;
144  }
145 
149  bool IsPlayableWithKeyboard() const { return isPlayableWithKeyboard; }
150 
155  void SetPlayableWithGamepad(bool playable = true) {
156  isPlayableWithGamepad = playable;
157  }
158 
162  bool IsPlayableWithGamepad() const { return isPlayableWithGamepad; }
163 
168  void SetPlayableWithMobile(bool playable = true) {
169  isPlayableWithMobile = playable;
170  }
171 
175  bool IsPlayableWithMobile() const { return isPlayableWithMobile; }
176 
180  void SetPackageName(const gd::String& packageName_) {
181  packageName = packageName_;
182  };
183 
187  const gd::String& GetPackageName() const { return packageName; }
188 
192  void SetTemplateSlug(const gd::String& templateSlug_) {
193  templateSlug = templateSlug_;
194  };
195 
199  const gd::String& GetTemplateSlug() const { return templateSlug; }
200 
206  void SetOrientation(const gd::String& orientation_) {
207  orientation = orientation_;
208  };
209 
213  const gd::String& GetOrientation() const { return orientation; }
214 
218  void SetProjectFile(const gd::String& file) { projectFile = file; }
219 
224  const gd::String& GetProjectFile() const { return projectFile; }
225 
231  void SetFolderProject(bool enable = true) { folderProject = enable; }
232 
237  bool IsFolderProject() const { return folderProject; }
238 
243  latestCompilationDirectory = dir;
244  }
245 
251  return latestCompilationDirectory;
252  }
253 
259  return platformSpecificAssets;
260  }
261 
267  return platformSpecificAssets;
268  }
269 
273  gd::LoadingScreen& GetLoadingScreen() { return loadingScreen; }
274 
278  const gd::LoadingScreen& GetLoadingScreen() const { return loadingScreen; }
279 
283  gd::Watermark& GetWatermark() { return watermark; }
284 
288  const gd::Watermark& GetWatermark() const { return watermark; }
289 
297  void SetGameResolutionSize(unsigned int width, unsigned int height) {
298  windowWidth = width;
299  windowHeight = height;
300  }
301 
305  unsigned int GetGameResolutionWidth() const { return windowWidth; }
306 
310  unsigned int GetGameResolutionHeight() const { return windowHeight; }
311 
317  return adaptGameResolutionAtRuntime;
318  }
319 
324  void SetAdaptGameResolutionAtRuntime(bool adaptGameResolutionAtRuntime_) {
325  adaptGameResolutionAtRuntime = adaptGameResolutionAtRuntime_;
326  }
327 
331  const gd::String& GetSizeOnStartupMode() const { return sizeOnStartupMode; }
332 
338  void SetSizeOnStartupMode(const gd::String& mode) {
339  sizeOnStartupMode = mode;
340  }
341 
346  void SetMaximumFPS(int maxFPS_) { maxFPS = maxFPS_; }
347 
351  int GetMaximumFPS() const { return maxFPS; }
352 
357  void SetMinimumFPS(unsigned int minFPS_) { minFPS = minFPS_; }
358 
362  unsigned int GetMinimumFPS() const { return minFPS; }
363 
368  return verticalSync;
369  }
370 
374  void SetVerticalSyncActivatedByDefault(bool enable) { verticalSync = enable; }
375 
379  const gd::String& GetScaleMode() const { return scaleMode; }
380 
384  void SetScaleMode(const gd::String& scaleMode_) { scaleMode = scaleMode_; }
385 
389  bool GetPixelsRounding() const { return pixelsRounding; }
390 
394  void SetPixelsRounding(bool enable) { pixelsRounding = enable; }
395 
399  const gd::String& GetAntialiasingMode() const { return antialiasingMode; }
400 
404  void SetAntialiasingMode(const gd::String& antialiasingMode_) {
405  antialiasingMode = antialiasingMode_;
406  }
407 
412  return isAntialisingEnabledOnMobile;
413  }
414 
418  void SetAntialisingEnabledOnMobile(bool enable) {
419  isAntialisingEnabledOnMobile = enable;
420  }
421 
428  return useDeprecatedZeroAsDefaultZOrder;
429  }
430 
437  useDeprecatedZeroAsDefaultZOrder = enable;
438  }
439 
443  void SetProjectUuid(const gd::String& projectUuid_) {
444  projectUuid = projectUuid_;
445  };
446 
451  const gd::String& GetProjectUuid() const { return projectUuid; }
452 
456  void ResetProjectUuid();
457 
465  return extensionProperties;
466  };
467 
475  return extensionProperties;
476  };
477 
481  const std::vector<Platform*>& GetUsedPlatforms() const { return platforms; };
482 
486  void AddPlatform(Platform& platform);
487 
494  bool RemovePlatform(const gd::String& platformName);
495 
500  Platform& GetCurrentPlatform() const;
501 
507  void SetCurrentPlatform(const gd::String& platformName);
508 
512  bool AreEffectsHiddenInEditor() const { return areEffectsHiddenInEditor; }
513 
519  void SetEffectsHiddenInEditor(bool enable = true) {
520  areEffectsHiddenInEditor = enable;
521  }
522 
524 
529 
536  std::unique_ptr<gd::Object> CreateObject(const gd::String& type,
537  const gd::String& name) const;
538 
539  void EnsureObjectDefaultBehaviors(gd::Object& object) const;
540 
553  std::shared_ptr<gd::BaseEvent> CreateEvent(
554  const gd::String& type, const gd::String& platformName = "");
556 
561 
564  bool HasLayoutNamed(const gd::String& name) const;
565 
569  Layout& GetLayout(const gd::String& name);
570 
574  const Layout& GetLayout(const gd::String& name) const;
575 
580  Layout& GetLayout(std::size_t index);
581 
586  const Layout& GetLayout(std::size_t index) const;
587 
591  std::size_t GetLayoutPosition(const gd::String& name) const;
592 
596  void MoveLayout(std::size_t oldIndex, std::size_t newIndex);
597 
603  void SwapLayouts(std::size_t first, std::size_t second);
604 
608  std::size_t GetLayoutsCount() const;
609 
614  gd::Layout& InsertNewLayout(const gd::String& name, std::size_t position);
615 
628  gd::Layout& InsertLayout(const Layout& layout, std::size_t position);
629 
633  void RemoveLayout(const gd::String& name);
634 
636 
640  void UnserializeFrom(const SerializerElement& element);
641 
647  void SerializeTo(SerializerElement& element) const;
648 
652  unsigned int GetLastSaveGDMajorVersion() { return gdMajorVersion; };
653 
657  unsigned int GetLastSaveGDMinorVersion() { return gdMinorVersion; };
658 
662  unsigned int GetLastSaveGDBuildVersion() { return gdBuildVersion; };
663 
668 
671  bool HasExternalEventsNamed(const gd::String& name) const;
672 
676  ExternalEvents& GetExternalEvents(const gd::String& name);
677 
681  const ExternalEvents& GetExternalEvents(const gd::String& name) const;
682 
687  ExternalEvents& GetExternalEvents(std::size_t index);
688 
693  const ExternalEvents& GetExternalEvents(std::size_t index) const;
694 
699  std::size_t GetExternalEventsPosition(const gd::String& name) const;
700 
704  void MoveExternalEvents(std::size_t oldIndex, std::size_t newIndex);
705 
711  void SwapExternalEvents(std::size_t first, std::size_t second);
712 
716  std::size_t GetExternalEventsCount() const;
717 
722  ExternalEvents& InsertNewExternalEvents(const gd::String& name,
723  std::size_t position);
724 
733  ExternalEvents& InsertExternalEvents(const ExternalEvents& externalEvents,
734  std::size_t position);
735 
739  void RemoveExternalEvents(const gd::String& name);
741 
746 
750  bool HasExternalLayoutNamed(const gd::String& name) const;
751 
755  ExternalLayout& GetExternalLayout(const gd::String& name);
756 
760  const ExternalLayout& GetExternalLayout(const gd::String& name) const;
761 
766  ExternalLayout& GetExternalLayout(std::size_t index);
767 
772  const ExternalLayout& GetExternalLayout(std::size_t index) const;
773 
778  std::size_t GetExternalLayoutPosition(const gd::String& name) const;
779 
783  void MoveExternalLayout(std::size_t oldIndex, std::size_t newIndex);
784 
790  void SwapExternalLayouts(std::size_t first, std::size_t second);
791 
795  std::size_t GetExternalLayoutsCount() const;
796 
801  gd::ExternalLayout& InsertNewExternalLayout(const gd::String& name,
802  std::size_t position);
803 
816  gd::ExternalLayout& InsertExternalLayout(const ExternalLayout& externalLayout,
817  std::size_t position);
818 
822  void RemoveExternalLayout(const gd::String& name);
823 
827  void SetFirstLayout(const gd::String& name) { firstLayout = name; }
828 
832  const gd::String& GetFirstLayout() { return firstLayout; }
833 
835 
839 
842  bool HasEventsFunctionsExtensionNamed(const gd::String& name) const;
843 
847  EventsFunctionsExtension& GetEventsFunctionsExtension(const gd::String& name);
848 
852  const EventsFunctionsExtension& GetEventsFunctionsExtension(
853  const gd::String& name) const;
854 
859  EventsFunctionsExtension& GetEventsFunctionsExtension(std::size_t index);
860 
865  const EventsFunctionsExtension& GetEventsFunctionsExtension(
866  std::size_t index) const;
867 
872  std::size_t GetEventsFunctionsExtensionPosition(const gd::String& name) const;
873 
877  void MoveEventsFunctionsExtension(std::size_t oldIndex, std::size_t newIndex);
878 
884  void SwapEventsFunctionsExtensions(std::size_t first, std::size_t second);
885 
889  std::size_t GetEventsFunctionsExtensionsCount() const;
890 
895  gd::EventsFunctionsExtension& InsertNewEventsFunctionsExtension(
896  const gd::String& name, std::size_t position);
897 
905  gd::EventsFunctionsExtension& InsertEventsFunctionsExtension(
906  const EventsFunctionsExtension& eventsFunctionExtension,
907  std::size_t position);
908 
916  void UnserializeAndInsertExtensionsFrom(
917  const gd::SerializerElement& eventsFunctionsExtensionsElement);
918 
922  void RemoveEventsFunctionsExtension(const gd::String& name);
923 
927  void ClearEventsFunctionsExtensions();
928 
932  bool HasEventsBasedObject(const gd::String& type) const;
933 
937  gd::EventsBasedObject& GetEventsBasedObject(const gd::String& type);
938 
942  const gd::EventsBasedObject& GetEventsBasedObject(
943  const gd::String& type) const;
944 
948  bool HasEventsBasedBehavior(const gd::String& type) const;
949 
953  gd::EventsBasedBehavior& GetEventsBasedBehavior(const gd::String& type);
954 
958  const gd::EventsBasedBehavior& GetEventsBasedBehavior(
959  const gd::String& type) const;
960 
962 
967 
972  return resourcesContainer;
973  }
974 
979  ResourcesContainer& GetResourcesManager() { return resourcesContainer; }
980 
985  void SetSceneResourcesPreloading(gd::String sceneResourcesPreloading_) {
986  sceneResourcesPreloading = sceneResourcesPreloading_;
987  }
988 
994  return sceneResourcesPreloading;
995  }
996 
1001  void SetSceneResourcesUnloading(gd::String sceneResourcesUnloading_) {
1002  sceneResourcesUnloading = sceneResourcesUnloading_;
1003  }
1004 
1010  return sceneResourcesUnloading;
1011  }
1013 
1018 
1023  inline const gd::VariablesContainer& GetVariables() const {
1024  return variables;
1025  }
1026 
1031  inline gd::VariablesContainer& GetVariables() { return variables; }
1032 
1034 
1038 
1041  gd::ObjectsContainer& GetObjects() { return objectsContainer; }
1042 
1046  const gd::ObjectsContainer& GetObjects() const { return objectsContainer; }
1048 
1052 
1057  static bool IsNameSafe(const gd::String& name);
1058 
1063  static gd::String GetSafeName(const gd::String& name);
1065 
1066  gd::WholeProjectDiagnosticReport& GetWholeProjectDiagnosticReport() {
1067  return wholeProjectDiagnosticReport;
1068  }
1069 
1079  static std::vector<gd::String> GetUnserializingOrderExtensionNames(
1080  const gd::SerializerElement& eventsFunctionsExtensionsElement);
1081 
1082  private:
1087  void Init(const gd::Project& project);
1088 
1094  std::unique_ptr<gd::ObjectConfiguration> CreateObjectConfiguration(
1095  const gd::String& type) const;
1096 
1097  gd::String name;
1098  gd::String description;
1099  gd::String version;
1100  unsigned int windowWidth = 0;
1101  unsigned int windowHeight = 0;
1102  int maxFPS = 0;
1103  unsigned int minFPS = 0;
1105  bool verticalSync =
1106  false;
1107  gd::String scaleMode;
1108  bool pixelsRounding = false;
1110  bool adaptGameResolutionAtRuntime =
1111  true;
1113  gd::String
1114  sizeOnStartupMode;
1116  gd::String antialiasingMode;
1117  bool isAntialisingEnabledOnMobile = false;
1118  gd::String projectUuid;
1120  bool useDeprecatedZeroAsDefaultZOrder =
1121  false;
1126  std::vector<std::unique_ptr<gd::Layout> > scenes;
1127  gd::VariablesContainer variables;
1128  gd::ObjectsContainer objectsContainer;
1129  std::vector<std::unique_ptr<gd::ExternalLayout> >
1130  externalLayouts;
1131  std::vector<std::unique_ptr<gd::EventsFunctionsExtension> >
1132  eventsFunctionsExtensions;
1134  resourcesContainer;
1135  std::vector<gd::Platform*>
1136  platforms;
1137  gd::String firstLayout;
1138  gd::String author;
1139  std::vector<gd::String>
1140  authorIds;
1141  std::vector<gd::String>
1142  authorUsernames;
1143  std::vector<gd::String> categories;
1144  bool isPlayableWithKeyboard =
1145  false;
1146  bool isPlayableWithGamepad =
1147  false;
1148  bool isPlayableWithMobile = false;
1149  gd::String packageName;
1150  gd::String templateSlug;
1152  gd::String orientation;
1154  bool folderProject =
1155  false;
1156  gd::String
1157  projectFile;
1158  gd::String latestCompilationDirectory;
1159  gd::Platform* currentPlatform =
1160  nullptr;
1161  gd::PlatformSpecificAssets platformSpecificAssets;
1162  gd::LoadingScreen loadingScreen;
1163  gd::Watermark watermark;
1164  std::vector<std::unique_ptr<gd::ExternalEvents> >
1165  externalEvents;
1166  ExtensionProperties
1167  extensionProperties;
1168  gd::WholeProjectDiagnosticReport wholeProjectDiagnosticReport;
1169  gd::String sceneResourcesPreloading;
1171  gd::String sceneResourcesUnloading;
1173  mutable unsigned int gdMajorVersion =
1174  0;
1176  mutable unsigned int gdMinorVersion =
1177  0;
1179  mutable unsigned int gdBuildVersion =
1180  0;
1182  bool areEffectsHiddenInEditor =
1183  false;
1185 };
1186 
1187 } // 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:40
Describe the content and set up of the loading screen.
Definition: LoadingScreen.h:23
Represent an object of a platform.
Definition: Object.h:37
Used as a base class for classes that will own objects (see gd::Object).
Definition: ObjectsContainer.h:37
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:50
unsigned int GetLastSaveGDMajorVersion()
Definition: Project.h:652
const gd::String & GetPackageName() const
Get the project package name.
Definition: Project.h:187
const gd::String & GetSceneResourcesPreloading() const
Definition: Project.h:993
void SetVerticalSyncActivatedByDefault(bool enable)
Definition: Project.h:374
void SetPlayableWithGamepad(bool playable=true)
Definition: Project.h:155
void SetProjectUuid(const gd::String &projectUuid_)
Change the project UUID.
Definition: Project.h:443
const gd::LoadingScreen & GetLoadingScreen() const
Return a reference to loading screen setup for the project.
Definition: Project.h:278
void SetAntialisingEnabledOnMobile(bool enable)
Definition: Project.h:418
void SetAdaptGameResolutionAtRuntime(bool adaptGameResolutionAtRuntime_)
Set if the game resolution should be adapted to the window size at runtime.
Definition: Project.h:324
unsigned int GetGameResolutionWidth() const
Returns the default game resolution width.
Definition: Project.h:305
const gd::Watermark & GetWatermark() const
Return a reference to watermark setup for the project.
Definition: Project.h:288
const gd::String & GetSizeOnStartupMode() const
Get how the game size should be adapted to the screen.
Definition: Project.h:331
const gd::String & GetAntialiasingMode() const
Definition: Project.h:399
const gd::ExtensionProperties & GetExtensionProperties() const
Get the properties set by extensions.
Definition: Project.h:474
void SetSizeOnStartupMode(const gd::String &mode)
Set how to adapt the game size to the screen.
Definition: Project.h:338
bool GetPixelsRounding() const
Definition: Project.h:389
bool IsVerticalSynchronizationEnabledByDefault() const
Definition: Project.h:367
const gd::String & GetTemplateSlug() const
Get the slug of the template from which the project is created.
Definition: Project.h:199
unsigned int GetMinimumFPS() const
Definition: Project.h:362
bool IsPlayableWithGamepad() const
Definition: Project.h:162
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:99
unsigned int GetLastSaveGDBuildVersion()
Definition: Project.h:662
void SetSceneResourcesUnloading(gd::String sceneResourcesUnloading_)
Definition: Project.h:1001
void SetProjectFile(const gd::String &file)
Definition: Project.h:218
const std::vector< gd::String > & GetAuthorIds() const
Get the author ids of the project.
Definition: Project.h:119
bool GetAdaptGameResolutionAtRuntime() const
Returns true if the game resolution should be adapted to the window size at runtime.
Definition: Project.h:316
gd::PlatformSpecificAssets & GetPlatformSpecificAssets()
Return a reference to platform assets of the project (icons, splashscreen...).
Definition: Project.h:258
void SetGameResolutionSize(unsigned int width, unsigned int height)
Definition: Project.h:297
const ResourcesContainer & GetResourcesManager() const
Provide access to the ResourcesContainer member containing the list of the resources.
Definition: Project.h:971
void SetPlayableWithMobile(bool playable=true)
Definition: Project.h:168
void SetFolderProject(bool enable=true)
Definition: Project.h:231
const gd::ObjectsContainer & GetObjects() const
Return the objects of the project.
Definition: Project.h:1046
const gd::String & GetLastCompilationDirectory() const
Definition: Project.h:250
void SetPlayableWithKeyboard(bool playable=true)
Definition: Project.h:142
const gd::String & GetScaleMode() const
Definition: Project.h:379
ResourcesContainer & GetResourcesManager()
Provide access to the ResourcesContainer member containing the list of the resources.
Definition: Project.h:979
bool IsPlayableWithMobile() const
Definition: Project.h:175
void SetMinimumFPS(unsigned int minFPS_)
Definition: Project.h:357
gd::ExtensionProperties & GetExtensionProperties()
Get the properties set by extensions.
Definition: Project.h:464
const std::vector< gd::String > & GetAuthorUsernames() const
Get the author usernames of the project.
Definition: Project.h:129
const std::vector< gd::String > & GetCategories() const
Get the categories/genres of the project.
Definition: Project.h:75
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:206
const std::vector< Platform * > & GetUsedPlatforms() const
Definition: Project.h:481
void SetEffectsHiddenInEditor(bool enable=true)
Definition: Project.h:519
const gd::String & GetSceneResourcesUnloading() const
Definition: Project.h:1009
std::vector< gd::String > & GetCategories()
Get the categories of the project, to modify them (non-const).
Definition: Project.h:80
gd::LoadingScreen & GetLoadingScreen()
Return a reference to loading screen setup for the project.
Definition: Project.h:273
bool AreEffectsHiddenInEditor() const
Definition: Project.h:512
bool IsAntialisingEnabledOnMobile() const
Definition: Project.h:411
gd::VariablesContainer & GetVariables()
Definition: Project.h:1031
gd::Watermark & GetWatermark()
Return a reference to watermark setup for the project.
Definition: Project.h:283
const gd::PlatformSpecificAssets & GetPlatformSpecificAssets() const
Return a reference to platform assets of the project (icons, splashscreen...).
Definition: Project.h:266
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:436
const gd::VariablesContainer & GetVariables() const
Definition: Project.h:1023
const gd::String & GetVersion() const
Get the project version.
Definition: Project.h:104
const gd::String & GetName() const
Get the project name.
Definition: Project.h:70
int GetMaximumFPS() const
Definition: Project.h:351
void SetAuthor(const gd::String &author_)
Change the author of the project.
Definition: Project.h:109
void SetAntialiasingMode(const gd::String &antialiasingMode_)
Definition: Project.h:404
const gd::String & GetAuthor() const
Get the project author name.
Definition: Project.h:114
void SetTemplateSlug(const gd::String &templateSlug_)
Change the slug of the template from which the project is created.
Definition: Project.h:192
unsigned int GetLastSaveGDMinorVersion()
Definition: Project.h:657
bool IsPlayableWithKeyboard() const
Definition: Project.h:149
const gd::String & GetOrientation() const
Get the project orientation ("default", "landscape", "portrait").
Definition: Project.h:213
void SetPixelsRounding(bool enable)
Definition: Project.h:394
void SetMaximumFPS(int maxFPS_)
Definition: Project.h:346
void SetScaleMode(const gd::String &scaleMode_)
Definition: Project.h:384
void SetName(const gd::String &name_)
Change the project name.
Definition: Project.h:65
void SetSceneResourcesPreloading(gd::String sceneResourcesPreloading_)
Definition: Project.h:985
unsigned int GetGameResolutionHeight() const
Returns the default game resolution height.
Definition: Project.h:310
std::vector< gd::String > & GetAuthorIds()
Get the author ids of the project, to modify them (non-const).
Definition: Project.h:124
const gd::String & GetDescription() const
Get the project description.
Definition: Project.h:92
bool IsFolderProject() const
Definition: Project.h:237
void SetPackageName(const gd::String &packageName_)
Change the project package name.
Definition: Project.h:180
void SetFirstLayout(const gd::String &name)
Definition: Project.h:827
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:451
const gd::String & GetFirstLayout()
Definition: Project.h:832
const gd::String & GetProjectFile() const
Definition: Project.h:224
bool GetUseDeprecatedZeroAsDefaultZOrder() const
Return if the project should set 0 as Z-order for objects created from events (which is deprecated) -...
Definition: Project.h:427
void SetDescription(const gd::String &description_)
Change the project description.
Definition: Project.h:85
void SetLastCompilationDirectory(const gd::String &dir)
Definition: Project.h:242
std::vector< gd::String > & GetAuthorUsernames()
Get the author usernames of the project, to modify them (non-const).
Definition: Project.h:136
gd::ObjectsContainer & GetObjects()
return the objects of the project.
Definition: Project.h:1041
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:28
Describe the content and set up of the watermark.
Definition: Watermark.h:23
Definition: DiagnosticReport.h:95
Definition: CommonTools.h:24