Codechange: Simplify some calls to DrawStringMultiLine(). (#13643)

Sometimes the bottom is passed as UINT16_MAX for no reason. In this case just pass the rect.

Other times it's to extend the window height; in that case just extend the rect itself.
This commit is contained in:
Peter Nelson
2025-02-22 20:41:40 +00:00
committed by GitHub
parent b264a4864b
commit 4ac81656ee
4 changed files with 11 additions and 13 deletions

View File

@@ -326,7 +326,7 @@ public:
if (!lt->header.empty()) {
SetDParamStr(0, lt->header);
ir.top = DrawStringMultiLine(ir.left, ir.right, ir.top, UINT16_MAX, STR_JUST_RAW_STRING, TC_BLACK) + WidgetDimensions::scaled.vsep_wide;
ir.top = DrawStringMultiLine(ir, STR_JUST_RAW_STRING, TC_BLACK) + WidgetDimensions::scaled.vsep_wide;
}
int icon_y_offset = (this->line_height - this->icon_size.height) / 2;
@@ -354,7 +354,7 @@ public:
if (!lt->footer.empty()) {
ir.top += WidgetDimensions::scaled.vsep_wide;
SetDParamStr(0, lt->footer);
ir.top = DrawStringMultiLine(ir.left, ir.right, ir.top, UINT16_MAX, STR_JUST_RAW_STRING, TC_BLACK);
ir.top = DrawStringMultiLine(ir, STR_JUST_RAW_STRING, TC_BLACK);
}
}