From 80166cddd06e7d49639762a73578ed1901089cd3 Mon Sep 17 00:00:00 2001 From: Andrew Lanzone Date: Sun, 11 May 2025 00:19:01 -0700 Subject: [PATCH] Make main menu honor controller mouse clicks --- apps/openmw/mwgui/mainmenu.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwgui/mainmenu.cpp b/apps/openmw/mwgui/mainmenu.cpp index 5d0e2dc585..cfcb63e4d5 100644 --- a/apps/openmw/mwgui/mainmenu.cpp +++ b/apps/openmw/mwgui/mainmenu.cpp @@ -224,6 +224,8 @@ namespace MWGui key = MyGUI::KeyCode::Tab; break; case SDL_CONTROLLER_BUTTON_A: + if (mMouseFocus != nullptr) + return false; key = MyGUI::KeyCode::Space; break; case SDL_CONTROLLER_BUTTON_B: @@ -341,6 +343,7 @@ namespace MWGui button->setProperty("ImagePushed", "textures\\menu_" + buttonId + "_pressed.dds"); button->eventMouseButtonClick += MyGUI::newDelegate(this, &MainMenu::onButtonClicked); button->setUserData(buttonId); + trackFocusEvents(button); } }