1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-28 22:13:21 +00:00

Merge branch 'controller_tab_type' into 'master'

Allow shoulder buttons to work in menus when text input is active

See merge request OpenMW/openmw!4010
This commit is contained in:
psi29a 2024-08-01 09:55:15 +00:00
commit 028ac2354e

View File

@ -277,11 +277,11 @@ namespace MWInput
key = MyGUI::KeyCode::Apostrophe;
break;
case SDL_CONTROLLER_BUTTON_LEFTSHOULDER:
key = MyGUI::KeyCode::Period;
break;
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Period, 0, false);
return true;
case SDL_CONTROLLER_BUTTON_RIGHTSHOULDER:
key = MyGUI::KeyCode::Slash;
break;
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Slash, 0, false);
return true;
case SDL_CONTROLLER_BUTTON_LEFTSTICK:
mGamepadGuiCursorEnabled = !mGamepadGuiCursorEnabled;
MWBase::Environment::get().getWindowManager()->setCursorActive(mGamepadGuiCursorEnabled);