mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Don't close the error window if the new error will not show
This commit is contained in:
@@ -111,8 +111,6 @@ public:
|
||||
|
||||
WindowBase* WindowErrorOpen(std::string_view title, std::string_view message)
|
||||
{
|
||||
WindowCloseByClass(WindowClass::Error);
|
||||
|
||||
std::string buffer = "{BLACK}";
|
||||
buffer.append(title);
|
||||
|
||||
@@ -137,6 +135,9 @@ WindowBase* WindowErrorOpen(std::string_view title, std::string_view message)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Close any existing error windows if they exist.
|
||||
WindowCloseByClass(WindowClass::Error);
|
||||
|
||||
int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::Medium);
|
||||
width = std::clamp(width, 64, 196);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user