1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +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:
Hielke Morsink
2022-08-21 18:38:25 +02:00
committed by GitHub
parent ebe38a91ce
commit 7f29e4e39c
145 changed files with 1331 additions and 1235 deletions

View File

@@ -1306,7 +1306,7 @@ static int32_t cc_open(InteractiveConsole& console, const arguments_t& argv)
{
// Only this window should be open for safety reasons
window_close_all();
context_open_window(WC_EDITOR_OBJECT_SELECTION);
context_open_window(WindowClass::EditorObjectSelection);
}
}
else if (argv[0] == "inventions_list" && invalidArguments(&invalidTitle, !title))
@@ -1317,12 +1317,12 @@ static int32_t cc_open(InteractiveConsole& console, const arguments_t& argv)
}
else
{
context_open_window(WC_EDITOR_INVENTION_LIST);
context_open_window(WindowClass::EditorInventionList);
}
}
else if (argv[0] == "scenario_options" && invalidArguments(&invalidTitle, !title))
{
context_open_window(WC_EDITOR_SCENARIO_OPTIONS);
context_open_window(WindowClass::EditorScenarioOptions);
}
else if (argv[0] == "objective_options" && invalidArguments(&invalidTitle, !title))
{
@@ -1332,16 +1332,16 @@ static int32_t cc_open(InteractiveConsole& console, const arguments_t& argv)
}
else
{
context_open_window(WC_EDITOR_OBJECTIVE_OPTIONS);
context_open_window(WindowClass::EditorObjectiveOptions);
}
}
else if (argv[0] == "options")
{
context_open_window(WC_OPTIONS);
context_open_window(WindowClass::Options);
}
else if (argv[0] == "themes")
{
context_open_window(WC_THEMES);
context_open_window(WindowClass::Themes);
}
else if (invalidTitle)
{
@@ -1462,7 +1462,7 @@ static int32_t cc_for_date([[maybe_unused]] InteractiveConsole& console, [[maybe
}
date_set(year, month, day);
window_invalidate_by_class(WC_BOTTOM_TOOLBAR);
window_invalidate_by_class(WindowClass::BottomToolbar);
return 1;
}