Change: Use power-of-2 scaling for some dimensions in GUI.

These are related to drawing sprites that are normally drawn on the
landscape, and should therefore still follow power-of-2 scaling to fit
correctly.
This commit is contained in:
Peter Nelson
2022-09-05 21:05:18 +01:00
committed by PeterN
parent 062ea68422
commit ed60c88b0a
19 changed files with 88 additions and 78 deletions

View File

@@ -786,7 +786,7 @@ static inline void DrawCloseBox(const Rect &r, Colours colour)
Dimension d = GetSpriteSize(SPR_CLOSEBOX, &offset);
d.width -= offset.x;
d.height -= offset.y;
int s = ScaleGUITrad(1); /* Offset to account for shadow of SPR_CLOSEBOX */
int s = ScaleSpriteTrad(1); /* Offset to account for shadow of SPR_CLOSEBOX */
DrawSprite(SPR_CLOSEBOX, (colour != COLOUR_WHITE ? TC_BLACK : TC_SILVER) | (1U << PALETTE_TEXT_RECOLOUR), CenterBounds(r.left, r.right, d.width - s) - offset.x, CenterBounds(r.top, r.bottom, d.height - s) - offset.y);
}