Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Features/PerformanceOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
28 changes: 28 additions & 0 deletions src/Features/SkySync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t>(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<int32_t>(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<uint8_t>(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.");
Expand All @@ -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();
}
}
Expand Down
Loading