2022-06-18 17:21:33 +02:00
|
|
|
/*****************************************************************************
|
2024-01-01 12:52:28 +01:00
|
|
|
* Copyright (c) 2014-2024 OpenRCT2 developers
|
2022-06-18 17:21:33 +02:00
|
|
|
*
|
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
|
|
*
|
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#include "SetZoom.h"
|
|
|
|
|
2024-04-23 21:31:05 +02:00
|
|
|
#include "../../../interface/Window.h"
|
|
|
|
#include "../../../interface/ZoomLevel.h"
|
2022-06-19 00:18:18 +02:00
|
|
|
|
2022-06-18 17:21:33 +02:00
|
|
|
namespace OpenRCT2::Title
|
|
|
|
{
|
|
|
|
int16_t SetZoomCommand::operator()(int16_t timer)
|
|
|
|
{
|
2023-01-21 20:57:17 +01:00
|
|
|
WindowBase* w = WindowGetMain();
|
2022-06-19 00:18:18 +02:00
|
|
|
if (w != nullptr)
|
|
|
|
{
|
2023-01-16 21:13:42 +01:00
|
|
|
WindowZoomSet(*w, ZoomLevel{ static_cast<int8_t>(Zoom) }, false);
|
2022-06-19 00:18:18 +02:00
|
|
|
}
|
2022-06-18 17:21:33 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
} // namespace OpenRCT2::Title
|