From cb55f10a89f26d74f639dc7a237c164adb97484b Mon Sep 17 00:00:00 2001 From: hotline1337 Date: Thu, 2 Nov 2023 00:50:53 +0100 Subject: [PATCH] Font Scale Improvements --- R3nzSkin/GUI.cpp | 5 +++++ R3nzSkin/GUI.hpp | 1 + 2 files changed, 6 insertions(+) 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]; };