1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 19:02:41 +01:00

Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002)

This commit is contained in:
Peter Nelson
2025-04-14 23:55:40 +01:00
committed by GitHub
parent fc20ce301a
commit 5008568dfc
29 changed files with 63 additions and 64 deletions

View File

@@ -106,7 +106,7 @@ struct StatusBarWindow : Window {
void DrawWidget(const Rect &r, WidgetID widget) const override
{
Rect tr = r.Shrink(WidgetDimensions::scaled.framerect, RectPadding::zero);
tr.top = CenterBounds(r.top, r.bottom, GetCharacterHeight(FS_NORMAL));
tr.top = CentreBounds(r.top, r.bottom, GetCharacterHeight(FS_NORMAL));
switch (widget) {
case WID_S_LEFT:
/* Draw the date */
@@ -155,7 +155,7 @@ struct StatusBarWindow : Window {
if (!this->reminder_timeout.HasFired()) {
Dimension icon_size = GetSpriteSize(SPR_UNREAD_NEWS);
DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, tr.right - icon_size.width, CenterBounds(r.top, r.bottom, icon_size.height));
DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, tr.right - icon_size.width, CentreBounds(r.top, r.bottom, icon_size.height));
}
break;
}