Added memory FS and put the default font there so it is easier to load it.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <imgui.h>
|
||||
#include <mijin/async/coroutine.hpp>
|
||||
#include <mijin/util/bitflags.hpp>
|
||||
#include <mijin/virtual_filesystem/memory.hpp>
|
||||
#include <mijin/virtual_filesystem/stacked.hpp>
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
@@ -21,6 +22,7 @@ inline constexpr ImGuiWindowFlags DEFAULT_MAIN_WINDOW_FLAGS = 0
|
||||
| ImGuiWindowFlags_NoDecoration
|
||||
| ImGuiWindowFlags_NoBringToFrontOnFocus
|
||||
| ImGuiWindowFlags_NoNav;
|
||||
inline constexpr const char* DEFAULT_FONT_PATH = "/data/fonts/NotoSans-Regular.ttf";
|
||||
|
||||
enum class MessageSeverity : unsigned char
|
||||
{
|
||||
@@ -55,6 +57,7 @@ private:
|
||||
SDL_GLContext mGLContext = nullptr;
|
||||
|
||||
mijin::StackedFileSystemAdapter mFS;
|
||||
mijin::MemoryFileSystemAdapter* mMemoryFS = nullptr;
|
||||
mijin::SimpleTaskLoop mTaskLoop;
|
||||
std::unordered_map<fs::path, ImTextureID> mTextures;
|
||||
|
||||
@@ -91,6 +94,13 @@ public:
|
||||
[[nodiscard]]
|
||||
mijin::StackedFileSystemAdapter& getFS() { return mFS; }
|
||||
|
||||
[[nodiscard]]
|
||||
mijin::MemoryFileSystemAdapter& getMemoryFS()
|
||||
{
|
||||
MIJIN_ASSERT_FATAL(mMemoryFS != nullptr, "Memory FS has not been initialized yet.");
|
||||
return *mMemoryFS;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
mijin::SimpleTaskLoop& getLoop() { return mTaskLoop; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user