mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 03:54:40 +00:00
Fixed issue with QuickKeyMenu and ItemSelectionDialog
This commit is contained in:
parent
2b3b11d848
commit
060a50f94a
@ -26,6 +26,11 @@ namespace MWGui
|
|||||||
center();
|
center();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ItemSelectionDialog::exit()
|
||||||
|
{
|
||||||
|
eventDialogCanceled();
|
||||||
|
}
|
||||||
|
|
||||||
void ItemSelectionDialog::openContainer(const MWWorld::Ptr& container)
|
void ItemSelectionDialog::openContainer(const MWWorld::Ptr& container)
|
||||||
{
|
{
|
||||||
mModel = new InventoryItemModel(container);
|
mModel = new InventoryItemModel(container);
|
||||||
@ -53,7 +58,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void ItemSelectionDialog::onCancelButtonClicked(MyGUI::Widget* sender)
|
void ItemSelectionDialog::onCancelButtonClicked(MyGUI::Widget* sender)
|
||||||
{
|
{
|
||||||
eventDialogCanceled();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ namespace MWGui
|
|||||||
public:
|
public:
|
||||||
ItemSelectionDialog(const std::string& label);
|
ItemSelectionDialog(const std::string& label);
|
||||||
|
|
||||||
|
virtual void exit();
|
||||||
|
|
||||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||||
typedef MyGUI::delegates::CMultiDelegate1<MWWorld::Ptr> EventHandle_Item;
|
typedef MyGUI::delegates::CMultiDelegate1<MWWorld::Ptr> EventHandle_Item;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void QuickKeysMenu::exit()
|
void QuickKeysMenu::exit()
|
||||||
{
|
{
|
||||||
mAssignDialog->setVisible (false);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode (MWGui::GM_QuickKeysMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickKeysMenu::clear()
|
void QuickKeysMenu::clear()
|
||||||
@ -151,7 +151,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void QuickKeysMenu::onCancelButtonClicked(MyGUI::Widget* sender)
|
void QuickKeysMenu::onCancelButtonClicked(MyGUI::Widget* sender)
|
||||||
{
|
{
|
||||||
exit();
|
mAssignDialog->setVisible (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickKeysMenu::onAssignItem(MWWorld::Ptr item)
|
void QuickKeysMenu::onAssignItem(MWWorld::Ptr item)
|
||||||
@ -390,6 +390,11 @@ namespace MWGui
|
|||||||
center();
|
center();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QuickKeysMenuAssign::exit()
|
||||||
|
{
|
||||||
|
setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
void QuickKeysMenu::write(ESM::ESMWriter &writer)
|
void QuickKeysMenu::write(ESM::ESMWriter &writer)
|
||||||
{
|
{
|
||||||
writer.startRecord(ESM::REC_KEYS);
|
writer.startRecord(ESM::REC_KEYS);
|
||||||
@ -513,7 +518,12 @@ namespace MWGui
|
|||||||
|
|
||||||
void MagicSelectionDialog::onCancelButtonClicked (MyGUI::Widget *sender)
|
void MagicSelectionDialog::onCancelButtonClicked (MyGUI::Widget *sender)
|
||||||
{
|
{
|
||||||
mParent->onAssignMagicCancel ();
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MagicSelectionDialog::exit()
|
||||||
|
{
|
||||||
|
mParent->onAssignMagicCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MagicSelectionDialog::open ()
|
void MagicSelectionDialog::open ()
|
||||||
|
@ -70,6 +70,7 @@ namespace MWGui
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QuickKeysMenuAssign(QuickKeysMenu* parent);
|
QuickKeysMenuAssign(QuickKeysMenu* parent);
|
||||||
|
virtual void exit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::TextBox* mLabel;
|
MyGUI::TextBox* mLabel;
|
||||||
@ -87,6 +88,7 @@ namespace MWGui
|
|||||||
MagicSelectionDialog(QuickKeysMenu* parent);
|
MagicSelectionDialog(QuickKeysMenu* parent);
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
virtual void exit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::Button* mCancelButton;
|
MyGUI::Button* mCancelButton;
|
||||||
|
@ -642,7 +642,7 @@ namespace MWInput
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(MWBase::Environment::get().getWindowManager()->getMode() == MWGui::GM_Dialogue) { //Give access to the main menu when at a choice in Dialogue
|
if(MWBase::Environment::get().getWindowManager()->getMode() == MWGui::GM_Dialogue) { //Give access to the main menu when at a choice in dialogue
|
||||||
if(MWBase::Environment::get().getDialogueManager()->isInChoice()) {
|
if(MWBase::Environment::get().getDialogueManager()->isInChoice()) {
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
|
||||||
MWBase::Environment::get().getSoundManager()->pauseSounds (MWBase::SoundManager::Play_TypeSfx);
|
MWBase::Environment::get().getSoundManager()->pauseSounds (MWBase::SoundManager::Play_TypeSfx);
|
||||||
|
Loading…
Reference in New Issue
Block a user