539 if (st->goods[i].enroute_from != station_id) num++; |
539 if (st->goods[i].enroute_from != station_id) num++; |
540 } |
540 } |
541 } |
541 } |
542 SetVScrollCount(w, num); |
542 SetVScrollCount(w, num); |
543 |
543 |
544 w->disabled_state = st->owner == _local_player ? 0 : (1 << 9); |
544 SetWindowWidgetDisabledState(w, 9, st->owner != _local_player); |
545 |
545 SetWindowWidgetDisabledState(w, 10, !(st->facilities & FACIL_TRAIN)); |
546 if (!(st->facilities & FACIL_TRAIN)) SETBIT(w->disabled_state, 10); |
546 SetWindowWidgetDisabledState(w, 11, !(st->facilities & FACIL_TRUCK_STOP) && !(st->facilities & FACIL_BUS_STOP)); |
547 if (!(st->facilities & FACIL_TRUCK_STOP) && |
547 SetWindowWidgetDisabledState(w, 12, !(st->facilities & FACIL_AIRPORT)); |
548 !(st->facilities & FACIL_BUS_STOP)) SETBIT(w->disabled_state, 11); |
548 SetWindowWidgetDisabledState(w, 13, !(st->facilities & FACIL_DOCK)); |
549 if (!(st->facilities & FACIL_AIRPORT)) SETBIT(w->disabled_state, 12); |
|
550 if (!(st->facilities & FACIL_DOCK)) SETBIT(w->disabled_state, 13); |
|
551 |
549 |
552 SetDParam(0, st->index); |
550 SetDParam(0, st->index); |
553 SetDParam(1, st->facilities); |
551 SetDParam(1, st->facilities); |
554 DrawWindowWidgets(w); |
552 DrawWindowWidgets(w); |
555 |
553 |