equal
deleted
inserted
replaced
680 /** |
680 /** |
681 * The StationView window |
681 * The StationView window |
682 */ |
682 */ |
683 struct StationViewWindow : public Window { |
683 struct StationViewWindow : public Window { |
684 uint32 cargo; ///< Bitmask of cargo types to expand |
684 uint32 cargo; ///< Bitmask of cargo types to expand |
685 size_t cargo_rows[NUM_CARGO]; ///< Header row for each cargo type |
685 uint16 cargo_rows[NUM_CARGO]; ///< Header row for each cargo type |
686 |
686 |
687 StationViewWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number) |
687 StationViewWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number) |
688 { |
688 { |
689 PlayerID owner = GetStation(window_number)->owner; |
689 PlayerID owner = GetStation(window_number)->owner; |
690 if (owner != OWNER_NONE) this->caption_color = owner; |
690 if (owner != OWNER_NONE) this->caption_color = owner; |
719 } else { |
719 } else { |
720 /* Add an entry for total amount of cargo of this type waiting. */ |
720 /* Add an entry for total amount of cargo of this type waiting. */ |
721 cargolist.push_back(CargoData(i, INVALID_STATION, st->goods[i].cargo.Count())); |
721 cargolist.push_back(CargoData(i, INVALID_STATION, st->goods[i].cargo.Count())); |
722 |
722 |
723 /* Set the row for this cargo entry for the expand/hide button */ |
723 /* Set the row for this cargo entry for the expand/hide button */ |
724 this->cargo_rows[i] = cargolist.size(); |
724 this->cargo_rows[i] = (uint16)cargolist.size(); |
725 |
725 |
726 /* Add an entry for each distinct cargo source. */ |
726 /* Add an entry for each distinct cargo source. */ |
727 const CargoList::List *packets = st->goods[i].cargo.Packets(); |
727 const CargoList::List *packets = st->goods[i].cargo.Packets(); |
728 for (CargoList::List::const_iterator it = packets->begin(); it != packets->end(); it++) { |
728 for (CargoList::List::const_iterator it = packets->begin(); it != packets->end(); it++) { |
729 const CargoPacket *cp = *it; |
729 const CargoPacket *cp = *it; |