Make MENU_CIRCLE behave like the other MENU keybindings

This commit is contained in:
nastys
2019-10-26 16:06:02 +02:00
parent ebb7207f16
commit fc52c5ce13
3 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ JVS_RIGHT = Right, Down, Ds4_R1, Ds4_L_Stick_Down, Ds4_R_Stick_Down, XINPUT_RS
MENU_L = Left, Up, Ds4_L1, Ds4_L_Stick_Up, Ds4_R_Stick_Up, XINPUT_LS, Ds4_DPad_Left, Ds4_DPad_Up, XINPUT_LEFT, XINPUT_UP, Q, U, Ds4_L_Stick_Left, XINPUT_LLEFT, Ds4_L_Stick_Up, XINPUT_LUP, Ds4_R_Stick_Left, XINPUT_RLEFT, Ds4_R_Stick_Up, XINPUT_RUP
MENU_R = Right, Down, Ds4_R1, Ds4_L_Stick_Down, Ds4_R_Stick_Down, XINPUT_RS, Ds4_DPad_Right, Ds4_DPad_Down, XINPUT_RIGHT, XINPUT_DOWN, E, O, Ds4_L_Stick_Right, XINPUT_LRIGHT, Ds4_L_Stick_Down, XINPUT_LDOWN, Ds4_R_Stick_Right, XINPUT_RRIGHT, Ds4_R_Stick_Down, XINPUT_RDOWN
MENU_CIRCLE_STACK = Spacebar
MENU_CIRCLE = Spacebar
# Touch Slider:
LEFT_SIDE_SLIDE_LEFT = Q, Ds4_L_Stick_Left, XINPUT_LLEFT
@@ -45,7 +45,7 @@ namespace TLAC::Components
delete MenuLBinding;
delete MenuRBinding;
delete MenuCircleStackBinding;
delete MenuCircleBinding;
}
const char* InputEmulator::GetDisplayName()
@@ -76,7 +76,7 @@ namespace TLAC::Components
MenuLBinding = new Binding();
MenuRBinding = new Binding();
MenuCircleStackBinding = new Binding();
MenuCircleBinding = new Binding();
FileSystem::ConfigFile configFile(framework::GetModuleDirectory(), KEY_CONFIG_FILE_NAME);
configFile.OpenRead();
@@ -92,7 +92,7 @@ namespace TLAC::Components
Config::BindConfigKeys(configFile.ConfigMap, "JVS_RIGHT", *RightBinding, { "E", "O" });
Config::BindConfigKeys(configFile.ConfigMap, "MENU_L", *MenuLBinding, { "Left", "Up" });
Config::BindConfigKeys(configFile.ConfigMap, "MENU_R", *MenuRBinding, { "Down", "Right" });
Config::BindConfigKeys(configFile.ConfigMap, "MENU_CIRCLE_STACK", *MenuCircleStackBinding, { "D", "L", "Spacebar" });
Config::BindConfigKeys(configFile.ConfigMap, "MENU_CIRCLE", *MenuCircleBinding, { "D", "L", "Spacebar" });
mouseScrollPvSelection = configFile.GetBooleanValue("mouse_scroll_pv_selection");
}
@@ -258,6 +258,12 @@ namespace TLAC::Components
buttons |= JVS_R;
return buttons;
}
if ((Pause::pause || !(*(GameState*)CURRENT_GAME_STATE_ADDRESS == GS_GAME && *(SubGameState*)CURRENT_GAME_SUB_STATE_ADDRESS == SUB_GAME_MAIN)) &&
buttonTestFunc(MenuCircleBinding))
{
buttons |= JVS_CIRCLE;
return buttons;
}
if (buttonTestFunc(TestBinding))
buttons |= JVS_TEST;
@@ -273,7 +279,7 @@ namespace TLAC::Components
buttons |= JVS_SQUARE;
if (buttonTestFunc(BatsuBinding))
buttons |= JVS_CROSS;
if (buttonTestFunc(MaruBinding) || (buttonTestFunc(MenuCircleStackBinding) && (!(*(GameState*)CURRENT_GAME_STATE_ADDRESS == GS_GAME && *(SubGameState*)CURRENT_GAME_SUB_STATE_ADDRESS == SUB_GAME_MAIN) || Pause::pause)))
if (buttonTestFunc(MaruBinding))
buttons |= JVS_CIRCLE;
if (buttonTestFunc(LeftBinding))
@@ -34,7 +34,7 @@ namespace TLAC::Components
Input::Binding* MenuLBinding;
Input::Binding* MenuRBinding;
Input::Binding* MenuCircleStackBinding;
Input::Binding* MenuCircleBinding;
InputEmulator();
~InputEmulator();