mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-01 11:15:13 +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:
@@ -138,7 +138,7 @@ public:
|
||||
break;
|
||||
case WIDX_LOAD_SERVER:
|
||||
network_set_password(_password);
|
||||
auto intent = Intent(WC_LOADSAVE);
|
||||
auto intent = Intent(WindowClass::Loadsave);
|
||||
intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME);
|
||||
intent.putExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast<void*>(LoadSaveCallback));
|
||||
context_open_intent(&intent);
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
}
|
||||
void OnPrepareDraw() override
|
||||
{
|
||||
ColourSchemeUpdateByClass(this, WC_SERVER_LIST);
|
||||
ColourSchemeUpdateByClass(this, WindowClass::ServerList);
|
||||
|
||||
WidgetSetCheckboxValue(*this, WIDX_ADVERTISE_CHECKBOX, gConfigNetwork.advertise);
|
||||
auto ft = Formatter::Common();
|
||||
@@ -301,7 +301,7 @@ private:
|
||||
|
||||
rct_window* WindowServerStartOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<ServerStartWindow>(WC_SERVER_START, WW, WH, WF_CENTRE_SCREEN);
|
||||
return WindowFocusOrCreate<ServerStartWindow>(WindowClass::ServerStart, WW, WH, WF_CENTRE_SCREEN);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user