Skip to content

feat(ui): add Sky Sync tooltips; fix overlay resizing#2045

Merged
alandtse merged 1 commit into
community-shaders:devfrom
soda3000:dev-01-04-2026-2
Apr 2, 2026
Merged

feat(ui): add Sky Sync tooltips; fix overlay resizing#2045
alandtse merged 1 commit into
community-shaders:devfrom
soda3000:dev-01-04-2026-2

Conversation

@soda3000
Copy link
Copy Markdown
Contributor

@soda3000 soda3000 commented Apr 1, 2026

Summary by CodeRabbit

  • New Features
    • Added hover tooltips to Sky Sync settings controls, including the Enabled checkbox, alternate sun path option, sun path and custom angle sliders, moon light source slider, and sun position offset sliders for enhanced user guidance.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

📝 Walkthrough

Walkthrough

This PR modifies UI overlay behavior in two files: it removes the ImGuiWindowFlags_AlwaysAutoResize flag from the performance overlay window configuration, and adds hover tooltip text wrapping to multiple sun and moon position controls in the SkySync settings UI.

Changes

Cohort / File(s) Summary
Performance Overlay
src/Features/PerformanceOverlay.cpp
Removed ImGuiWindowFlags_AlwaysAutoResize flag from the overlay window, leaving only ImGuiWindowFlags_NoDecoration as the base flag configuration.
SkySync Tooltips
src/Features/SkySync.cpp
Added Util::HoverTooltipWrapper() calls wrapping hover text for multiple UI controls: the "Enabled" checkbox, "Use alternate sun path" option, "Sun path" slider, "Custom angle" slider, "Moon light source" slider, and four "Sun Position Offsets" sliders (sunrise/sunset begin/end).

Possibly related PRs

Suggested reviewers

  • alandtse
  • davo0411

Poem

🐰 A tooltip here, a flag removed there,
The UI gets dressed with extra care!
Sun paths shine with helpful text,
No more guessing what comes next!
✨🌙☀️


Estimated code review effort: 🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the two main changes: adding tooltips to Sky Sync UI and fixing Performance Overlay resizing behavior.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

No actionable suggestions for changed features.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/Features/SkySync.cpp (1)

19-72: Consider consolidating repeated tooltip blocks with a local helper.

This section repeats the same HoverTooltipWrapper pattern many times; a tiny local helper would reduce copy/paste drift.

♻️ Optional cleanup example
 void SkySync::DrawSettings()
 {
+	auto drawTooltip = [](const char* text) {
+		if (auto _tt = Util::HoverTooltipWrapper())
+			ImGui::TextUnformatted(text);
+	};
+
 	ImGui::Checkbox("Enabled", &settings.Enabled);
-	if (auto _tt = Util::HoverTooltipWrapper()) {
-		ImGui::TextUnformatted("Enable or disable Sky Sync features.");
-	}
+	drawTooltip("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.");
-	}
+	drawTooltip("Calculate sun position based on time of day and season instead of vanilla movement.");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Features/SkySync.cpp` around lines 19 - 72, The UI code repeatedly calls
Util::HoverTooltipWrapper followed by ImGui::TextUnformatted/Text, so introduce
a small local helper (lambda or static inline function) inside the function that
renders this panel—e.g., a helper named ShowTooltip(const char* msg) that wraps
the pattern (if (auto _tt = Util::HoverTooltipWrapper())
ImGui::TextUnformatted(msg);) and then replace each direct
Util::HoverTooltipWrapper block (the occurrences around "Enable or disable Sky
Sync features.", "Calculate sun position...", "Choose the trajectory...", "Set a
custom angle...", "Select which moon...", and all sunrise/sunset tooltip
strings) with calls to ShowTooltip; keep special-case ImGui::Text calls by using
the same helper or adding an overload for formatted text if needed, and leave
SetSunAngle(), settings.* and ImGui widgets unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/Features/SkySync.cpp`:
- Around line 19-72: The UI code repeatedly calls Util::HoverTooltipWrapper
followed by ImGui::TextUnformatted/Text, so introduce a small local helper
(lambda or static inline function) inside the function that renders this
panel—e.g., a helper named ShowTooltip(const char* msg) that wraps the pattern
(if (auto _tt = Util::HoverTooltipWrapper()) ImGui::TextUnformatted(msg);) and
then replace each direct Util::HoverTooltipWrapper block (the occurrences around
"Enable or disable Sky Sync features.", "Calculate sun position...", "Choose the
trajectory...", "Set a custom angle...", "Select which moon...", and all
sunrise/sunset tooltip strings) with calls to ShowTooltip; keep special-case
ImGui::Text calls by using the same helper or adding an overload for formatted
text if needed, and leave SetSunAngle(), settings.* and ImGui widgets unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b1e98e07-1608-45d4-adcf-63d960ab9dd0

📥 Commits

Reviewing files that changed from the base of the PR and between d158508 and 2fe351f.

📒 Files selected for processing (2)
  • src/Features/PerformanceOverlay.cpp
  • src/Features/SkySync.cpp

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

✅ A pre-release build is available for this PR:
Download

@alandtse alandtse changed the title feat(ui): add Sky Sync tooltips and fix Performance Overlay resizing feat(ui): add Sky Sync tooltips Apr 2, 2026
@alandtse alandtse changed the title feat(ui): add Sky Sync tooltips feat(ui): add Sky Sync tooltips; fix overlay resizing Apr 2, 2026
Copy link
Copy Markdown
Collaborator

@alandtse alandtse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make atomic prs.

@alandtse alandtse merged commit 75b053d into community-shaders:dev Apr 2, 2026
21 checks passed
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 2, 2026
@coderabbitai coderabbitai Bot mentioned this pull request May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants