11 #include <unordered_map> 13 #include <SFML/Graphics/Font.hpp> 14 #include <SFML/Graphics/Texture.hpp> 20 Dir(std::string name,
Dir* parent);
22 void load(
const std::string& path,
bool autoload);
23 auto in(
const std::string& dir_name) ->
Dir&;
24 auto getName() ->
const std::string&;
25 auto getPath() -> std::string;
26 auto getTexture(
const std::string& texture_name) -> sf::Texture&;
27 auto getFont(
const std::string& font_name) -> sf::Font&;
28 void printTree(
int indent=0);
31 static const std::set<std::string> texture_extensions;
32 static const std::set<std::string> fonts_extensions;
36 std::unordered_map<std::string, std::unique_ptr<Dir>> m_dirs;
37 std::unordered_map<std::string, std::unique_ptr<sf::Texture>> m_textures;
38 std::unordered_map<std::string, std::unique_ptr<sf::Font>> m_fonts;