Change: Use CenterBounds function in more places.
CenterBounds may have a 1 pixel difference so the result is not exactly the same.
This commit is contained in:
@@ -404,7 +404,7 @@ public:
|
||||
case WID_AP_AIRPORT_SPRITE:
|
||||
if (this->preview_sprite != 0) {
|
||||
Dimension d = GetSpriteSize(this->preview_sprite);
|
||||
DrawSprite(this->preview_sprite, COMPANY_SPRITE_COLOUR(_local_company), (r.left + r.right - d.width) / 2, (r.top + r.bottom - d.height) / 2);
|
||||
DrawSprite(this->preview_sprite, COMPANY_SPRITE_COLOUR(_local_company), CenterBounds(r.left, r.right, d.width), CenterBounds(r.top, r.bottom, d.height));
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user