mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Use economy dates for subsidy date displays
parent
7ab048195d
commit
02302a9fe9
|
@ -142,8 +142,8 @@ struct SubsidyListWindow : Window {
|
|||
{
|
||||
if (widget != WID_SUL_PANEL) return;
|
||||
|
||||
TimerGameCalendar::YearMonthDay ymd;
|
||||
TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::date, &ymd);
|
||||
TimerGameEconomy::YearMonthDay ymd;
|
||||
TimerGameEconomy::ConvertDateToYMD(TimerGameEconomy::date, &ymd);
|
||||
|
||||
Rect tr = r.Shrink(WidgetDimensions::scaled.framerect);
|
||||
|
||||
|
@ -160,7 +160,7 @@ struct SubsidyListWindow : Window {
|
|||
if (IsInsideMM(pos, 0, cap)) {
|
||||
/* Displays the two offered towns */
|
||||
SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::Gui);
|
||||
SetDParam(7, TimerGameCalendar::date - ymd.day + s->remaining * 32);
|
||||
SetDParam(7, TimerGameEconomy::date - ymd.day + s->remaining * 32);
|
||||
DrawString(tr.left, tr.right, tr.top + pos * GetCharacterHeight(FS_NORMAL), STR_SUBSIDIES_OFFERED_FROM_TO);
|
||||
}
|
||||
pos++;
|
||||
|
@ -184,7 +184,7 @@ struct SubsidyListWindow : Window {
|
|||
if (IsInsideMM(pos, 0, cap)) {
|
||||
SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::Gui);
|
||||
SetDParam(7, s->awarded);
|
||||
SetDParam(8, TimerGameCalendar::date - ymd.day + s->remaining * 32);
|
||||
SetDParam(8, TimerGameEconomy::date - ymd.day + s->remaining * 32);
|
||||
|
||||
/* Displays the two connected stations */
|
||||
DrawString(tr.left, tr.right, tr.top + pos * GetCharacterHeight(FS_NORMAL), STR_SUBSIDIES_SUBSIDISED_FROM_TO);
|
||||
|
|
Loading…
Reference in New Issue