1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-28 18:18:52 +00:00
OpenMW/components/lua_ui/resources.cpp
2023-06-08 21:10:09 +02:00

21 lines
467 B
C++

#include "resources.hpp"
#include <components/vfs/pathutil.hpp>
namespace LuaUi
{
std::shared_ptr<TextureResource> ResourceManager::registerTexture(TextureData data)
{
VFS::Path::normalizeFilenameInPlace(data.mPath);
TextureResources& list = mTextures[data.mPath];
list.push_back(std::make_shared<TextureResource>(data));
return list.back();
}
void ResourceManager::clear()
{
mTextures.clear();
}
}