1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 11:53:53 +00:00
openmw/components/lua_ui/resources.cpp

22 lines
508 B
C++
Raw Normal View History

#include "resources.hpp"
#include <components/vfs/manager.hpp>
2022-02-21 14:57:40 +00:00
#include <components/misc/stringops.hpp>
namespace LuaUi
{
std::shared_ptr<TextureResource> ResourceManager::registerTexture(TextureData data)
{
data.mPath = mVfs->normalizeFilename(data.mPath);
TextureResources& list = mTextures[data.mPath];
list.push_back(std::make_shared<TextureResource>(data));
return list.back();
}
2022-02-26 11:10:55 +00:00
void ResourceManager::clear()
{
mTextures.clear();
}
}