From f3f326266c63147e53fd1d4f546f073d5e59df5e Mon Sep 17 00:00:00 2001 From: Azrub Date: Sun, 20 Jul 2025 16:34:58 +0200 Subject: [PATCH] Release v1.2.5.0 Added support for 3440x1440 monitor --- GolemHelper/Automation/CoordinateUtils.cpp | 26 +++++++++++++++++++++- GolemHelper/GolemHelper.cpp | 4 ++-- GolemHelper/UI/UIManager.cpp | 2 +- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/GolemHelper/Automation/CoordinateUtils.cpp b/GolemHelper/Automation/CoordinateUtils.cpp index 90f88ac..a6b066d 100644 --- a/GolemHelper/Automation/CoordinateUtils.cpp +++ b/GolemHelper/Automation/CoordinateUtils.cpp @@ -35,6 +35,29 @@ void CoordinateUtils::GetScaledCoordinates(int baseX, int baseY, int* scaledX, i g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 5120x1440: APPLIED NORMAL UI OFFSET"); } } + // Ultrawide 3440x1440 + else if (g_nexusLink->Width == 3440 && g_nexusLink->Height == 1440) { + if (uiScale >= 0.89f && uiScale <= 0.91f) { + dpiScaleX = 1.810f; + dpiScaleY = 0.892f; + g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED SMALL UI OFFSET"); + } + else if (uiScale >= 1.09f && uiScale <= 1.15f) { + dpiScaleX = 1.741f; + dpiScaleY = 1.104f; + g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED LARGE UI OFFSET"); + } + else if (uiScale >= 1.21f && uiScale <= 1.25f) { + dpiScaleX = 1.708f; + dpiScaleY = 1.212f; + g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED LARGER UI OFFSET"); + } + else { + dpiScaleX = 1.773f; + dpiScaleY = 0.992f; + g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED NORMAL UI OFFSET"); + } + } else { dpiScaleX = (float)g_nexusLink->Width / 1920.0f; dpiScaleY = 1.0f; @@ -56,7 +79,8 @@ void CoordinateUtils::GetScaledCoordinates(int baseX, int baseY, int* scaledX, i int finalX = scaledForResolutionX; int finalY = scaledForResolutionY; - if (!(g_nexusLink->Width == 5120 && g_nexusLink->Height == 1440)) { + if (!(g_nexusLink->Width == 5120 && g_nexusLink->Height == 1440) && + !(g_nexusLink->Width == 3440 && g_nexusLink->Height == 1440)) { if (uiScale >= 0.89f && uiScale <= 0.91f) { finalX = scaledForResolutionX - (int)(scaledForResolutionX * 0.029f); finalY = scaledForResolutionY - (int)(scaledForResolutionY * 0.103f); diff --git a/GolemHelper/GolemHelper.cpp b/GolemHelper/GolemHelper.cpp index fc8773b..4086636 100644 --- a/GolemHelper/GolemHelper.cpp +++ b/GolemHelper/GolemHelper.cpp @@ -36,7 +36,7 @@ void Load(AddonAPI* aApi) { "Toggle GolemHelper UI" ); - g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.2.4.0 Loaded ==="); + g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.2.5.0 Loaded ==="); g_api->Log(ELogLevel_INFO, "GolemHelper", "GolemHelper addon loaded successfully!"); } @@ -59,7 +59,7 @@ extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() { def.Signature = -424248; def.APIVersion = NEXUS_API_VERSION; def.Name = "GolemHelper"; - def.Version = { 1, 2, 4, 0 }; + def.Version = { 1, 2, 5, 0 }; def.Author = "Azrub"; def.Description = "Automates the process of setting optimal boon and golem configurations in the training area"; def.Load = Load; diff --git a/GolemHelper/UI/UIManager.cpp b/GolemHelper/UI/UIManager.cpp index 5c39c5e..a078ed4 100644 --- a/GolemHelper/UI/UIManager.cpp +++ b/GolemHelper/UI/UIManager.cpp @@ -13,7 +13,7 @@ void UIManager::RenderUI() { if (ImGui::Begin("GolemHelper", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.2.4.0"); + ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.2.5.0"); ImGui::Separator(); ImGui::Text("Status:");