MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SelectCompanyLiveryWindow

Method SelectCompanyLiveryWindow

src/company_gui.cpp:697–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695
696public:
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 {

Callers

nothing calls this directly

Calls 10

BuildGroupListMethod · 0.95
SetRowsMethod · 0.95
SetSelectedGroupMethod · 0.95
InvalidFunction · 0.85
CreateNestedTreeMethod · 0.80
SetDisplayedPlaneMethod · 0.80
GetScrollbarMethod · 0.80
LowerWidgetMethod · 0.80
FinishInitNestedMethod · 0.80
InvalidateDataMethod · 0.45

Tested by

no test coverage detected