Skip to content

Add confirmation and removal to bindings menu#1229

Merged
flibitijibibo merged 3 commits intoTerryCavanagh:masterfrom
Daaaav:gpmenu-confirm-and-remove
May 3, 2025
Merged

Add confirmation and removal to bindings menu#1229
flibitijibibo merged 3 commits intoTerryCavanagh:masterfrom
Daaaav:gpmenu-confirm-and-remove

Conversation

@Daaaav
Copy link
Contributor

@Daaaav Daaaav commented Apr 23, 2025

Changes:

This makes the following improvements to the gamepad bindings menu:

  • The menu now shows a hint that you can press a button while any of the bind options are selected (or that you can navigate away from those options)
  • Instead of button presses immediately setting a binding, they now ask for confirmation: press the same button a second time to confirm
  • You can now remove a binding, the same way you add it (this has the same type of confirmation)
  • This menu used to be inconsistent with pretty much every other menu in the game by showing a permanent title and description for the menu itself ("Game Pad", "Change controller options.") rather than showing a title and description for the currently selected option. This inconsistency is now fixed.

Demo video:

2025-04-11_18-26-56-reenc.mp4

(Terry agreed a 2.4 backport would be a good idea, see also #1228 (comment))

Legal Stuff:

By submitting this pull request, I confirm that...

  • My changes may be used in a future commercial release of VVVVVV
  • I will be credited in a CONTRIBUTORS file and the "GitHub Friends"
    section of the credits for all of said releases, but will NOT be compensated
    for these changes unless there is a prior written agreement

Daaaav added 3 commits April 23, 2025 04:41
This makes the following improvements to the gamepad bindings menu:

- The menu now shows a hint that you can press a button while any of
  the bind options are selected (or that you can navigate away from
  those options)
- Instead of button presses immediately setting a binding, they now
  ask for confirmation: press the same button a second time to confirm
- You can now remove a binding, the same way you add it (this has the
  same type of confirmation)
- This menu used to be inconsistent with pretty much every other menu
  in the game by showing a permanent title and description for the menu
  itself ("Game Pad", "Change controller options.") rather than showing
  a title and description for the currently selected option.
  This inconsistency is now fixed.
A SDL_GameControllerButton below 0 is out of array bounds, so that
should trip the assert and return GLYPH_UNKNOWN just like when the
value is too high.
Also including all the localizations I already have right now.
@Daaaav Daaaav force-pushed the gpmenu-confirm-and-remove branch from 7643b06 to 51cf59d Compare April 23, 2025 02:42
@flibitijibibo flibitijibibo self-assigned this Apr 23, 2025
Copy link
Collaborator

@flibitijibibo flibitijibibo left a comment

Choose a reason for hiding this comment

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

Just one thing comes to mind, otherwise this lgtm.

case 3: vec = &game.controllerButton_esc; break;
case 4: vec = &game.controllerButton_restart; break;
case 5: vec = &game.controllerButton_interact; break;
default: return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this only possible when a manually edited config has an invalid value? If so it may be worth warning just in case someone's messing with this stuff and wants to know what might be wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's only if an unexpected menu option is selected - bind comes from the current menu option and this function is only called when it's between 1 and 5.

@flibitijibibo flibitijibibo merged commit 1de2078 into TerryCavanagh:master May 3, 2025
4 checks passed
@flibitijibibo
Copy link
Collaborator

Will backport this tomorrow!

@flibitijibibo
Copy link
Collaborator

This is now in 2.4-updates - if there's anything else that should be marked for 2.4 let me know, otherwise I'll likely try to put 2.4.3 together after looking at the mouse thing.

@Daaaav
Copy link
Contributor Author

Daaaav commented May 3, 2025

Currently working on a PR for the missing translations now that both Persian and this are merged - we're still waiting for a few translators but we're pretty far along!

Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request May 3, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request May 5, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request May 5, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request May 6, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request May 10, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request May 19, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request May 19, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request Jun 1, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request Jun 6, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request Jun 8, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (TerryCavanagh#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
flibitijibibo pushed a commit that referenced this pull request Jun 8, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
flibitijibibo pushed a commit that referenced this pull request Jun 8, 2025
This includes translations that were missing translations, with varying
extent between different languages, for the following things:
- "X mode is enabled" in-game warnings
- "Press {button} to freeze/unfreeze gameplay" for the level debugger
- Some credits strings for the post-2.4.0 extra Spanish options, the
  PT_BR proofread, and Persian
- The recent gamepad menu changes (#1229)

Furthermore:
- "TAB" (used in the level debugger string) is now a separate string
  instead of being hardcoded, because some languages needed it
  translated
- Added missing arrows to Arabic/Persian font (needed for the gamepad
  menu, and also a translator menu actually)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants