mirror of
https://github.com/OpenMW/openmw.git
synced 2026-02-01 09:48:46 +00:00
Merge branch 'Issue#8774' into 'master'
Closes #8774: The container/trade menu now automatically brings the focused menu to the front Closes #8774 See merge request OpenMW/openmw!5099
This commit is contained in:
commit
1ea60f7b8f
1 changed files with 16 additions and 5 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include <MyGUI_FactoryManager.h>
|
||||
#include <MyGUI_InputManager.h>
|
||||
#include <MyGUI_LanguageManager.h>
|
||||
#include <MyGUI_LayerManager.h>
|
||||
#include <MyGUI_PointerManager.h>
|
||||
#include <MyGUI_UString.h>
|
||||
|
||||
|
|
@ -981,6 +982,10 @@ namespace MWGui
|
|||
MWBase::Environment::get().getInputManager()->setGamepadGuiCursorEnabled(
|
||||
mGuiModeStates[mode].mWindows[activeIndex]->isGamepadCursorAllowed());
|
||||
|
||||
WindowBase* activeWindow = mGuiModeStates[mode].mWindows[activeIndex];
|
||||
if (activeWindow->isVisible())
|
||||
MyGUI::LayerManager::getInstance().upLayerItem(activeWindow->mMainWidget);
|
||||
|
||||
updateControllerButtonsOverlay();
|
||||
setCursorActive(false);
|
||||
|
||||
|
|
@ -1435,11 +1440,17 @@ namespace MWGui
|
|||
if (Settings::gui().mControllerMenus)
|
||||
{
|
||||
if (mode == GM_Container)
|
||||
mActiveControllerWindows[mode] = 0; // Ensure controller focus is on container
|
||||
// Activate first visible window. This needs to be called after updateVisible.
|
||||
if (mActiveControllerWindows[mode] != 0)
|
||||
mActiveControllerWindows[mode] = mActiveControllerWindows[mode] - 1;
|
||||
cycleActiveControllerWindow(true);
|
||||
{
|
||||
// Ensure controller focus is on container when entering container mode.
|
||||
setActiveControllerWindow(mode, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Activate first visible window. This needs to be called after updateVisible.
|
||||
if (mActiveControllerWindows[mode] != 0)
|
||||
mActiveControllerWindows[mode] = mActiveControllerWindows[mode] - 1;
|
||||
cycleActiveControllerWindow(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue