Skip to content

refactor(utils): extract DrawResetButton helper in settings#543

Open
xq-r wants to merge 1 commit intoclshortfuse:mainfrom
xq-r:refactor/draw-reset-button
Open

refactor(utils): extract DrawResetButton helper in settings#543
xq-r wants to merge 1 commit intoclshortfuse:mainfrom
xq-r:refactor/draw-reset-button

Conversation

@xq-r
Copy link
Copy Markdown
Contributor

@xq-r xq-r commented Apr 11, 2026

Allowing access to this is useful for visual consistency with custom settings.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the settings UI overlay to extract the “reset to default” ImGui button drawing logic into a reusable helper for consistent styling across standard and custom settings.

Changes:

  • Added a DrawResetButton(Setting* setting, const char* id = nullptr) helper to encapsulate the reset button rendering and behavior.
  • Replaced the inline reset-button drawing block in OnRegisterOverlay with a call to the new helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants