mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Show correct button glyph for interact if Enter/E are not split
I thought 2.2 already had separate map and interact gamepad bindings, and they simply got neglected and broken with 2.3's split Enter/E key option. But actually, the new split Enter/E option also applied to gamepad buttons, and a separate interact binding was added, without really indicating anything if Enter and E are not split. And I guess using the same button for map and interact by default also makes sense for simplicity... This commit makes sure the button glyph displayed in-game is at least the correct button. The gamepad bindings menu is also slightly modified to darken the interact option - the button glyphs code now automatically causes them to show equal buttons anyway, so it wasn't too big of a change to also darken the line and disable the binding option. To me this says: "the interact key is fixed to be the same as enter right now, but there is a way to change it." It's still not ideal of course, and I know a similar change to the gamepad menu to hide the interact option was rejected a year ago because action sets would already fix it, but it's a year later now, and showing misleading button glyphs should be fixed in 2.4, whether it will already have action sets or not (And at this point I think the plan already is to keep the existing input system for 2.4) And it's a 3 line diff to darken and disable the option, compared to fully hiding the option.
This commit is contained in:
parent
a2c3f47748
commit
c3e251fea9
4 changed files with 10 additions and 3 deletions
|
@ -244,7 +244,13 @@ const char* BUTTONGLYPHS_get_button(const ActionSet actionset, const Action acti
|
||||||
case Action_InGame_Interact:
|
case Action_InGame_Interact:
|
||||||
if (show_controller)
|
if (show_controller)
|
||||||
{
|
{
|
||||||
return glyph_for_vector(game.controllerButton_interact, binding);
|
/* FIXME: this really does depend on the Enter/E speedrunner option...
|
||||||
|
* This is messy, but let's not show the wrong thing here... */
|
||||||
|
if (game.separate_interact)
|
||||||
|
{
|
||||||
|
return glyph_for_vector(game.controllerButton_interact, binding);
|
||||||
|
}
|
||||||
|
return glyph_for_vector(game.controllerButton_map, binding);
|
||||||
}
|
}
|
||||||
if (game.separate_interact)
|
if (game.separate_interact)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6531,7 +6531,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||||
option(loc::gettext("bind enter"));
|
option(loc::gettext("bind enter"));
|
||||||
option(loc::gettext("bind menu"));
|
option(loc::gettext("bind menu"));
|
||||||
option(loc::gettext("bind restart"));
|
option(loc::gettext("bind restart"));
|
||||||
option(loc::gettext("bind interact"));
|
option(loc::gettext("bind interact"), separate_interact);
|
||||||
option(loc::gettext("return"));
|
option(loc::gettext("return"));
|
||||||
menuyoff = 0;
|
menuyoff = 0;
|
||||||
maxspacing = 10;
|
maxspacing = 10;
|
||||||
|
|
|
@ -2366,6 +2366,7 @@ void titleinput(void)
|
||||||
if ( game.currentmenuname == Menu::controller &&
|
if ( game.currentmenuname == Menu::controller &&
|
||||||
game.currentmenuoption > 0 &&
|
game.currentmenuoption > 0 &&
|
||||||
game.currentmenuoption < 6 &&
|
game.currentmenuoption < 6 &&
|
||||||
|
(game.separate_interact || game.currentmenuoption < 5) &&
|
||||||
key.controllerButtonDown() )
|
key.controllerButtonDown() )
|
||||||
{
|
{
|
||||||
updatebuttonmappings(game.currentmenuoption);
|
updatebuttonmappings(game.currentmenuoption);
|
||||||
|
|
|
@ -631,7 +631,7 @@ static void menurender(void)
|
||||||
loc::gettext("Interact is bound to: "),
|
loc::gettext("Interact is bound to: "),
|
||||||
BUTTONGLYPHS_get_all_gamepad_buttons(buffer_b, sizeof(buffer_b), ActionSet_InGame, Action_InGame_Interact)
|
BUTTONGLYPHS_get_all_gamepad_buttons(buffer_b, sizeof(buffer_b), ActionSet_InGame, Action_InGame_Interact)
|
||||||
);
|
);
|
||||||
font::print(PR_CEN, -1, 115, buffer_a, tr, tg, tb);
|
font::print(PR_CEN | PR_BRIGHTNESS(game.separate_interact ? 255 : 128), -1, 115, buffer_a, tr, tg, tb);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue