diff --git a/GolemHelper/Automation/CoordinateUtils.cpp b/GolemHelper/Automation/CoordinateUtils.cpp index c468ec4..a1184e7 100644 --- a/GolemHelper/Automation/CoordinateUtils.cpp +++ b/GolemHelper/Automation/CoordinateUtils.cpp @@ -56,6 +56,28 @@ void CoordinateUtils::GetScaledCoordinates(int baseX, int baseY, int* scaledX, i g_api->Log(ELogLevel_INFO, "GolemHelper", "ULTRAWIDE 3440x1440: APPLIED NORMAL UI OFFSET"); } } + else if (g_nexusLink->Width == 3840 && g_nexusLink->Height == 2160) { + if (uiScale >= 0.89f && uiScale <= 0.91f) { + dpiScaleX = 2.052f; + dpiScaleY = 0.908f; + g_api->Log(ELogLevel_INFO, "GolemHelper", "4K 3840x2160: APPLIED SMALL UI OFFSET"); + } + else if (uiScale >= 1.09f && uiScale <= 1.15f) { + dpiScaleX = 1.985f; + dpiScaleY = 1.130f; + g_api->Log(ELogLevel_INFO, "GolemHelper", "4K 3840x2160: APPLIED LARGE UI OFFSET"); + } + else if (uiScale >= 1.21f && uiScale <= 1.25f) { + dpiScaleX = 1.952f; + dpiScaleY = 1.233f; + g_api->Log(ELogLevel_INFO, "GolemHelper", "4K 3840x2160: APPLIED LARGER UI OFFSET"); + } + else { + dpiScaleX = 2.0f; + dpiScaleY = 1.0f; + g_api->Log(ELogLevel_INFO, "GolemHelper", "4K 3840x2160: APPLIED NORMAL UI OFFSET"); + } + } else { dpiScaleX = (float)g_nexusLink->Width / 1920.0f; dpiScaleY = 1.0f; @@ -73,7 +95,8 @@ void CoordinateUtils::GetScaledCoordinates(int baseX, int baseY, int* scaledX, i int finalY = scaledForResolutionY; if (!(g_nexusLink->Width == 5120 && g_nexusLink->Height == 1440) && - !(g_nexusLink->Width == 3440 && g_nexusLink->Height == 1440)) { + !(g_nexusLink->Width == 3440 && g_nexusLink->Height == 1440) && + !(g_nexusLink->Width == 3840 && g_nexusLink->Height == 2160)) { 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 1a461d9..a75f73e 100644 --- a/GolemHelper/GolemHelper.cpp +++ b/GolemHelper/GolemHelper.cpp @@ -35,7 +35,7 @@ void Load(AddonAPI* aApi) { MapUtils::UpdateQuickAccessVisibility(); - g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.5.2.0 Loaded ==="); + g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.5.3.0 Loaded ==="); g_api->Log(ELogLevel_INFO, "GolemHelper", "GolemHelper addon loaded successfully!"); } @@ -62,7 +62,7 @@ extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() { def.Signature = -424248; def.APIVersion = NEXUS_API_VERSION; def.Name = "GolemHelper"; - def.Version = { 1, 5, 2, 0 }; + def.Version = { 1, 5, 3, 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 0f21545..034097b 100644 --- a/GolemHelper/UI/UIManager.cpp +++ b/GolemHelper/UI/UIManager.cpp @@ -17,7 +17,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.5.2.0"); + ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.5.3.0"); ImGui::Separator(); if (ImGui::BeginTabBar("GolemHelperTabs", ImGuiTabBarFlags_None)) {