mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-09 08:11:25 +00:00
Only close quick keys-related modals when the menu is closed
This commit is contained in:
parent
80a2ef29ad
commit
ae4df2e038
3 changed files with 13 additions and 6 deletions
|
@ -123,6 +123,18 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QuickKeysMenu::onClose()
|
||||||
|
{
|
||||||
|
WindowBase::onClose();
|
||||||
|
|
||||||
|
if (mAssignDialog)
|
||||||
|
mAssignDialog->setVisible(false);
|
||||||
|
if (mItemSelectionDialog)
|
||||||
|
mItemSelectionDialog->setVisible(false);
|
||||||
|
if (mMagicSelectionDialog)
|
||||||
|
mMagicSelectionDialog->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
void QuickKeysMenu::unassign(keyData* key)
|
void QuickKeysMenu::unassign(keyData* key)
|
||||||
{
|
{
|
||||||
key->button->clearUserStrings();
|
key->button->clearUserStrings();
|
||||||
|
|
|
@ -33,6 +33,7 @@ namespace MWGui
|
||||||
void onAssignMagic (const std::string& spellId);
|
void onAssignMagic (const std::string& spellId);
|
||||||
void onAssignMagicCancel ();
|
void onAssignMagicCancel ();
|
||||||
void onOpen() override;
|
void onOpen() override;
|
||||||
|
void onClose() override;
|
||||||
|
|
||||||
void activateQuickKey(int index);
|
void activateQuickKey(int index);
|
||||||
void updateActivatedQuickKey();
|
void updateActivatedQuickKey();
|
||||||
|
|
|
@ -479,12 +479,6 @@ namespace MWInput
|
||||||
{
|
{
|
||||||
if (MWBase::Environment::get().getWindowManager()->getMode () == MWGui::GM_QuickKeysMenu)
|
if (MWBase::Environment::get().getWindowManager()->getMode () == MWGui::GM_QuickKeysMenu)
|
||||||
{
|
{
|
||||||
//Handle any open Modal windows
|
|
||||||
while (MyGUI::InputManager::getInstance().isModalAny())
|
|
||||||
{
|
|
||||||
MWBase::Environment::get().getWindowManager()->exitCurrentModal();
|
|
||||||
}
|
|
||||||
//And handle the actual main window
|
|
||||||
MWBase::Environment::get().getWindowManager()->exitCurrentGuiMode();
|
MWBase::Environment::get().getWindowManager()->exitCurrentGuiMode();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue