Cleanup: Remove unnecessary pressed button offset code.

This commit is contained in:
Peter Nelson
2023-12-04 18:19:55 +00:00
committed by Peter Nelson
parent 884b9e6690
commit 58c252b81a
13 changed files with 25 additions and 38 deletions

View File

@@ -517,8 +517,6 @@ public:
if (widget >= WID_STL_CARGOSTART) {
Rect br = r.Shrink(WidgetDimensions::scaled.bevel);
const CargoSpec *cs = _sorted_cargo_specs[widget - WID_STL_CARGOSTART];
int cg_ofst = HasBit(this->filter.cargoes, cs->Index()) ? WidgetDimensions::scaled.pressed : 0;
br = br.Translate(cg_ofst, cg_ofst);
GfxFillRect(br, cs->rating_colour);
TextColour tc = GetContrastColour(cs->rating_colour);
DrawString(br.left, br.right, CenterBounds(br.top, br.bottom, GetCharacterHeight(FS_SMALL)), cs->abbrev, tc, SA_HOR_CENTER, false, FS_SMALL);