mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 07:44:38 +01:00
Make rct_windowclass strong type WindowClass
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp). The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
This commit is contained in:
@@ -60,7 +60,7 @@ rct_window* WindowErrorOpen(std::string_view title, std::string_view message)
|
||||
int32_t numLines, width, height, maxY;
|
||||
rct_window* w;
|
||||
|
||||
window_close_by_class(WC_ERROR);
|
||||
window_close_by_class(WindowClass::Error);
|
||||
auto& buffer = _window_error_text;
|
||||
buffer.assign("{BLACK}");
|
||||
buffer.append(title);
|
||||
@@ -109,7 +109,8 @@ rct_window* WindowErrorOpen(std::string_view title, std::string_view message)
|
||||
}
|
||||
|
||||
w = WindowCreate(
|
||||
windowPosition, width, height, &window_error_events, WC_ERROR, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_RESIZABLE);
|
||||
windowPosition, width, height, &window_error_events, WindowClass::Error,
|
||||
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_RESIZABLE);
|
||||
w->widgets = window_error_widgets;
|
||||
w->error.var_480 = 0;
|
||||
if (!gDisableErrorWindowSound)
|
||||
|
||||
Reference in New Issue
Block a user