mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 07:45:34 +00:00
Clear message boxes in windowmanager cleanup (Fixes #1496)
This commit is contained in:
parent
e288437885
commit
9e6d21d95b
3 changed files with 21 additions and 0 deletions
|
@ -25,6 +25,23 @@ namespace MWGui
|
|||
}
|
||||
}
|
||||
|
||||
void MessageBoxManager::clear()
|
||||
{
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
|
||||
std::vector<MessageBox*>::iterator it(mMessageBoxes.begin());
|
||||
for (; it != mMessageBoxes.end(); ++it)
|
||||
{
|
||||
if (*it == mStaticMessageBox)
|
||||
mStaticMessageBox = NULL;
|
||||
delete *it;
|
||||
}
|
||||
mMessageBoxes.clear();
|
||||
|
||||
mLastButtonPressed = -1;
|
||||
}
|
||||
|
||||
void MessageBoxManager::onFrame (float frameDuration)
|
||||
{
|
||||
std::vector<MessageBox*>::iterator it;
|
||||
|
|
|
@ -30,6 +30,9 @@ namespace MWGui
|
|||
bool createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons);
|
||||
bool isInteractiveMessageBox ();
|
||||
|
||||
/// Remove all message boxes
|
||||
void clear();
|
||||
|
||||
bool removeMessageBox (MessageBox *msgbox);
|
||||
void setMessageBoxSpeed (int speed);
|
||||
|
||||
|
|
|
@ -1502,6 +1502,7 @@ namespace MWGui
|
|||
{
|
||||
mMap->clear();
|
||||
mQuickKeysMenu->clear();
|
||||
mMessageBoxManager->clear();
|
||||
|
||||
mTrainingWindow->resetReference();
|
||||
mDialogueWindow->resetReference();
|
||||
|
|
Loading…
Reference in a new issue