Skip to content

feat: add configurable trigger button via sButton INI setting#11

Merged
codepuncher merged 1 commit into
mainfrom
feat/configurable-button
May 17, 2026
Merged

feat: add configurable trigger button via sButton INI setting#11
codepuncher merged 1 commit into
mainfrom
feat/configurable-button

Conversation

@codepuncher
Copy link
Copy Markdown
Owner

@codepuncher codepuncher commented May 17, 2026

Summary

Adds a configurable sButton INI option so users can choose which gamepad button triggers the hold-to-open-map behaviour. Requested by Nuascura on NexusMods.

Changes

  • QuickMap.ini — new sButton=Start setting with inline documentation
  • src/Plugin.cppReadButton() function parses the INI value to a BSWin32GamepadDevice::Key code; warns and falls back to Start on unknown values
  • src/InputHandler.h/cppbuttonKeyCode/buttonName private members replace the hardcoded kStart; ProcessStartButtonProcessButton; UpdateShortPressUserEventUpdateShortPressBinding
  • README.md / docs/nexus-page.mdsButton documented in the Configuration section

Supported values

Start, Back (case-insensitive)

Both buttons safely preserve the short press (Journal Menu and Quick Inventory respectively).

Testing

  • Tested in-game with sButton=Start (default) and sButton=Back
  • Short press and long hold both work correctly for both buttons

Copilot AI review requested due to automatic review settings May 17, 2026 15:44
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

Adds an INI-configurable gamepad trigger button (sButton) for QuickMap’s hold-to-open-map behavior, replacing the previously hardcoded Start-button trigger and updating docs/config templates accordingly.

Changes:

  • Added sButton parsing in src/Plugin.cpp and plumbed the chosen key/name into the input handler.
  • Refactored InputHandler to use a configurable buttonKeyCode/buttonName and renamed related methods.
  • Documented sButton in QuickMap.ini, README.md, and docs/nexus-page.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Plugin.cpp Adds ReadButton() and wires configured button into InputHandler; updates short-press binding refresh calls.
src/InputHandler.h Introduces configurable default button constant and new SetButton; renames APIs around “Start”.
src/InputHandler.cpp Implements SetButton, switches logic to use configured key code/name, and updates logging.
README.md Documents the new sButton option in the configuration snippet.
QuickMap.ini Adds the new sButton setting with inline documentation.
docs/nexus-page.md Documents sButton in the Nexus page configuration section and updates compatibility wording.

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

Comment thread src/Plugin.cpp Outdated
Comment thread src/Plugin.cpp Outdated
Comment thread src/Plugin.cpp
Comment thread src/Plugin.cpp Outdated
Comment thread README.md
Comment thread docs/nexus-page.md
@codepuncher codepuncher added the enhancement New feature or request label May 17, 2026
@codepuncher codepuncher requested a review from Copilot May 17, 2026 18:32
@codepuncher codepuncher force-pushed the feat/configurable-button branch from 609b892 to 6721443 Compare May 17, 2026 18:33
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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

docs/nexus-page.md:30

  • Same as above: this overview line implies short press behavior is preserved for any configured button, but the plugin consumes short presses for non-Start/Back buttons. Consider adding a brief note (e.g., “Start/Back only”) or referencing the warning in the Configuration section.
Hold a configurable gamepad button (default: [b]Start[/b]) for a configurable duration to open the [b]world map[/b] directly. A short press opens whatever menu the button is bound to in your controls.

Comment thread README.md Outdated
Comment thread docs/nexus-page.md Outdated
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

README.md:7

  • The README still says "Inspired by ... hold-Start-to-open-map" even though the trigger button is now configurable (Start/Back). Update this line to avoid implying Start is required.
Hold a configurable gamepad button (**Start** or **Back**, default: **Start**) for a configurable duration to open the **world map**. A short press opens the button's normal menu.

> **Gamepad only.** Default behaviour is fully preserved.

Inspired by Red Dead Redemption 2's hold-Start-to-open-map mechanic.

Comment thread docs/nexus-page.md
@codepuncher codepuncher force-pushed the feat/configurable-button branch from 92743bb to c9b026d Compare May 17, 2026 20:17
@codepuncher codepuncher merged commit 1d83a6a into main May 17, 2026
7 checks passed
@codepuncher codepuncher deleted the feat/configurable-button branch May 17, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants