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

Method InitializeWindow

src/graph_gui.cpp:835–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

833 BaseCompanyGraphWindow(WindowDesc &desc, StringID format_str_y_axis) : BaseGraphWindow(desc, format_str_y_axis) {}
834
835 void InitializeWindow(WindowNumber number)
836 {
837 /* Initialise the dataset */
838 this->UpdateStatistics(true);
839
840 this->CreateNestedTree();
841
842 auto *wid = this->GetWidget<NWidgetCore>(WID_GRAPH_FOOTER);
843 wid->SetString(TimerGameEconomy::UsingWallclockUnits() ? STR_GRAPH_LAST_72_MINUTES_TIME_LABEL : STR_EMPTY);
844
845 this->FinishInitNested(number);
846 }
847
848 /**
849 * Update the statistics.

Callers

nothing calls this directly

Calls 4

UpdateStatisticsMethod · 0.95
CreateNestedTreeMethod · 0.80
FinishInitNestedMethod · 0.80
SetStringMethod · 0.45

Tested by

no test coverage detected