Merge branch 'master' into jgrpp

This commit is contained in:
Jonathan G Rennison
2020-10-14 17:38:23 +01:00
61 changed files with 2031 additions and 1507 deletions

View File

@@ -335,13 +335,6 @@ public:
if (_window_system_initialized) ShowFirstError();
}
EventState OnKeyPress(WChar key, uint16 keycode) override
{
if (keycode != WKC_SPACE) return ES_NOT_HANDLED;
delete this;
return ES_HANDLED;
}
/**
* Check whether the currently shown error message was critical or not.
* @return True iff the message was critical.
@@ -449,6 +442,18 @@ void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel
}
}
/**
* Close active error message window
* @return true if a window was closed.
*/
bool HideActiveErrorMessage() {
ErrmsgWindow *w = (ErrmsgWindow*)FindWindowById(WC_ERRMSG, 0);
if (w == nullptr) return false;
delete w;
return true;
}
/**
* Schedule a list of errors.
* Note: This does not try to display the error now. This is useful if the window system is not yet running.