Feature: Variable GUI scale.

GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
This commit is contained in:
Peter Nelson
2021-04-20 11:49:20 +01:00
committed by PeterN
parent 13d271217f
commit 9666e46739
22 changed files with 175 additions and 205 deletions

View File

@@ -1159,7 +1159,7 @@ struct MessageHistoryWindow : Window {
/* Months are off-by-one, so it's actually 8. Not using
* month 12 because the 1 is usually less wide. */
SetDParam(0, ConvertYMDToDate(ORIGINAL_MAX_YEAR, 7, 30));
this->date_width = GetStringBoundingBox(STR_SHORT_DATE).width + ScaleFontTrad(5);
this->date_width = GetStringBoundingBox(STR_SHORT_DATE).width + ScaleGUITrad(5);
size->height = 4 * resize->height + WidgetDimensions::scaled.framerect.Vertical(); // At least 4 lines are visible.
size->width = std::max(200u, size->width); // At least 200 pixels wide.