mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 00:34:46 +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:
@@ -40,7 +40,7 @@ static rct_window_event_list window_title_options_events([](auto& events)
|
||||
rct_window* WindowTitleOptionsOpen()
|
||||
{
|
||||
rct_window* window = WindowCreate(
|
||||
ScreenCoordsXY(context_get_width() - 80, 0), 80, 15, &window_title_options_events, WC_TITLE_OPTIONS,
|
||||
ScreenCoordsXY(context_get_width() - 80, 0), 80, 15, &window_title_options_events, WindowClass::TitleOptions,
|
||||
WF_STICK_TO_BACK | WF_TRANSPARENT);
|
||||
window->widgets = window_title_options_widgets;
|
||||
WindowInitScrollWidgets(*window);
|
||||
@@ -56,7 +56,7 @@ static void WindowTitleOptionsMouseup(rct_window* w, rct_widgetindex widgetIndex
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_OPTIONS:
|
||||
context_open_window(WC_OPTIONS);
|
||||
context_open_window(WindowClass::Options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user