forked from teamnwah/openmw-tes3coop
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)
|
void MessageBoxManager::onFrame (float frameDuration)
|
||||||
{
|
{
|
||||||
std::vector<MessageBox*>::iterator it;
|
std::vector<MessageBox*>::iterator it;
|
||||||
|
|
|
@ -30,6 +30,9 @@ namespace MWGui
|
||||||
bool createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons);
|
bool createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons);
|
||||||
bool isInteractiveMessageBox ();
|
bool isInteractiveMessageBox ();
|
||||||
|
|
||||||
|
/// Remove all message boxes
|
||||||
|
void clear();
|
||||||
|
|
||||||
bool removeMessageBox (MessageBox *msgbox);
|
bool removeMessageBox (MessageBox *msgbox);
|
||||||
void setMessageBoxSpeed (int speed);
|
void setMessageBoxSpeed (int speed);
|
||||||
|
|
||||||
|
|
|
@ -1502,6 +1502,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mMap->clear();
|
mMap->clear();
|
||||||
mQuickKeysMenu->clear();
|
mQuickKeysMenu->clear();
|
||||||
|
mMessageBoxManager->clear();
|
||||||
|
|
||||||
mTrainingWindow->resetReference();
|
mTrainingWindow->resetReference();
|
||||||
mDialogueWindow->resetReference();
|
mDialogueWindow->resetReference();
|
||||||
|
|
Loading…
Reference in a new issue