equal
deleted
inserted
replaced
492 |
492 |
493 w->resize.step_height = 14; |
493 w->resize.step_height = 14; |
494 w->resize.height = w->height - 14 * 4; /* Minimum of 4 vehicles in the display */ |
494 w->resize.height = w->height - 14 * 4; /* Minimum of 4 vehicles in the display */ |
495 |
495 |
496 if (tile != 0) { |
496 if (tile != 0) { |
497 w->caption_color = _map_owner[tile]; |
497 w->caption_color = GetTileOwner(tile); |
498 } else { |
498 } else { |
499 w->caption_color = _local_player; |
499 w->caption_color = _local_player; |
500 } |
500 } |
501 } |
501 } |
502 |
502 |
508 Depot *depot; |
508 Depot *depot; |
509 |
509 |
510 tile = w->window_number; |
510 tile = w->window_number; |
511 |
511 |
512 /* setup disabled buttons */ |
512 /* setup disabled buttons */ |
513 w->disabled_state = (_map_owner[tile]==_local_player) ? 0 : ((1<<4)|(1<<7)); |
513 w->disabled_state = |
|
514 IsTileOwner(tile, _local_player) ? 0 : ((1 << 4) | (1 << 7)); |
514 |
515 |
515 /* determine amount of items for scroller */ |
516 /* determine amount of items for scroller */ |
516 num = 0; |
517 num = 0; |
517 FOR_ALL_VEHICLES(v) { |
518 FOR_ALL_VEHICLES(v) { |
518 if (v->type == VEH_Road && v->u.road.state == 254 && |
519 if (v->type == VEH_Road && v->u.road.state == 254 && |
732 { |
733 { |
733 Window *w; |
734 Window *w; |
734 |
735 |
735 w = AllocateWindowDescFront(&_road_depot_desc, tile); |
736 w = AllocateWindowDescFront(&_road_depot_desc, tile); |
736 if (w) { |
737 if (w) { |
737 w->caption_color = _map_owner[w->window_number]; |
738 w->caption_color = GetTileOwner(w->window_number); |
738 w->hscroll.cap = 5; |
739 w->hscroll.cap = 5; |
739 w->vscroll.cap = 3; |
740 w->vscroll.cap = 3; |
740 w->resize.step_width = 56; |
741 w->resize.step_width = 56; |
741 w->resize.step_height = 14; |
742 w->resize.step_height = 14; |
742 WP(w,traindepot_d).sel = INVALID_VEHICLE; |
743 WP(w,traindepot_d).sel = INVALID_VEHICLE; |