From 2ccb77320ba276c42653993adba3161f029cdbb4 Mon Sep 17 00:00:00 2001 From: Harry-Hopkinson Date: Sun, 14 Apr 2024 16:41:01 +0000 Subject: [PATCH] Rename TABLE_CELL_HEIGHT to kTableCellHeight --- src/openrct2-ui/windows/Finances.cpp | 12 ++++++------ src/openrct2/interface/Window.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openrct2-ui/windows/Finances.cpp b/src/openrct2-ui/windows/Finances.cpp index b4f7148cdb..5ef2a06767 100644 --- a/src/openrct2-ui/windows/Finances.cpp +++ b/src/openrct2-ui/windows/Finances.cpp @@ -368,7 +368,7 @@ static Widget _windowFinancesResearchWidgets[] = if (page != WINDOW_FINANCES_PAGE_SUMMARY) return; - auto screenCoords = ScreenCoordsXY{ 0, TABLE_CELL_HEIGHT + 2 }; + auto screenCoords = ScreenCoordsXY{ 0, kTableCellHeight + 2 }; Widget self = widgets[WIDX_SUMMARY_SCROLL]; int32_t row_width = std::max(scrolls[0].h_right, self.width()); @@ -381,10 +381,10 @@ static Widget _windowFinancesResearchWidgets[] = GfxFillRect( dpi, { screenCoords - ScreenCoordsXY{ 0, 1 }, - screenCoords + ScreenCoordsXY{ row_width, (TABLE_CELL_HEIGHT - 2) } }, + screenCoords + ScreenCoordsXY{ row_width, (kTableCellHeight - 2) } }, ColourMapA[colours[1]].lighter | 0x1000000); - screenCoords.y += TABLE_CELL_HEIGHT; + screenCoords.y += kTableCellHeight; } auto& gameState = GetGameState(); @@ -422,7 +422,7 @@ static Widget _windowFinancesResearchWidgets[] = dpi, screenCoords + ScreenCoordsXY{ EXPENDITURE_COLUMN_WIDTH, 0 }, format, ft, { TextAlignment::RIGHT }); } - screenCoords.y += TABLE_CELL_HEIGHT; + screenCoords.y += kTableCellHeight; } screenCoords.y += 4; @@ -555,11 +555,11 @@ static Widget _windowFinancesResearchWidgets[] = GfxFillRect( dpi, { screenCoords - ScreenCoordsXY{ 0, 1 }, - screenCoords + ScreenCoordsXY{ 121, (TABLE_CELL_HEIGHT - 2) } }, + screenCoords + ScreenCoordsXY{ 121, (kTableCellHeight - 2) } }, ColourMapA[colours[1]].lighter | 0x1000000); DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, _windowFinancesSummaryRowLabels[i]); - screenCoords.y += TABLE_CELL_HEIGHT; + screenCoords.y += kTableCellHeight; } // Horizontal rule below expenditure / income table diff --git a/src/openrct2/interface/Window.h b/src/openrct2/interface/Window.h index 805fd9f23c..b641121e2b 100644 --- a/src/openrct2/interface/Window.h +++ b/src/openrct2/interface/Window.h @@ -44,7 +44,7 @@ constexpr uint8_t CloseButtonWidth = 10; constexpr uint8_t kScrollableRowHeight = 12; constexpr uint8_t kListRowHeight = 12; -#define TABLE_CELL_HEIGHT 12 +constexpr uint8_t kTableCellHeight = 12; #define BUTTON_FACE_HEIGHT 12 #define SPINNER_HEIGHT 12 #define DROPDOWN_HEIGHT 12