* Constructor for the window. * @param desc The description of the window. * @param number The window number (actually unused). */
| 747 | * @param number The window number (actually unused). |
| 748 | */ |
| 749 | ScriptDebugWindow(WindowDesc &desc, WindowNumber number, Owner show_company) : Window(desc), break_editbox(MAX_BREAK_STR_STRING_LENGTH) |
| 750 | { |
| 751 | this->filter = ScriptDebugWindow::initial_state; |
| 752 | this->break_string_filter = {&this->filter.case_sensitive_break_check, false}; |
| 753 | |
| 754 | this->CreateNestedTree(); |
| 755 | this->vscroll = this->GetScrollbar(WID_SCRD_VSCROLLBAR); |
| 756 | this->hscroll = this->GetScrollbar(WID_SCRD_HSCROLLBAR); |
| 757 | this->FinishInitNested(number); |
| 758 | |
| 759 | this->querystrings[WID_SCRD_BREAK_STR_EDIT_BOX] = &this->break_editbox; |
| 760 | |
| 761 | this->hscroll->SetStepSize(10); // Speed up horizontal scrollbar |
| 762 | |
| 763 | /* Restore the break string value from static variable, and enable the filter. */ |
| 764 | this->break_editbox.text.Assign(this->filter.break_string); |
| 765 | this->break_string_filter.SetFilterTerm(this->filter.break_string); |
| 766 | |
| 767 | if (show_company == CompanyID::Invalid()) { |
| 768 | this->SelectValidDebugCompany(); |
| 769 | } else { |
| 770 | this->ChangeToScript(show_company); |
| 771 | } |
| 772 | } |
| 773 | |
| 774 | void OnInit() override |
| 775 | { |
nothing calls this directly
no test coverage detected