forked from rosebudai/OpenRCT2-Web
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:
1 parent
ebe38a91ce
commit
7f29e4e39c
145 files changed
+1331
-1235
No files matched your search
@@ -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