diff --git a/R3nzSkin/GUI.cpp b/R3nzSkin/GUI.cpp index 8f2d82f8..a378440f 100644 --- a/R3nzSkin/GUI.cpp +++ b/R3nzSkin/GUI.cpp @@ -46,6 +46,11 @@ static void changeTurretSkin(const std::int32_t skinId, const std::int32_t team) void GUI::render() noexcept { + std::call_once(set_font_scale, [&] + { + ImGui::GetIO().FontGlobalScale = cheatManager.config->fontScale; + }); + const auto player{ cheatManager.memory->localPlayer }; const auto heroes{ cheatManager.memory->heroList }; static const auto my_team{ player ? player->get_team() : 100 }; diff --git a/R3nzSkin/GUI.hpp b/R3nzSkin/GUI.hpp index 5f6a6fed..030649ef 100644 --- a/R3nzSkin/GUI.hpp +++ b/R3nzSkin/GUI.hpp @@ -5,6 +5,7 @@ class GUI { void render() noexcept; bool is_open{ true }; + std::once_flag set_font_scale; private: char str_buffer[256]; };