Big refactor, shuffling a lot of files around

This commit is contained in:
2025-11-01 19:51:19 -04:00
parent 99b7d9f49d
commit 62cd94ca78
125 changed files with 4073 additions and 3011 deletions
+33
View File
@@ -0,0 +1,33 @@
#include "font.h"
namespace anm2ed::resource
{
Font::Font() = default;
Font::Font(void* data, size_t length, int size)
{
ImFontConfig config;
config.FontDataOwnedByAtlas = false;
pointer = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(data, length, size, &config);
}
Font::~Font()
{
if (get()) ImGui::GetIO().Fonts->RemoveFont(pointer);
}
ImFont* Font::get()
{
return pointer;
}
Font& Font::operator=(Font&& other) noexcept
{
if (this != &other)
{
pointer = other.pointer;
other.pointer = nullptr;
}
return *this;
}
}