1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Move ToggleFootpathWindow into Footpath.cpp

This commit is contained in:
Aaron van Geffen
2024-07-30 22:37:19 +02:00
parent 2508a6020c
commit b09e9fdf56
3 changed files with 20 additions and 17 deletions

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

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
{

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();