GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
A gd::ObjectConfiguration that stores its content in JSON and is composed of other configuration according to it's object children. More...
#include <CustomObjectConfiguration.h>
Inherits gd::ObjectConfiguration.
Public Types | |
enum | EdgeAnchor { NoAnchor = 0 , MinEdge = 1 , MaxEdge = 2 , Proportional = 3 , Center = 4 } |
Public Member Functions | |
CustomObjectConfiguration (const Project &project_, const String &type_) | |
std::unique_ptr< gd::ObjectConfiguration > | Clone () const override |
CustomObjectConfiguration (const gd::CustomObjectConfiguration &object) | |
CustomObjectConfiguration & | operator= (const gd::CustomObjectConfiguration &object) |
std::map< gd::String, gd::PropertyDescriptor > | GetProperties () const override |
Called when the IDE wants to know about the custom properties of the object configuration. More... | |
bool | UpdateProperty (const gd::String &name, const gd::String &value) override |
Called when the IDE wants to update a custom property of the object configuration. More... | |
std::map< gd::String, gd::PropertyDescriptor > | GetInitialInstanceProperties (const gd::InitialInstance &instance) override |
Called when the IDE wants to know about the custom properties of an initial instance of this object configuration. More... | |
bool | UpdateInitialInstanceProperty (gd::InitialInstance &instance, const gd::String &name, const gd::String &value) override |
Called when the IDE wants to update a custom property of an initial instance of this object configuration. More... | |
void | ExposeResources (gd::ArbitraryResourceWorker &worker) override |
Called ( e.g. during compilation ) so as to inventory internal resources and sometimes update their filename. Implementation example: More... | |
bool | IsForcedToOverrideEventsBasedObjectChildrenConfiguration () const |
bool | IsMarkedAsOverridingEventsBasedObjectChildrenConfiguration () const |
void | SetMarkedAsOverridingEventsBasedObjectChildrenConfiguration (bool isOverridingEventsBasedObjectChildrenConfiguration_) |
void | ClearChildrenConfiguration () |
gd::ObjectConfiguration & | GetChildObjectConfiguration (const gd::String &objectName) |
std::size_t | GetAnimationsCount () const override |
Return the number of animations declared in this object configuration. | |
const gd::String & | GetAnimationName (size_t index) const override |
Return the name of an animation declared in this object configuration. | |
bool | HasAnimationNamed (const gd::String &animationName) const override |
Return true if an animation is declared in this object configuration for a given name. | |
const SpriteAnimationList & | GetAnimations () const |
Return the animation configuration for Animatable custom objects. | |
SpriteAnimationList & | GetAnimations () |
Return the animation configuration for Animatable custom objects. | |
bool | IsChildObjectFolded (const gd::String &childName) const |
void | SetChildObjectFolded (const gd::String &childName, bool folded) |
Public Member Functions inherited from gd::ObjectConfiguration | |
ObjectConfiguration () | |
virtual | ~ObjectConfiguration () |
void | SetType (const gd::String &type_) |
Change the type of the object. | |
const gd::String & | GetType () const |
Return the type of the object. | |
void | SerializeTo (SerializerElement &element) const |
Serialize the object configuration. More... | |
void | UnserializeFrom (gd::Project &project, const SerializerElement &element) |
Unserialize the object configuration. More... | |
Static Public Member Functions | |
static const gd::CustomObjectConfiguration::EdgeAnchor | GetEdgeAnchorFromString (const gd::String &value) |
Protected Member Functions | |
void | DoSerializeTo (SerializerElement &element) const override |
Derived object configuration can redefine this method to save custom attributes. | |
void | DoUnserializeFrom (Project &project, const SerializerElement &element) override |
Derived object configuration can redefine this method to load custom attributes. | |
Additional Inherited Members | |
Protected Attributes inherited from gd::ObjectConfiguration | |
gd::String | type |
A gd::ObjectConfiguration that stores its content in JSON and is composed of other configuration according to it's object children.
It also implements "ExposeResources" to expose the properties of type "resource".
|
inline |
Copy constructor. Calls Init().
|
overridevirtual |
Must return a pointer to a copy of the configuration. This method is needed to do polymorphic copies. Just redefine this method in your derived object class like this:
Reimplemented from gd::ObjectConfiguration.
|
overridevirtual |
Called ( e.g. during compilation ) so as to inventory internal resources and sometimes update their filename. Implementation example:
Reimplemented from gd::ObjectConfiguration.
|
overridevirtual |
Called when the IDE wants to know about the custom properties of an initial instance of this object configuration.
Reimplemented from gd::ObjectConfiguration.
|
overridevirtual |
Called when the IDE wants to know about the custom properties of the object configuration.
Usage example:
Reimplemented from gd::ObjectConfiguration.
|
inline |
Check if a child object properties must be displayed as folded in the editor. This is only useful when the object can override its children configuration (which is something being deprecated).
|
inline |
Assignment operator. Calls Init().
|
inline |
Set if a child object properties must be displayed as folded in the editor. This is only useful when the object can override its children configuration (which is something being deprecated).
|
overridevirtual |
Called when the IDE wants to update a custom property of an initial instance of this object configuration.
Reimplemented from gd::ObjectConfiguration.
|
overridevirtual |
Called when the IDE wants to update a custom property of the object configuration.
Reimplemented from gd::ObjectConfiguration.