Codechange: Make a generic DrawRectOutline function from DrawOutline. (#11524)
This allows drawing an outline from Rect, not just constrained to a Widget's Rect. And reduces duplication a little.
This commit is contained in:
@@ -2146,10 +2146,7 @@ struct CargoesField {
|
||||
int ypos1 = ypos + vert_inter_industry_space / 2;
|
||||
int ypos2 = ypos + normal_height - 1 - vert_inter_industry_space / 2;
|
||||
int xpos2 = xpos + industry_width - 1;
|
||||
GfxDrawLine(xpos, ypos1, xpos2, ypos1, INDUSTRY_LINE_COLOUR);
|
||||
GfxDrawLine(xpos, ypos1, xpos, ypos2, INDUSTRY_LINE_COLOUR);
|
||||
GfxDrawLine(xpos, ypos2, xpos2, ypos2, INDUSTRY_LINE_COLOUR);
|
||||
GfxDrawLine(xpos2, ypos1, xpos2, ypos2, INDUSTRY_LINE_COLOUR);
|
||||
DrawRectOutline({xpos, ypos1, xpos2, ypos2}, INDUSTRY_LINE_COLOUR);
|
||||
ypos += (normal_height - GetCharacterHeight(FS_NORMAL)) / 2;
|
||||
if (this->u.industry.ind_type < NUM_INDUSTRYTYPES) {
|
||||
const IndustrySpec *indsp = GetIndustrySpec(this->u.industry.ind_type);
|
||||
|
Reference in New Issue
Block a user