| 553 | } |
| 554 | |
| 555 | std::string GetWidgetString(WidgetID widget, StringID stringid) const override |
| 556 | { |
| 557 | if (widget == WID_STL_CAPTION) { |
| 558 | return GetString(STR_STATION_LIST_CAPTION, this->window_number, this->vscroll->GetCount()); |
| 559 | } |
| 560 | |
| 561 | if (widget == WID_STL_CARGODROPDOWN) { |
| 562 | if (this->filter.cargoes == 0) return GetString(this->filter.include_no_rating ? STR_STATION_LIST_CARGO_FILTER_ONLY_NO_RATING : STR_STATION_LIST_CARGO_FILTER_NO_CARGO_TYPES); |
| 563 | if (this->filter.cargoes == _cargo_mask) return GetString(this->filter.include_no_rating ? STR_STATION_LIST_CARGO_FILTER_ALL_AND_NO_RATING : STR_CARGO_TYPE_FILTER_ALL); |
| 564 | if (CountBits(this->filter.cargoes) == 1 && !this->filter.include_no_rating) return GetString(CargoSpec::Get(FindFirstBit(this->filter.cargoes))->name); |
| 565 | return GetString(STR_STATION_LIST_CARGO_FILTER_MULTIPLE); |
| 566 | } |
| 567 | |
| 568 | return this->Window::GetWidgetString(widget, stringid); |
| 569 | } |
| 570 | |
| 571 | DropDownList BuildCargoDropDownList(bool expanded) const |
| 572 | { |
nothing calls this directly
no test coverage detected