diff --git a/apps/openmw/mwgui/savegamedialog.cpp b/apps/openmw/mwgui/savegamedialog.cpp index 17aaa1189..da0417e7b 100644 --- a/apps/openmw/mwgui/savegamedialog.cpp +++ b/apps/openmw/mwgui/savegamedialog.cpp @@ -35,6 +35,7 @@ namespace MWGui mCharacterSelection->eventComboChangePosition += MyGUI::newDelegate(this, &SaveGameDialog::onCharacterSelected); mSaveList->eventListChangePosition += MyGUI::newDelegate(this, &SaveGameDialog::onSlotSelected); mSaveList->eventListSelectAccept += MyGUI::newDelegate(this, &SaveGameDialog::onSlotActivated); + mSaveNameEdit->eventEditSelectAccept += MyGUI::newDelegate(this, &SaveGameDialog::onEditSelectAccept); } void SaveGameDialog::onSlotActivated(MyGUI::ListBox *sender, size_t pos) @@ -43,6 +44,11 @@ namespace MWGui onOkButtonClicked(mOkButton); } + void SaveGameDialog::onEditSelectAccept(MyGUI::EditBox *sender) + { + onOkButtonClicked(mOkButton); + } + void SaveGameDialog::open() { WindowModal::open(); diff --git a/apps/openmw/mwgui/savegamedialog.hpp b/apps/openmw/mwgui/savegamedialog.hpp index bf6fab73a..6743b00b9 100644 --- a/apps/openmw/mwgui/savegamedialog.hpp +++ b/apps/openmw/mwgui/savegamedialog.hpp @@ -25,6 +25,7 @@ namespace MWGui void onCharacterSelected (MyGUI::ComboBox* sender, size_t pos); void onSlotSelected (MyGUI::ListBox* sender, size_t pos); void onSlotActivated (MyGUI::ListBox* sender, size_t pos); + void onEditSelectAccept (MyGUI::EditBox* sender); void fillSaveList();