Codechange: use TimerGameCalendar::Year and friends when working with years (#11188)

This commit is contained in:
Patric Stout
2023-08-12 16:02:31 +02:00
committed by GitHub
parent 01f55eb734
commit b7acf9e50e
8 changed files with 13 additions and 13 deletions

View File

@@ -193,7 +193,7 @@ struct TimetableWindow : Window {
{
switch (widget) {
case WID_VT_ARRIVAL_DEPARTURE_PANEL:
SetDParamMaxValue(1, MAX_YEAR * DAYS_IN_YEAR, 0, FS_SMALL);
SetDParamMaxValue(1, DateAtStartOfYear(MAX_YEAR), 0, FS_SMALL);
size->width = std::max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE).width) + WidgetDimensions::scaled.hsep_wide + padding.width;
FALLTHROUGH;