22 lines
400 B
C++
22 lines
400 B
C++
|
#pragma once
|
||
|
|
||
|
#include <filesystem>
|
||
|
#include <string>
|
||
|
#include <unordered_map>
|
||
|
|
||
|
#include <SFML/Graphics.hpp>
|
||
|
|
||
|
namespace fs = std::filesystem;
|
||
|
|
||
|
class TextureManager {
|
||
|
fs::path skinDirectory;
|
||
|
|
||
|
std::unordered_map<std::string, sf::Texture> textureCache;
|
||
|
|
||
|
public:
|
||
|
TextureManager() = delete;
|
||
|
TextureManager(fs::path skinDirectory);
|
||
|
|
||
|
sf::Texture &getTexture(std::string textureName);
|
||
|
};
|