mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 20:45:33 +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,6 +256,15 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mSaveList->addItem(it->mProfile.mDescription);
|
mSaveList->addItem(it->mProfile.mDescription);
|
||||||
}
|
}
|
||||||
|
// 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);
|
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue