src/station_gui.cpp
changeset 10751 ebd94f2d6385
parent 10749 b8ac8a8e27c4
child 10752 332994dbea4e
equal deleted inserted replaced
10749:b8ac8a8e27c4 10751:ebd94f2d6385
   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 	uint16 cargo_rows[NUM_CARGO]; ///< Header row for each cargo type
   685 	size_t 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;
   749 						if (!added) cargolist.push_back(CargoData(i, cp->source, cp->count));
   749 						if (!added) cargolist.push_back(CargoData(i, cp->source, cp->count));
   750 					}
   750 					}
   751 				}
   751 				}
   752 			}
   752 			}
   753 		}
   753 		}
   754 		SetVScrollCount(this, cargolist.size() + 1); // update scrollbar
   754 		SetVScrollCount(this, (int)cargolist.size() + 1); // update scrollbar
   755 
   755 
   756 		/* disable some buttons */
   756 		/* disable some buttons */
   757 		this->SetWidgetDisabledState(SVW_RENAME,   st->owner != _local_player);
   757 		this->SetWidgetDisabledState(SVW_RENAME,   st->owner != _local_player);
   758 		this->SetWidgetDisabledState(SVW_TRAINS,   !(st->facilities & FACIL_TRAIN));
   758 		this->SetWidgetDisabledState(SVW_TRAINS,   !(st->facilities & FACIL_TRAIN));
   759 		this->SetWidgetDisabledState(SVW_ROADVEHS, !(st->facilities & FACIL_TRUCK_STOP) && !(st->facilities & FACIL_BUS_STOP));
   759 		this->SetWidgetDisabledState(SVW_ROADVEHS, !(st->facilities & FACIL_TRUCK_STOP) && !(st->facilities & FACIL_BUS_STOP));