1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 20:43:04 +01:00

Rename WindowWidgetType to WidgetType and change for new code style

This commit is contained in:
Gymnasiast
2025-06-10 19:55:12 +02:00
parent 149468406b
commit 650fa3ae2e
86 changed files with 2114 additions and 2153 deletions

View File

@@ -77,7 +77,7 @@ namespace OpenRCT2
// Frame
auto& frameWidget = widgets[0];
if (frameWidget.type == WindowWidgetType::Frame)
if (frameWidget.type == WidgetType::frame)
{
frameWidget.right = width - 1;
frameWidget.bottom = height - 1;
@@ -85,13 +85,13 @@ namespace OpenRCT2
// Title/caption
auto& titleWidget = widgets[1];
bool hasTitleWidget = titleWidget.type == WindowWidgetType::Caption;
bool hasTitleWidget = titleWidget.type == WidgetType::caption;
if (hasTitleWidget)
titleWidget.right = width - 2;
// Close button
auto& closeButton = widgets[2];
if (closeButton.type == WindowWidgetType::CloseBox || closeButton.type == WindowWidgetType::Empty)
if (closeButton.type == WidgetType::closeBox || closeButton.type == WidgetType::empty)
{
bool translucent = colours[closeButton.colour].hasFlag(ColourFlag::translucent);
repositionCloseButton(closeButton, width, translucent);
@@ -101,7 +101,7 @@ namespace OpenRCT2
if (widgets.size() >= 4)
{
auto& pageWidget = widgets[3];
if (pageWidget.type == WindowWidgetType::Resize)
if (pageWidget.type == WidgetType::resize)
{
pageWidget.right = width - 1;
pageWidget.bottom = height - 1;