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

Method ConstructWindow

src/textfile_gui.cpp:93–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void TextfileWindow::ConstructWindow()
94{
95 this->CreateNestedTree();
96 this->vscroll = this->GetScrollbar(WID_TF_VSCROLLBAR);
97 this->hscroll = this->GetScrollbar(WID_TF_HSCROLLBAR);
98 this->GetWidget<NWidgetCore>(WID_TF_CAPTION)->SetStringTip(STR_TEXTFILE_README_CAPTION + this->file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS);
99 this->GetWidget<NWidgetStacked>(WID_TF_SEL_JUMPLIST)->SetDisplayedPlane(SZSP_HORIZONTAL);
100 this->FinishInitNested(this->file_type);
101
102 this->DisableWidget(WID_TF_NAVBACK);
103 this->DisableWidget(WID_TF_NAVFORWARD);
104 this->hscroll->SetStepSize(10); // Speed up horizontal scrollbar
105}
106
107/**
108 * Reset the reflow process to start on the next UI tick.

Callers

nothing calls this directly

Calls 7

CreateNestedTreeMethod · 0.80
GetScrollbarMethod · 0.80
SetStringTipMethod · 0.80
SetDisplayedPlaneMethod · 0.80
FinishInitNestedMethod · 0.80
DisableWidgetMethod · 0.80
SetStepSizeMethod · 0.80

Tested by

no test coverage detected