forked from mirror/openmw-tes3mp
Savegame dialog: support loading saves using Enter key or double-click
This commit is contained in:
parent
49e26415be
commit
37ef8ec908
2 changed files with 9 additions and 0 deletions
|
@ -34,7 +34,13 @@ namespace MWGui
|
|||
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SaveGameDialog::onCancelButtonClicked);
|
||||
mCharacterSelection->eventComboChangePosition += MyGUI::newDelegate(this, &SaveGameDialog::onCharacterSelected);
|
||||
mSaveList->eventListChangePosition += MyGUI::newDelegate(this, &SaveGameDialog::onSlotSelected);
|
||||
mSaveList->eventListSelectAccept += MyGUI::newDelegate(this, &SaveGameDialog::onSlotActivated);
|
||||
}
|
||||
|
||||
void SaveGameDialog::onSlotActivated(MyGUI::ListBox *sender, size_t pos)
|
||||
{
|
||||
onSlotSelected(sender, pos);
|
||||
onOkButtonClicked(mOkButton);
|
||||
}
|
||||
|
||||
void SaveGameDialog::open()
|
||||
|
@ -103,6 +109,8 @@ namespace MWGui
|
|||
|
||||
void SaveGameDialog::onOkButtonClicked(MyGUI::Widget *sender)
|
||||
{
|
||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(NULL);
|
||||
|
||||
// Get the selected slot, if any
|
||||
unsigned int i=0;
|
||||
const MWState::Slot* slot = NULL;
|
||||
|
|
|
@ -24,6 +24,7 @@ namespace MWGui
|
|||
void onOkButtonClicked (MyGUI::Widget* sender);
|
||||
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 fillSaveList();
|
||||
|
||||
|
|
Loading…
Reference in a new issue