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:
@@ -466,7 +466,7 @@ struct NewsWindow : Window {
|
||||
case WID_N_VEH_SPR: {
|
||||
assert(this->ni->reftype1 == NR_ENGINE);
|
||||
EngineID engine = this->ni->ref1;
|
||||
DrawVehicleEngine(r.left, r.right, (r.left + r.right) / 2, (r.top + r.bottom) / 2, engine, GetEnginePalette(engine, _local_company), EIT_PREVIEW);
|
||||
DrawVehicleEngine(r.left, r.right, CenterBounds(r.left, r.right, 0), CenterBounds(r.top, r.bottom, 0), engine, GetEnginePalette(engine, _local_company), EIT_PREVIEW);
|
||||
GfxFillRect(r.left, r.top, r.right, r.bottom, PALETTE_NEWSPAPER, FILLRECT_RECOLOUR);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user