Move ToggleFootpathWindow into Footpath.cpp

This commit is contained in:
Aaron van Geffen committed 2024-07-31 21:54:10 +02:00
1 parent 2508a6020c
commit b09e9fdf56
3 files changed
+20 -17

No files matched your search

+17
View File
@@ -1521,4 +1521,21 @@ static constexpr uint8_t ConstructionPreviewImages[][4] = {
}
}
}
/**
*
* rct2: 0x0066CCE7
*/
void ToggleFootpathWindow()
{
if (WindowFindByClass(WindowClass::Footpath) == nullptr)
{
ContextOpenWindow(WindowClass::Footpath);
}
else
{
ToolCancel();
WindowCloseByClass(WindowClass::Footpath);
}
}
} // namespace OpenRCT2::Ui::Windows
-17
View File
@@ -309,23 +309,6 @@ namespace OpenRCT2::Ui::Windows
void NetworkMenuDropdown(int16_t dropdownIndex);
/**
*
* rct2: 0x0066CCE7
*/
void ToggleFootpathWindow()
{
if (WindowFindByClass(WindowClass::Footpath) == nullptr)
{
ContextOpenWindow(WindowClass::Footpath);
}
else
{
ToolCancel();
WindowCloseByClass(WindowClass::Footpath);
}
}
public:
void OnMouseUp(WidgetIndex widgetIndex) override
{
+3
View File
@@ -49,8 +49,11 @@ namespace OpenRCT2::Ui::Windows
WindowBase* EditorMainOpen();
WindowBase* EditorObjectiveOptionsOpen();
WindowBase* EditorScenarioOptionsOpen();
WindowBase* FootpathOpen();
void WindowFootpathResetSelectedPath();
void ToggleFootpathWindow();
WindowBase* GuestOpen(Peep* peep);
WindowBase* LandOpen();