| 798 | |
| 799 | public: |
| 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 | { |
nothing calls this directly
no test coverage detected