equal
deleted
inserted
replaced
719 gd.month = 0xFF; |
719 gd.month = 0xFF; |
720 gd.x_values_start = 10; |
720 gd.x_values_start = 10; |
721 gd.x_values_increment = 10; |
721 gd.x_values_increment = 10; |
722 |
722 |
723 uint i = 0; |
723 uint i = 0; |
724 for (CargoID c = 0; c != NUM_CARGO; c++) { |
724 for (CargoID c = 0; c < NUM_CARGO; c++) { |
725 const CargoSpec *cs = GetCargo(c); |
725 const CargoSpec *cs = GetCargo(c); |
726 if (!cs->IsValid()) continue; |
726 if (!cs->IsValid()) continue; |
727 |
727 |
728 /* Only draw labels for widgets that exist. If the widget doesn't |
728 /* Only draw labels for widgets that exist. If the widget doesn't |
729 * exist then the local player has used the climate cheat or |
729 * exist then the local player has used the climate cheat or |
789 Window *w = AllocateWindowDescFront(&_cargo_payment_rates_desc, 0); |
789 Window *w = AllocateWindowDescFront(&_cargo_payment_rates_desc, 0); |
790 if (w == NULL) return; |
790 if (w == NULL) return; |
791 |
791 |
792 /* Count the number of active cargo types */ |
792 /* Count the number of active cargo types */ |
793 uint num_active = 0; |
793 uint num_active = 0; |
794 for (CargoID c = 0; c != NUM_CARGO; c++) { |
794 for (CargoID c = 0; c < NUM_CARGO; c++) { |
795 if (GetCargo(c)->IsValid()) num_active++; |
795 if (GetCargo(c)->IsValid()) num_active++; |
796 } |
796 } |
797 |
797 |
798 /* Resize the window to fit the cargo types */ |
798 /* Resize the window to fit the cargo types */ |
799 ResizeWindow(w, 0, num_active * 8); |
799 ResizeWindow(w, 0, num_active * 8); |