mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 18:15:35 +00:00
Auto-select first save in load dialog
This commit is contained in:
parent
3a7e2f8bb5
commit
f812746010
1 changed files with 10 additions and 1 deletions
|
@ -256,7 +256,16 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mSaveList->addItem(it->mProfile.mDescription);
|
mSaveList->addItem(it->mProfile.mDescription);
|
||||||
}
|
}
|
||||||
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
// When loading, Auto-select the first save, if there is one
|
||||||
|
if (mSaveList->getItemCount() && !mSaving)
|
||||||
|
{
|
||||||
|
mSaveList->setIndexSelected(0);
|
||||||
|
onSlotSelected(mSaveList, 0);
|
||||||
|
// Give key focus to save list so we can confirm the selection with Enter
|
||||||
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mSaveList);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveGameDialog::onSlotSelected(MyGUI::ListBox *sender, size_t pos)
|
void SaveGameDialog::onSlotSelected(MyGUI::ListBox *sender, size_t pos)
|
||||||
|
|
Loading…
Reference in a new issue