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

Method ScriptDebugWindow

src/script/script_gui.cpp:749–772  ·  view source on GitHub ↗

* Constructor for the window. * @param desc The description of the window. * @param number The window number (actually unused). */

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 9

ChangeToScriptMethod · 0.95
InvalidFunction · 0.85
CreateNestedTreeMethod · 0.80
GetScrollbarMethod · 0.80
FinishInitNestedMethod · 0.80
SetStepSizeMethod · 0.80
SetFilterTermMethod · 0.80
AssignMethod · 0.45

Tested by

no test coverage detected