1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/components/lua_ui/resources.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
467 B
C++
Raw Normal View History

#include "resources.hpp"
2023-05-31 21:11:03 +00:00
#include <components/vfs/pathutil.hpp>
namespace LuaUi
{
std::shared_ptr<TextureResource> ResourceManager::registerTexture(TextureData data)
{
2023-05-31 21:11:03 +00:00
VFS::Path::normalizeFilenameInPlace(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();
}
}