Skip to content

chore: edit welcome dialogue behavior#1743

Merged
davo0411 merged 7 commits into
community-shaders:devfrom
Dlizzio:edited-welcome-dialogue
Jan 25, 2026
Merged

chore: edit welcome dialogue behavior#1743
davo0411 merged 7 commits into
community-shaders:devfrom
Dlizzio:edited-welcome-dialogue

Conversation

@Dlizzio
Copy link
Copy Markdown
Contributor

@Dlizzio Dlizzio commented Jan 22, 2026

Edited behavior of welcome dialogue to be more user friendly and intuitive.

Skyrim Special Edition 1_22_2026 1_54_26 AM

Summary by CodeRabbit

  • Bug Fixes

    • Keyboard toggle no longer activates while the first-time setup dialog is visible.
  • New Features

    • Click-to-capture hotkey flow with enlarged, bracketed key display and pulsing capture state; prevents re-entry while capturing.
  • Style

    • Semi-transparent modal backdrop, improved centered text layout (including two-line version), refined hover/capture color feedback, and a breathing animation for help text.

✏️ Tip: You can customize this high-level summary in your review settings.

Edits behavior of welcome dialogue box to be more user friendly and direct.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

ToggleKey no longer toggles Menu::IsEnabled while HomePageRenderer::ShouldShowFirstTimeSetup() is true. The first-time setup UI was redesigned with a modal background, centralized centering helpers, a bracketed hotkey capture flow with pulsing/scale, and breathing help text; new UI util helpers were added.

Changes

Cohort / File(s) Summary
Menu Input Guard
src/Menu.cpp
ToggleKey now only toggles IsEnabled when HomePageRenderer::ShouldShowFirstTimeSetup() is false (prevents toggling during first-time setup).
First-Time Setup Dialog UI Overhaul
src/Menu/HomePageRenderer.cpp, src/Menu/HomePageRenderer.h
Adds modal overlay, centralized text-centering helpers, two-line centered version text, bracketed hotkey display with capture-state scaling/color/pulse, invisible hotkey hit target and capture flow, Enter/Escape guarded by capture state, breathing help text, and replaces HOTKEY_TEXT_SCALE_MULTIPLIER with HOTKEY_TEXT_SCALE, HOTKEY_TEXT_SCALE_CAPTURING, HOTKEY_HOVER_DIM_FACTOR, and HELP_TEXT_SCALE.
UI Utilities
src/Utils/UI.h, src/Utils/UI.cpp
New Util::DrawModalBackground, Util::DrawBreathingText, and Util::GetPulsingColor added and used by HomePageRenderer to render overlay, breathing text, and pulsing colors.

Sequence Diagram(s)

sequenceDiagram
participant User
participant UI as HomePageRenderer
participant Input as InputSystem
participant Menu
User->>UI: Click hotkey area
UI->>UI: If not capturing -> enter capture mode (isCapturing = true)
UI->>Input: Start capturing next key
Note right of Input: Wait for key event
Input-->>UI: Deliver captured key
UI->>UI: Update hotkey, exit capture mode
UI-->>User: Render updated hotkey (brackets, scaled/pulsing)
Loading
sequenceDiagram
participant Keyboard
participant Menu
participant Home as HomePageRenderer
Keyboard->>Menu: ToggleKey pressed
Menu->>Home: ShouldShowFirstTimeSetup()?
alt First-time setup shown
    Home-->>Menu: true
    Menu-->>Keyboard: Ignore toggle (no IsEnabled change)
else Not shown
    Home-->>Menu: false
    Menu->>Menu: Toggle IsEnabled
    Menu-->>Keyboard: Acknowledge
end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • davo0411
  • alandtse
  • doodlum

Poem

🐰
I hopped and drew a softer shade,
A modal hush where choices laid.
Brackets blink and keys take flight,
I pulse and breathe through setup night.
Hop press — the ribbon feels just right.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes the main change (improving welcome dialogue behavior) but uses vague phrasing ('edit') that doesn't convey specific improvements beyond basic description of the work type.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.
@Dlizzio Dlizzio changed the title Edited welcome dialogue chore: edited welcome dialogue behavior Jan 22, 2026
@github-actions
Copy link
Copy Markdown

Using provided base ref: 44eb788
Using base ref: 44eb788
Base commit date: 2026-01-19T23:55:15Z (Monday, January 19, 2026 11:55 PM)
No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 22, 2026

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

Comment thread src/Menu/HomePageRenderer.cpp Outdated
Comment thread src/Menu/HomePageRenderer.cpp Outdated
Comment thread src/Menu/HomePageRenderer.cpp
Comment thread src/Menu/HomePageRenderer.cpp Outdated
Comment thread src/Menu/HomePageRenderer.cpp Outdated
Comment thread src/Menu/HomePageRenderer.cpp
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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/Utils/UI.cpp`:
- Around line 648-655: In DrawBreathingText the sinf result is used directly
causing values to map from [-1,1] and produce alpha below minAlpha; change the
mapping so sinf is remapped to [0,1] before scaling into [minAlpha,maxAlpha]
(e.g., use (sinf(...) + 1.0f) * 0.5f), compute breathe = minAlpha + alphaRange *
mappedSin, and optionally clamp the result; update the breathe calculation in
DrawBreathingText accordingly.
🧹 Nitpick comments (2)
src/Menu/HomePageRenderer.cpp (2)

371-388: Consider extracting pulse animation constants.

The pulse effect on lines 375-380 contains magic numbers 0.7f, 0.3f, and 4.0f. For consistency with the newly added constants (HOTKEY_HOVER_DIM_FACTOR, etc.) and ease of maintenance, consider extracting these.

Note: The formula 0.7f + 0.3f * sinf(...) produces a range of [0.4, 1.0] (same pattern as the DrawBreathingText bug). If the intent is [0.7, 1.0], apply the same fix.

♻️ Suggested constants and fixed formula

Add to HomePageRenderer.h:

static constexpr float HOTKEY_PULSE_SPEED = 4.0f;
static constexpr float HOTKEY_PULSE_MIN = 0.7f;
static constexpr float HOTKEY_PULSE_MAX = 1.0f;

Then in the implementation:

-    float pulse = 0.7f + 0.3f * sinf((float)ImGui::GetTime() * 4.0f);
+    float pulseRange = HOTKEY_PULSE_MAX - HOTKEY_PULSE_MIN;
+    float pulse = HOTKEY_PULSE_MIN + pulseRange * 0.5f * (1.0f + sinf((float)ImGui::GetTime() * HOTKEY_PULSE_SPEED));

330-338: Minor: consider extracting spacing constant.

Line 336 uses -4.0f for reducing spacing between the two text lines. While functional, extracting this to a named constant (e.g., VERSION_LINE_SPACING_OFFSET) would improve clarity about the intent.

Comment thread src/Utils/UI.cpp
@alandtse alandtse changed the title chore: edited welcome dialogue behavior chore: edit welcome dialogue behavior Jan 23, 2026
@alandtse
Copy link
Copy Markdown
Collaborator

Imperative voice for the commit message please.

@Dlizzio Dlizzio requested a review from davo0411 January 23, 2026 19:37
@davo0411 davo0411 merged commit 34a83ab into community-shaders:dev Jan 25, 2026
16 checks passed
@Dlizzio Dlizzio deleted the edited-welcome-dialogue branch March 27, 2026 14:10
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.

4 participants