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

Method TownDirectoryWindow

src/town_gui.cpp:800–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798
799public:
800 TownDirectoryWindow(WindowDesc &desc) : Window(desc), townname_editbox(MAX_LENGTH_TOWN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_TOWN_NAME_CHARS)
801 {
802 this->CreateNestedTree();
803
804 this->vscroll = this->GetScrollbar(WID_TD_SCROLLBAR);
805
806 this->towns.SetListing(this->last_sorting);
807 this->towns.SetSortFuncs(TownDirectoryWindow::sorter_funcs);
808 this->towns.ForceRebuild();
809 this->BuildSortTownList();
810
811 this->FinishInitNested(0);
812
813 this->querystrings[WID_TD_FILTER] = &this->townname_editbox;
814 this->townname_editbox.cancel_button = QueryString::ACTION_CLEAR;
815 }
816
817 std::string GetWidgetString(WidgetID widget, StringID stringid) const override
818 {

Callers

nothing calls this directly

Calls 7

BuildSortTownListMethod · 0.95
CreateNestedTreeMethod · 0.80
GetScrollbarMethod · 0.80
SetListingMethod · 0.80
SetSortFuncsMethod · 0.80
ForceRebuildMethod · 0.80
FinishInitNestedMethod · 0.80

Tested by

no test coverage detected