diff --git a/TemplePlus/config/config.cpp b/TemplePlus/config/config.cpp index 1fffbbdc0..251934673 100644 --- a/TemplePlus/config/config.cpp +++ b/TemplePlus/config/config.cpp @@ -140,6 +140,7 @@ static ConfigSetting configSettings[] = { CONF_STRING(defaultModule), CONF_INT(windowWidth), CONF_INT(windowHeight), + CONF_DOUBLE(dmGuiScale), CONF_BOOL(enlargeDialogFonts), CONF_BOOL(windowedLockCursor), CONF_BOOL(dungeonMaster), diff --git a/TemplePlus/config/config.h b/TemplePlus/config/config.h index 9843db929..1d2736adf 100644 --- a/TemplePlus/config/config.h +++ b/TemplePlus/config/config.h @@ -54,6 +54,7 @@ struct TemplePlusConfig bool debugClipping = false; bool drawObjCylinders = false; bool newAnimSystem = false; + float dmGuiScale = 1.0f; bool autoUpdate = true; std::string autoUpdateFeed = "https://templeplus.org/update-feeds/stable/"; diff --git a/TemplePlus/dungeon_master.cpp b/TemplePlus/dungeon_master.cpp index 566f6979b..b7d117f75 100644 --- a/TemplePlus/dungeon_master.cpp +++ b/TemplePlus/dungeon_master.cpp @@ -120,6 +120,7 @@ void DungeonMaster::Render() { } auto wndPos = ImGui::GetWindowPos(); auto wndWidth = ImGui::GetWindowWidth(); + ImGui::SetWindowFontScale(config.dmGuiScale); dmPortraitRect.x = (int)(wndPos.x + wndWidth / 2 - dmPortraitRect.width / 2); dmPortraitRect.y = (int)(wndPos.y - dmPortraitRect.height); auto blyat = gameView->MapToScene(dmPortraitRect.x, dmPortraitRect.y);//gameView->MapFromScene(config.renderWidth - dmPortraitRect.x , config.renderHeight - -dmPortraitRect.y); diff --git a/TemplePlus/tig/tig_console.cpp b/TemplePlus/tig/tig_console.cpp index d17074c40..db981ce56 100644 --- a/TemplePlus/tig/tig_console.cpp +++ b/TemplePlus/tig/tig_console.cpp @@ -51,10 +51,12 @@ void Console::Render() ImGui::End(); return; } + ImGui::SetWindowFontScale(config.dmGuiScale); RenderCheatsMenu(); ImGui::BeginChild("ScrollingRegion", ImVec2(0, -ImGui::GetItemsLineHeightWithSpacing()), false, ImGuiWindowFlags_HorizontalScrollbar); + ImGui::SetWindowFontScale(config.dmGuiScale); if (ImGui::BeginPopupContextWindow()) { if (ImGui::Selectable("Clear")) Clear(); @@ -251,6 +253,7 @@ void Console::RenderCheatsMenu() { if (ImGui::BeginMenu("Cheats")) { + ImGui::SetWindowFontScale(config.dmGuiScale); if (ImGui::MenuItem("Level Up")) { for (auto i = 0u; i < party.GroupListGetLen(); i++) { auto handle = party.GroupListGetMemberN(i); @@ -391,6 +394,7 @@ void Console::RenderCheatsMenu() } if (ImGui::BeginMenu("Speedup")){ + ImGui::SetWindowFontScale(config.dmGuiScale); auto speedupCb = [](int speedupVal) { auto N_party = party.GroupListGetLen(); auto speedRun = 1.0f; @@ -433,6 +437,7 @@ void Console::RenderCheatsMenu() ImGui::EndMenu(); } if (ImGui::BeginMenu("Debug")) { + ImGui::SetWindowFontScale(config.dmGuiScale); if (ImGui::MenuItem("Debug Console")) { UIShowDebug(); } @@ -458,6 +463,7 @@ void Console::RenderCheatsMenu() ImGui::EndMenu(); } if (ImGui::BeginMenu("Edit")){ + ImGui::SetWindowFontScale(config.dmGuiScale); static char dialogHandleInput[256] = { 0, }; static std::string dialogFilename;