GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Base class to describe a resource used by a game. More...
#include <ResourcesManager.h>
Inherited by gd::AtlasResource, gd::AudioResource, gd::BitmapFontResource, gd::FontResource, gd::ImageResource, gd::JsonResource, gd::Model3DResource, gd::TilemapResource, gd::TilesetResource, and gd::VideoResource.
Public Member Functions | |
virtual Resource * | Clone () const |
virtual void | SetName (const gd::String &name_) |
Change the name of the resource with the name passed as parameter. | |
virtual const gd::String & | GetName () const |
Return the name of the resource. | |
virtual void | SetKind (const gd::String &newKind) |
Change the kind of the resource. | |
virtual const gd::String & | GetKind () const |
Return the kind of the resource. | |
virtual void | SetUserAdded (bool isUserAdded) |
Change if the resource is user added or not. | |
virtual bool | IsUserAdded () const |
Return true if the resource was added by the user. | |
virtual bool | UseFile () const |
Return true if the resource use a file. More... | |
virtual const gd::String & | GetFile () const |
Return, if applicable, the String containing the file used by the resource. The file is relative to the project directory. More... | |
virtual void | SetFile (const gd::String &newFile) |
Change, if applicable, the file of the resource. More... | |
virtual void | SetOrigin (const gd::String &originName_, const gd::String &originIdentifier_) |
virtual const gd::String & | GetOriginName () const |
virtual const gd::String & | GetOriginIdentifier () const |
virtual void | SetMetadata (const gd::String &metadata_) |
Set the metadata (any string) associated to the resource. More... | |
virtual const gd::String & | GetMetadata () const |
Return the (optional) metadata associated to the resource. | |
virtual void | SerializeTo (SerializerElement &element) const |
Serialize the object. | |
virtual void | UnserializeFrom (const SerializerElement &element) |
Unserialize the object. | |
Resources properties | |
Reading and updating resources properties | |
virtual std::map< gd::String, gd::PropertyDescriptor > | GetProperties () const |
Called when the IDE wants to know about the custom properties of the resource. More... | |
virtual bool | UpdateProperty (const gd::String &name, const gd::String &value) |
Called when the IDE wants to update a custom property of the resource. More... | |
Base class to describe a resource used by a game.
|
inlinevirtual |
Return, if applicable, the String containing the file used by the resource. The file is relative to the project directory.
Reimplemented in gd::AtlasResource, gd::Model3DResource, gd::BitmapFontResource, gd::TilesetResource, gd::TilemapResource, gd::JsonResource, gd::VideoResource, gd::FontResource, gd::AudioResource, and gd::ImageResource.
|
virtual |
Called when the IDE wants to know about the custom properties of the resource.
Usage example:
Reimplemented in gd::TilesetResource, gd::TilemapResource, gd::JsonResource, gd::AudioResource, and gd::ImageResource.
|
inlinevirtual |
Change, if applicable, the file of the resource.
Reimplemented in gd::AtlasResource, gd::Model3DResource, gd::BitmapFontResource, gd::TilesetResource, gd::TilemapResource, gd::JsonResource, gd::VideoResource, gd::FontResource, gd::AudioResource, and gd::ImageResource.
|
inlinevirtual |
Set the metadata (any string) associated to the resource.
|
inlinevirtual |
TODO: make a ResourceOrigin object?
|
inlinevirtual |
Called when the IDE wants to update a custom property of the resource.
Reimplemented in gd::TilesetResource, gd::TilemapResource, gd::JsonResource, gd::AudioResource, and gd::ImageResource.
|
inlinevirtual |
Return true if the resource use a file.
Reimplemented in gd::AtlasResource, gd::Model3DResource, gd::BitmapFontResource, gd::TilesetResource, gd::TilemapResource, gd::JsonResource, gd::VideoResource, gd::FontResource, gd::AudioResource, and gd::ImageResource.