![]() |
GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Inventory all resources used by a project. More...
#include <ResourcesManager.h>
Public Member Functions | |
| ResourcesManager (const ResourcesManager &) | |
| ResourcesManager & | operator= (const ResourcesManager &rhs) |
| bool | HasResource (const gd::String &name) const |
| Return true if a resource exists. | |
| const gd::String & | GetResourceNameWithOrigin (const gd::String &originName, const gd::String &originIdentifier) const |
| Return the name of the resource with the given origin, if any. If not found, an empty string is returned. | |
| const gd::String & | GetResourceNameWithFile (const gd::String &file) const |
| Return the name of the first resource with the given file, if any. If not found, an empty string is returned. | |
| Resource & | GetResource (const gd::String &name) |
| Return a reference to a resource. | |
| const Resource & | GetResource (const gd::String &name) const |
| Return a reference to a resource. | |
| std::shared_ptr< Resource > | CreateResource (const gd::String &kind) |
| Create a new resource but does not add it to the list. | |
| const std::vector< std::shared_ptr< Resource > > & | GetAllResources () const |
| std::vector< gd::String > | GetAllResourceNames () const |
| Get a list containing the names of all resources. | |
| std::vector< gd::String > | FindFilesNotInResources (const std::vector< gd::String > &filePathsToCheck) const |
| Return a list of the files, from the specified input list, that are not used as files by the resources. | |
| std::shared_ptr< gd::Resource > | GetResourceSPtr (const gd::String &name) |
| Return a (smart) pointer to a resource. | |
| bool | AddResource (const gd::Resource &resource) |
| Add an already constructed resource. More... | |
| bool | AddResource (const gd::String &name, const gd::String &filename, const gd::String &kind) |
| Add a resource created from a file. | |
| void | RemoveResource (const gd::String &name) |
| Remove a resource. | |
| void | RenameResource (const gd::String &oldName, const gd::String &newName) |
| Rename a resource. | |
| std::size_t | GetResourcePosition (const gd::String &name) const |
| Return the position of the layer called "name" in the layers list. | |
| bool | MoveResourceUpInList (const gd::String &name) |
| Move a resource up in the list. | |
| bool | MoveResourceDownInList (const gd::String &name) |
| Move a resource down in the list. | |
| void | MoveResource (std::size_t oldIndex, std::size_t newIndex) |
| Change the position of the specified resource. | |
| bool | HasFolder (const gd::String &name) const |
| Return true if the folder exists. | |
| const ResourceFolder & | GetFolder (const gd::String &name) const |
| Return a reference to a folder. | |
| ResourceFolder & | GetFolder (const gd::String &name) |
| Return a reference to a folder. | |
| void | RemoveFolder (const gd::String &name) |
| Remove a folder. | |
| void | CreateFolder (const gd::String &name) |
| Create a new empty folder. | |
| bool | MoveFolderUpInList (const gd::String &name) |
| Move a folder up in the list. | |
| bool | MoveFolderDownInList (const gd::String &name) |
| Move a folder down in the list. | |
| std::vector< gd::String > | GetAllFolderList () |
| Get a list containing the name of all of the folders. | |
| void | SerializeTo (SerializerElement &element) const |
| Serialize the object. | |
| void | UnserializeFrom (const SerializerElement &element) |
| Unserialize the object. | |
Static Public Member Functions | |
| static void | SerializeResourceTo (gd::Resource &resource, SerializerElement &resourceElement) |
| Serialize one resource. | |
Inventory all resources used by a project.
| bool gd::ResourcesManager::AddResource | ( | const gd::Resource & | resource | ) |
Add an already constructed resource.
|
inline |
Get a list containing all the resources.