| 554 | } |
| 555 | |
| 556 | std::string GetWidgetString(WidgetID widget, StringID stringid) const override |
| 557 | { |
| 558 | switch (widget) { |
| 559 | case WID_GL_FILTER_BY_CARGO: |
| 560 | return GetString(this->GetCargoFilterLabel(this->cargo_filter_criteria)); |
| 561 | |
| 562 | case WID_GL_AVAILABLE_VEHICLES: |
| 563 | return GetString(STR_VEHICLE_LIST_AVAILABLE_TRAINS + this->vli.vtype); |
| 564 | |
| 565 | case WID_GL_CAPTION: |
| 566 | /* If selected_group == DEFAULT_GROUP || ALL_GROUP, draw the standard caption |
| 567 | * We list all vehicles or ungrouped vehicles */ |
| 568 | if (IsDefaultGroupID(this->vli.ToGroupID()) || IsAllGroupID(this->vli.ToGroupID())) { |
| 569 | return GetString(stringid, STR_COMPANY_NAME, this->vli.company, this->vehicles.size(), this->vehicles.size()); |
| 570 | } else { |
| 571 | uint num_vehicle = GetGroupNumVehicle(this->vli.company, this->vli.ToGroupID(), this->vli.vtype); |
| 572 | |
| 573 | return GetString(stringid, STR_GROUP_NAME, this->vli.ToGroupID(), num_vehicle, num_vehicle); |
| 574 | } |
| 575 | |
| 576 | default: |
| 577 | return this->Window::GetWidgetString(widget, stringid); |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | void OnPaint() override |
| 582 | { |
nothing calls this directly
no test coverage detected