| 695 | |
| 696 | public: |
| 697 | SelectCompanyLiveryWindow(WindowDesc &desc, CompanyID company, GroupID group) : Window(desc) |
| 698 | { |
| 699 | this->CreateNestedTree(); |
| 700 | this->GetWidget<NWidgetStacked>(WID_SCL_SEC_COL_DROP_SEL)->SetDisplayedPlane(_loaded_newgrf_features.has_2CC ? 0 : SZSP_NONE); |
| 701 | this->vscroll = this->GetScrollbar(WID_SCL_MATRIX_SCROLLBAR); |
| 702 | |
| 703 | if (group == GroupID::Invalid()) { |
| 704 | this->livery_class = LC_OTHER; |
| 705 | this->sel = 1; |
| 706 | this->LowerWidget(WID_SCL_CLASS_GENERAL); |
| 707 | this->BuildGroupList(company); |
| 708 | this->SetRows(); |
| 709 | } else { |
| 710 | this->SetSelectedGroup(company, group); |
| 711 | } |
| 712 | |
| 713 | this->FinishInitNested(company); |
| 714 | this->owner = company; |
| 715 | this->InvalidateData(1); |
| 716 | } |
| 717 | |
| 718 | void SetSelectedGroup(CompanyID company, GroupID group) |
| 719 | { |
nothing calls this directly
no test coverage detected