feat(renderer): added dynamic font loading based on lang requirements (#2738)

Related YimMenu/Translations#117
Closes #2723

Changes made:
 - Renderer class was changed to a static instance
 - Some throw code was removed because of change of instantiation of the renderer
 - Fonts are dynamically loaded based on the language requirements
 - renderer files have been moved to make the root directory less messy
 - Added a font mgr to improve the ease of adding more language support
This commit is contained in:
Andreas Maerten
2024-02-21 21:26:29 +01:00
committed by GitHub
parent cde5563204
commit 183b0eee44
18 changed files with 426 additions and 296 deletions

View File

@ -1,5 +1,5 @@
#include "gui.hpp"
#include "renderer.hpp"
#include "renderer/renderer.hpp"
#include "views/view.hpp"
namespace big
@ -8,7 +8,7 @@ namespace big
{
components::sub_title("SETTINGS_UI_SCALE"_T);
if (ImGui::SliderFloat("##gui-scale", &g.window.gui_scale, 0.75f, 1.5f, "%.2f"))
g_renderer->rescale(g.window.gui_scale);
g_renderer.rescale(g.window.gui_scale);
components::sub_title("SETTINGS_UI_COLOR"_T);
static ImVec4 col_gui = ImGui::ColorConvertU32ToFloat4(g.window.background_color);
@ -86,4 +86,4 @@ namespace big
}
}
}
}