Minesweeper / src / TextureManager.h
TextureManager.h
Raw
//
// Created by Priyal Patel on 11/21/21.
//
#include <SFML/Graphics.hpp>
#include <unordered_map>
#include <string>
using std::unordered_map;
using std::string;
using namespace std;

#ifndef MINESWEEPER_TEXTUREMANAGER_H
#define MINESWEEPER_TEXTUREMANAGER_H


class TextureManager {
   static unordered_map<string,sf::Texture>textures;
public:
    static void LoadTexture(string textureName);
    static sf::Texture& GetTexture(string textureName);
    static void Clear(); //call this once at end of main
};


#endif //MINESWEEPER_TEXTUREMANAGER_H