|
@@ -91,49 +91,49 @@ static void DrawSubsidiesWindow(Window *
|
|
|
if (s->cargo_type != 0xFF && s->age < 12) {
|
|
|
SetupSubsidyDecodeParam(s, 1);
|
|
|
x2 = DrawString(x+2, y, STR_2027_FROM_TO, 0);
|
|
|
|
|
|
SetDParam(0, _date - ymd.day + 384 - s->age * 32);
|
|
|
DrawString(x2, y, STR_2028_BY, 0);
|
|
|
y += 10;
|
|
|
num++;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (num == 0) {
|
|
|
DrawString(x+2, y, STR_202A_NONE, 0);
|
|
|
y += 10;
|
|
|
}
|
|
|
|
|
|
DrawString(x, y+1, STR_202B_SERVICES_ALREADY_SUBSIDISED, 0);
|
|
|
y += 10;
|
|
|
num = 0;
|
|
|
|
|
|
for(s=_subsidies; s != endof(_subsidies); s++) {
|
|
|
if (s->cargo_type != 0xFF && s->age >= 12) {
|
|
|
SetupSubsidyDecodeParam(s, 1);
|
|
|
|
|
|
p = DEREF_PLAYER(GetStation(s->to)->owner);
|
|
|
p = GetPlayer(GetStation(s->to)->owner);
|
|
|
SetDParam(3, p->name_1);
|
|
|
SetDParam(4, p->name_2);
|
|
|
|
|
|
xt = DrawString(x+2, y, STR_202C_FROM_TO, 0);
|
|
|
|
|
|
SetDParam(0, _date - ymd.day + 768 - s->age * 32);
|
|
|
DrawString(xt, y, STR_202D_UNTIL, 0);
|
|
|
y += 10;
|
|
|
num++;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (num == 0) {
|
|
|
DrawString(x+2, y, STR_202A_NONE, 0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static void SubsidiesListWndProc(Window *w, WindowEvent *e)
|
|
|
{
|
|
|
switch(e->event) {
|
|
|
case WE_PAINT: DrawSubsidiesWindow(w); break;
|
|
|
case WE_CLICK: {
|
|
|
switch(e->click.widget) {
|
|
|
case 2: HandleSubsidyClick(e->click.pt.y - 25); break;
|