1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-26 03:16:35 +00:00

Merge branch 'slashdot' into 'master'

Remove period and slash from keyboard navigation and inject tabs when using a controller

See merge request OpenMW/openmw!4475
This commit is contained in:
Alexei Kotov 2024-12-07 01:41:29 +00:00
commit c207397c56
2 changed files with 4 additions and 6 deletions

View File

@ -183,10 +183,6 @@ namespace MWGui
return switchFocus(D_Down, false);
case MyGUI::KeyCode::Tab:
return switchFocus(MyGUI::InputManager::getInstance().isShiftPressed() ? D_Prev : D_Next, true);
case MyGUI::KeyCode::Period:
return switchFocus(D_Prev, true);
case MyGUI::KeyCode::Slash:
return switchFocus(D_Next, true);
case MyGUI::KeyCode::Return:
case MyGUI::KeyCode::NumpadEnter:
case MyGUI::KeyCode::Space:

View File

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