Enigma 3.2.2
A Simple, Reliable and Efficient Encryption Tool
Loading...
Searching...
No Matches
ResourceManager.hpp
Go to the documentation of this file.
1#pragma once
2#include <Core/Macros.hpp>
3#include <filesystem>
4#include <imgui.h>
5#include <unordered_map>
6#include <string_view>
7namespace fs = std::filesystem;
8
9namespace Enigma {
10
11 class Application;
12
13 class ResourceManager final {
15
16 public:
17 static void initialize();
18 static void shutdown();
19
20 static fs::path getAppDataDir();
21
22 static fs::path getDatabaseFilepath();
23 static fs::path getLogsDir();
24 //static fs::path getConfigDir();
25
28 static fs::path getResourcesDir();
29#if 0
32 static fs::path getResourcesDir();
33
36 static fs::path getInstallBaseDir();
37#endif
39 static ImFont*& getFont(std::string_view name);
40
41 private:
42 static void loadFonts();
43
44 private:
45 inline static std::unordered_map<std::string_view, ImFont *> m_fonts{};
46 };
47}
#define ENIGMA_STATIC_CLASS(Class)
Makes a class static, which will prevent creating instances from it and only use it as Class::Func()....
Definition Macros.hpp:120
static fs::path getAppDataDir()
static void shutdown()
static fs::path getLogsDir()
static void initialize()
static fs::path getResourcesDir()
Returns path to res/ folder Example: /home//Enigma/res/.
static fs::path getDatabaseFilepath()
static ImFont *& getFont(std::string_view name)
Returns ImFont by name.