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

@@ -853,9 +853,8 @@ struct ScriptDebugWindow : public Window {
{
if (this->IsWidgetDisabled(widget)) return;
CompanyID cid = (CompanyID)(widget - start);
int offset = (cid == script_debug_company) ? WidgetDimensions::scaled.pressed : 0;
Dimension sprite_size = GetSpriteSize(SPR_COMPANY_ICON);
DrawCompanyIcon(cid, CenterBounds(r.left, r.right, sprite_size.width) + offset, CenterBounds(r.top, r.bottom, sprite_size.height) + offset);
DrawCompanyIcon(cid, CenterBounds(r.left, r.right, sprite_size.width), CenterBounds(r.top, r.bottom, sprite_size.height));
}
/**