mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-18 03:59:09 +00:00
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:
@@ -1389,7 +1389,7 @@ struct PerformanceRatingDetailWindow : Window {
|
||||
CompanyID cid = (CompanyID)(widget - WID_PRD_COMPANY_FIRST);
|
||||
int offset = (cid == this->company) ? 1 : 0;
|
||||
Dimension sprite_size = GetSpriteSize(SPR_COMPANY_ICON);
|
||||
DrawCompanyIcon(cid, (r.left + r.right - sprite_size.width) / 2 + offset, (r.top + r.bottom - sprite_size.height) / 2 + offset);
|
||||
DrawCompanyIcon(cid, CenterBounds(r.left, r.right, sprite_size.width) + offset, CenterBounds(r.top, r.bottom, sprite_size.height) + offset);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user