1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

Change: Use Rect helpers for widget drawing.

This replaces repetitive and sometimes unwieldy use of constants.
This commit is contained in:
2022-10-15 16:55:47 +01:00
committed by PeterN
parent cb10ed1509
commit 6f95e04005
41 changed files with 792 additions and 809 deletions

View File

@@ -287,8 +287,8 @@ public:
int extra = (r.Height() - this->height_summary - this->height_detailed - WD_PAR_VSEP_WIDE) / 2;
/* Note: NewGRF supplied error message often do not start with a colour code, so default to white. */
DrawStringMultiLine(r.SetHeight(this->height_summary + extra, false), this->summary_msg, TC_WHITE, SA_CENTER);
DrawStringMultiLine(r.SetHeight(this->height_detailed + extra, true), this->detailed_msg, TC_WHITE, SA_CENTER);
DrawStringMultiLine(r.WithHeight(this->height_summary + extra, false), this->summary_msg, TC_WHITE, SA_CENTER);
DrawStringMultiLine(r.WithHeight(this->height_detailed + extra, true), this->detailed_msg, TC_WHITE, SA_CENTER);
}
if (this->textref_stack_size > 0) StopTextRefStackUsage();