1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:53:53 +00:00

Removes add behavior when pressing escape while waiting.

This commit is contained in:
Digmaster 2014-05-29 01:52:41 -04:00
parent 033f1850f9
commit a5cfa8a049
3 changed files with 9 additions and 1 deletions

View file

@ -71,7 +71,8 @@ namespace MWGui
void WaitDialog::exit() void WaitDialog::exit()
{ {
MWBase::Environment::get().getWindowManager()->popGuiMode(); if(!mProgressBar.isVisible()) //Only exit if not currently waiting
MWBase::Environment::get().getWindowManager()->popGuiMode();
} }
void WaitDialog::open() void WaitDialog::open()

View file

@ -23,6 +23,11 @@ void WindowBase::setVisible(bool visible)
close(); close();
} }
bool WindowBase::isVisible()
{
return mMainWidget->getVisible();
}
void WindowBase::center() void WindowBase::center()
{ {
// Centre dialog // Centre dialog

View file

@ -29,6 +29,8 @@ namespace MWGui
virtual void exit() {} virtual void exit() {}
///Sets the visibility of the window ///Sets the visibility of the window
virtual void setVisible(bool visible); virtual void setVisible(bool visible);
///Returns the visibility state of the window
virtual bool isVisible();
void center(); void center();
/** Event : Dialog finished, OK button clicked.\n /** Event : Dialog finished, OK button clicked.\n