Add HUD scaling fix
This commit is contained in:
@@ -31,6 +31,7 @@ static GetGameInfosStruct GetGameInfos = nullptr;
|
||||
static bool fov_fix_enabled = false;
|
||||
static bool ultrawide_fix_enabled = false;
|
||||
static bool HUD_fix_enabled = false;
|
||||
static bool HUDHide_fix_enabled = false;
|
||||
static bool DOF_fix_enabled = false;
|
||||
static bool CA_fix_enabled = false;
|
||||
static bool Vignetting_fix_enabled = false;
|
||||
@@ -63,10 +64,11 @@ float scale = (float)screenHeight / 1200;
|
||||
// Prepare arrays of checkboxes for ImGui
|
||||
static FixToggle individualFixes[] = {
|
||||
{ "FOV", &fov_fix_enabled, GameFixes::FOV },
|
||||
{ "Ultrawide", &ultrawide_fix_enabled, GameFixes::UltraWide },
|
||||
{ "Vignetting", &Vignetting_fix_enabled, GameFixes::Vignetting },
|
||||
{ "Fog", &Fog_fix_enabled, GameFixes::Fog, "This fix will disable all fogs including volumetric fog."},
|
||||
{ "Ultrawide", &ultrawide_fix_enabled, GameFixes::UltraWide },
|
||||
{ "HUD scaling", &HUD_fix_enabled, GameFixes::HUD },
|
||||
{ "HUD hidding", &HUDHide_fix_enabled, GameFixes::HUDHide },
|
||||
{ "Depth of field", &DOF_fix_enabled, GameFixes::DOF },
|
||||
{ "Chromatic aberrations", &CA_fix_enabled, GameFixes::ChromaticAberrations }
|
||||
};
|
||||
@@ -109,6 +111,7 @@ static void LoadFixDLL() {
|
||||
SetFixes(GameFixes::FOV, fov_fix_enabled);
|
||||
SetFixes(GameFixes::UltraWide, ultrawide_fix_enabled);
|
||||
SetFixes(GameFixes::HUD, HUD_fix_enabled);
|
||||
SetFixes(GameFixes::HUDHide, HUDHide_fix_enabled);
|
||||
SetFixes(GameFixes::DOF, DOF_fix_enabled);
|
||||
SetFixes(GameFixes::ChromaticAberrations, CA_fix_enabled);
|
||||
SetFixes(GameFixes::Vignetting, Vignetting_fix_enabled);
|
||||
@@ -142,6 +145,7 @@ static void SaveSettings() {
|
||||
pluginIniFile["2#Individual fix"]["FOV"] = fov_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["UltraWide"] = ultrawide_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["HUD"] = HUD_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["HUD hide"] = HUDHide_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["DOF"] = DOF_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Chromatic aberrations"] = CA_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Vignetting"] = Vignetting_fix_enabled;
|
||||
@@ -167,6 +171,7 @@ static void LoadSettings() {
|
||||
fov_fix_enabled = pluginIniFile["2#Individual fix"]["FOV"].as<bool>();
|
||||
ultrawide_fix_enabled = pluginIniFile["2#Individual fix"]["UltraWide"].as<bool>();
|
||||
HUD_fix_enabled = pluginIniFile["2#Individual fix"]["HUD"].as<bool>();
|
||||
HUDHide_fix_enabled = pluginIniFile["2#Individual fix"]["HUD hide"].as<bool>();
|
||||
DOF_fix_enabled = pluginIniFile["2#Individual fix"]["DOF"].as<bool>();
|
||||
CA_fix_enabled = pluginIniFile["2#Individual fix"]["Chromatic aberrations"].as<bool>();
|
||||
Vignetting_fix_enabled = pluginIniFile["2#Individual fix"]["Vignetting"].as<bool>();
|
||||
@@ -250,10 +255,10 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime) {
|
||||
ImGui::TableNextRow();
|
||||
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
for (int i = 0; i < 3; ++i) DrawFixCheckbox(individualFixes[i]);
|
||||
for (int i = 0; i < 4; ++i) DrawFixCheckbox(individualFixes[i]);
|
||||
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
for (int i = 3; i < IM_ARRAYSIZE(individualFixes); ++i) DrawFixCheckbox(individualFixes[i]);
|
||||
for (int i = 4; i < IM_ARRAYSIZE(individualFixes); ++i) DrawFixCheckbox(individualFixes[i]);
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user