Skip to content

Fix COMMS_MENU_SELECT control usage with 'Hide Rearm/Repair items' and cleanup selection visibility - #7688

Open
wookieejedi wants to merge 1 commit into
scp-fs2open:masterfrom
wookieejedi:fix-skip-hidden-menu-items
Open

Fix COMMS_MENU_SELECT control usage with 'Hide Rearm/Repair items' and cleanup selection visibility#7688
wookieejedi wants to merge 1 commit into
scp-fs2open:masterfrom
wookieejedi:fix-skip-hidden-menu-items

Conversation

@wookieejedi

Copy link
Copy Markdown
Member

The game settings flag '$Hide main Rearm/Repair items in Comms Gauge:' hides the 'Rearm and Repair' lines in the HUD Comms menu from appearing, which is useful for mods that do not have repair ships and thus those lines confuse players. Unfortunately, the newer COMMS_MENU_SELECT control bindings do not properly account for hidden menu items, so using those controls on a comms menu with 'Rearm and Repair' hidden means the selection index gets off and also confuses the player.

This PR fixes that by allowing hud_squadmsg_selection_move_down() and hud_squadmsg_selection_move_up() to skip hidden menu items. Tested and works as expected.

For folks using the COMMS_MENU_SELECT controls, there is also a current UI confusion when the comms menu is first brought up because the first item is selected, but the Display_selector does not show. Thus, players are unsure what item is actively selected even though one is actively selected. In the original comms menu select PR this was set to on by default, but then switched to off by default by a different developer a bit later. This choice is especially useful for mods that have many players with gamepads such as Event Horizon. Alternatively, mods that already have many number keys utilized for other gameplay aspects seem to prefer to keep the comms menu visuals as is and only show the selection if the player uses those keys.

Given there is clearly arguments for both reasons, ideally modders should be able to choose how it displays for their own mods (always or off for the first pop-up of the Comms menu). Thus, this PR adds that as a cleanup game option, too. This also was tested and works as expected.

The game settings flag '$Hide main Rearm/Repair items in Comms Gauge:' hides the 'Rearm and Repair' lines in the HUD Comms menu from appearing, which is useful for mods that do not have repair ships and thus those lines confuse players. Unfortunately, the newer `COMMS_MENU_SELECT` control bindings do not properly account for hidden menu items, so using those controls on a comms menu with 'Rearm and Repair' hidden means the selection index gets off and also confuses the player.

This PR fixes that by allowing `hud_squadmsg_selection_move_down()` and `hud_squadmsg_selection_move_up()` to skip hidden menu items. Tested and works as expected.

For folks using the COMMS_MENU_SELECT controls, there is also a current UI confusion when the comms menu is first brought up because the first item is selected, but the `Display_selector` does not show. Thus, players are unsure what item is actively selected even though one is actively selected. In the original comms menu select PR this was set to on by default, but then switched to off by default by a different developer a bit later. This choice is especially useful for mods that have many players with gamepads such as Event Horizon. Alternatively, mods that already have many number keys utilized for other gameplay aspects seem to prefer to keep the comms menu visuals as is and only show the selection if the player uses those keys. Given there is clearly arguments for both reasons, ideally modders should be able to choose how it displays for their own mods (always or off for the first pop-up of the Comms menu).  Thus, this PR adds that as a cleanup game option, too. This also was tested and works as expected.
@wookieejedi wookieejedi added this to the Release 26.0.1 milestone Aug 6, 2026
@wookieejedi wookieejedi added cleanup A modification or rewrite of code to make it more understandable or easier to maintain. fix A fix for bugs, not-a-bugs, and/or regressions. HUD A feature or issue related to the HUD labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup A modification or rewrite of code to make it more understandable or easier to maintain. fix A fix for bugs, not-a-bugs, and/or regressions. HUD A feature or issue related to the HUD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant