Savegame dialog: 'Enter' while editing a name is equivalent to pressing the ok button

actorid
scrawl 11 years ago
parent dea9d21db6
commit 63284d21a0

@ -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();

@ -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();

Loading…
Cancel
Save