1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Change WindowFlag to strong enum

This commit is contained in:
Michael Steenbeek
2025-09-20 21:46:42 +02:00
committed by GitHub
parent f60dac165f
commit eb38b7227f
90 changed files with 285 additions and 267 deletions

View File

@@ -11,7 +11,7 @@ namespace OpenRCT2
void WindowBase::setViewportLocation(const CoordsXYZ& coords)
{
WindowScrollToLocation(*this, coords);
flags &= ~WF_SCROLLING_TO_LOCATION;
flags.unset(WindowFlag::scrollingToLocation);
// Immediately update the viewport position since we are not scrolling.
if (viewport != nullptr)
@@ -151,7 +151,7 @@ namespace OpenRCT2
int16_t WindowBase::getTitleBarCurrentHeight() const
{
if (!(flags & WF_NO_TITLE_BAR) && widgets.size() > 2)
if (!(flags.has(WindowFlag::noTitleBar)) && widgets.size() > 2)
return widgets[1].height();
else
return 0;