refactor(ui): colored text helpers#2292
Conversation
📝 WalkthroughWalkthroughThis PR introduces a new ChangesText Rendering Helper Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
No actionable suggestions for changed features. |
|
✅ A pre-release build is available for this PR: |
Address style/convention feedback from community-shaders#2092 review: - Use globals::game::isVR instead of REL::Module::IsVR() for runtime checks; move IsInMenu() out-of-line so it can use the global. - Replace raw ImGui::TextColored gray text with Util::Text::Disabled (helpers added in community-shaders#2292). - Replace try/catch on std::filesystem::create_directories with Util::FileHelpers::EnsureDirectoryExists. - Wrap the magic kTOTAL render-target index in a named constant (kVRSideBySideTarget) with a comment explaining it's the post- composite SBS target only valid in VR — kTOTAL on its own reads as "count of standard targets" and is misleading at the call site. No behavior change.
Address style/convention feedback from community-shaders#2092 review: - Use globals::game::isVR instead of REL::Module::IsVR() for runtime checks; move IsInMenu() out-of-line so it can use the global. - Replace raw ImGui::TextColored gray text with Util::Text::Disabled (helpers added in community-shaders#2292). - Replace try/catch on std::filesystem::create_directories with Util::FileHelpers::EnsureDirectoryExists. - Wrap the magic kTOTAL render-target index in a named constant (kVRSideBySideTarget) with a comment explaining it's the post- composite SBS target only valid in VR — kTOTAL on its own reads as "count of standard targets" and is misleading at the call site. No behavior change.
Branch-preserving adaptation: add shared theme-colored text helpers and apply them to current Upscaling and shader-blocking UI sites while skipping HDRDisplay.
Branch-preserving adaptation: add shared theme-colored text helpers and apply them to current Upscaling and shader-blocking UI sites while skipping HDRDisplay.
added new namespace: Util::Text for colored text and replaced all usages of this text.
Summary by CodeRabbit
Refactor
Style