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

Method FinishInitNested

src/window.cpp:1809–1817  ·  view source on GitHub ↗

* Perform the second part of the initialization of a nested widget tree. * @param window_number Number of the new window. */

Source from the content-addressed store, hash-verified

1807 * @param window_number Number of the new window.
1808 */
1809void Window::FinishInitNested(WindowNumber window_number)
1810{
1811 this->nested_root->AdjustPaddingForZoom();
1812 this->InitializeData(window_number);
1813 this->ApplyDefaults();
1814 Point pt = this->OnInitialPosition(this->nested_root->smallest_x, this->nested_root->smallest_y, window_number);
1815 this->InitializePositionSize(pt.x, pt.y, this->nested_root->smallest_x, this->nested_root->smallest_y);
1816 this->FindWindowPlacementAndResize(this->window_desc.GetDefaultWidth(), this->window_desc.GetDefaultHeight(), true);
1817}
1818
1819/**
1820 * Perform complete initialization of the #Window with nested widgets, to allow use.

Callers 15

InitNestedMethod · 0.95
SubsidyListWindowMethod · 0.80
SelectGameWindowMethod · 0.80
SignListWindowMethod · 0.80
SaveLoadWindowMethod · 0.80
ReplaceVehicleWindowMethod · 0.80
GoalListWindowMethod · 0.80
GoalQuestionWindowMethod · 0.80
NewGRFWindowMethod · 0.80

Calls 8

InitializeDataMethod · 0.95
ApplyDefaultsMethod · 0.95
OnInitialPositionMethod · 0.95
AdjustPaddingForZoomMethod · 0.80
GetDefaultWidthMethod · 0.80
GetDefaultHeightMethod · 0.80

Tested by

no test coverage detected