From 2fe351ff17a424dd8bbdbc4ce0a0ce58db766fda Mon Sep 17 00:00:00 2001 From: soda3000 Date: Wed, 1 Apr 2026 13:05:33 -0300 Subject: [PATCH] feat(ui): add Sky Sync tooltips and fix Performance Overlay resizing --- src/Features/PerformanceOverlay.cpp | 2 +- src/Features/SkySync.cpp | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/Features/PerformanceOverlay.cpp b/src/Features/PerformanceOverlay.cpp index d605050495..887efe68fb 100644 --- a/src/Features/PerformanceOverlay.cpp +++ b/src/Features/PerformanceOverlay.cpp @@ -288,7 +288,7 @@ void PerformanceOverlay::DrawOverlay() allRows.insert(allRows.end(), summaryRows.begin(), summaryRows.end()); // Set window flags - no decoration and only movable when ShowBorder is true - ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_AlwaysAutoResize; + ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoDecoration; // Only allow mouse interaction when the main menu is open if (!menu->IsEnabled) { diff --git a/src/Features/SkySync.cpp b/src/Features/SkySync.cpp index 863987f766..76d7b149d8 100644 --- a/src/Features/SkySync.cpp +++ b/src/Features/SkySync.cpp @@ -16,20 +16,36 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT( void SkySync::DrawSettings() { ImGui::Checkbox("Enabled", &settings.Enabled); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Enable or disable Sky Sync features."); + } ImGui::Checkbox("Use alternate sun path", &settings.UseAlternateSunPath); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Calculate sun position based on time of day and season instead of vanilla movement."); + } if (settings.UseAlternateSunPath) { if (ImGui::SliderInt("Sun path", &settings.SunPath, 0, static_cast(SunPath::Count) - 1, SunPathNames[settings.SunPath], ImGuiSliderFlags_AlwaysClamp)) SetSunAngle(); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Choose the trajectory the sun takes across the sky."); + } if (settings.SunPath == static_cast(SunPath::Custom)) { if (ImGui::SliderFloat("Custom angle", &settings.CustomAngle, -90.0f, 90.0f, "%.0f", ImGuiSliderFlags_AlwaysClamp)) SetSunAngle(); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Set a custom angle for the sun's trajectory."); + } } } ImGui::SliderInt("Moon light source", &settings.MoonLightSource, 0, static_cast(MoonLightSource::Count) - 1, MoonLightSourceNames[settings.MoonLightSource], ImGuiSliderFlags_AlwaysClamp); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Select which moon casts shadows during the night."); + } + ImGui::SliderFloat("Min Shadow Elevation", &settings.MinShadowElevation, 0.0f, 45.0f, "%.1f deg", ImGuiSliderFlags_AlwaysClamp); if (auto _tt = Util::HoverTooltipWrapper()) { ImGui::Text("The minimum angle sunlight will set to. Caps shadow length. Higher = shorter shadows at sunset/sunrise."); @@ -39,9 +55,21 @@ void SkySync::DrawSettings() if (ImGui::TreeNodeEx("Sun Position Offsets", ImGuiTreeNodeFlags_DefaultOpen)) { ImGui::TextWrapped("Moves sun height during sunrise/sunset. Reset weather to see changes."); ImGui::SliderFloat("Sunrise Begin (Hours)", &settings.SunriseBeginOffset, -5.0f, 5.0f, "%.1f", ImGuiSliderFlags_AlwaysClamp); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Offset for when the sun starts rising."); + } ImGui::SliderFloat("Sunrise End (Hours)", &settings.SunriseEndOffset, -5.0f, 5.0f, "%.1f", ImGuiSliderFlags_AlwaysClamp); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Offset for when the sun finishes rising."); + } ImGui::SliderFloat("Sunset Begin (Hours)", &settings.SunsetBeginOffset, -5.0f, 5.0f, "%.1f", ImGuiSliderFlags_AlwaysClamp); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Offset for when the sun starts setting."); + } ImGui::SliderFloat("Sunset End (Hours)", &settings.SunsetEndOffset, -5.0f, 5.0f, "%.1f", ImGuiSliderFlags_AlwaysClamp); + if (auto _tt = Util::HoverTooltipWrapper()) { + ImGui::TextUnformatted("Offset for when the sun finishes setting."); + } ImGui::TreePop(); } }