feat: add configurable trigger button via sButton INI setting#11
Merged
Conversation
There was a problem hiding this comment.
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
sButtonparsing insrc/Plugin.cppand plumbed the chosen key/name into the input handler. - Refactored
InputHandlerto use a configurablebuttonKeyCode/buttonNameand renamed related methods. - Documented
sButtoninQuickMap.ini,README.md, anddocs/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.
609b892 to
6721443
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
92743bb to
c9b026d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a configurable
sButtonINI option so users can choose which gamepad button triggers the hold-to-open-map behaviour. Requested by Nuascura on NexusMods.Changes
QuickMap.ini— newsButton=Startsetting with inline documentationsrc/Plugin.cpp—ReadButton()function parses the INI value to aBSWin32GamepadDevice::Keycode; warns and falls back toStarton unknown valuessrc/InputHandler.h/cpp—buttonKeyCode/buttonNameprivate members replace the hardcodedkStart;ProcessStartButton→ProcessButton;UpdateShortPressUserEvent→UpdateShortPressBindingREADME.md/docs/nexus-page.md—sButtondocumented in the Configuration sectionSupported values
Start,Back(case-insensitive)Both buttons safely preserve the short press (Journal Menu and Quick Inventory respectively).
Testing
sButton=Start(default) andsButton=Back