mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:53:52 +00:00
Savegame dialog: Grey out buttons if no save is selected
This commit is contained in:
parent
311acfa8ff
commit
271aac3fcc
1 changed files with 6 additions and 4 deletions
|
@ -112,6 +112,7 @@ namespace MWGui
|
|||
mCurrentCharacter = NULL;
|
||||
mCurrentSlot = NULL;
|
||||
mSaveList->removeAllItems();
|
||||
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
||||
|
||||
MWBase::StateManager* mgr = MWBase::Environment::get().getStateManager();
|
||||
if (mgr->characterBegin() == mgr->characterEnd())
|
||||
|
@ -239,10 +240,8 @@ namespace MWGui
|
|||
}
|
||||
else
|
||||
{
|
||||
if (mCurrentCharacter && mCurrentSlot)
|
||||
{
|
||||
MWBase::Environment::get().getStateManager()->loadGame (mCurrentCharacter, mCurrentSlot);
|
||||
}
|
||||
assert (mCurrentCharacter && mCurrentSlot);
|
||||
MWBase::Environment::get().getStateManager()->loadGame (mCurrentCharacter, mCurrentSlot);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,6 +291,9 @@ namespace MWGui
|
|||
|
||||
void SaveGameDialog::onSlotSelected(MyGUI::ListBox *sender, size_t pos)
|
||||
{
|
||||
mOkButton->setEnabled(pos != MyGUI::ITEM_NONE || mSaving);
|
||||
mDeleteButton->setEnabled(pos != MyGUI::ITEM_NONE);
|
||||
|
||||
if (pos == MyGUI::ITEM_NONE)
|
||||
{
|
||||
mCurrentSlot = NULL;
|
||||
|
|
Loading…
Reference in a new issue