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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user