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

Method CloseChildWindowById

src/window.cpp:1092–1099  ·  view source on GitHub ↗

* Close all children a window might have in a head-recursive manner * @param wc Window class of the window to remove. * @param number Window number of the window to remove. */

Source from the content-addressed store, hash-verified

1090 * @param number Window number of the window to remove.
1091 */
1092void Window::CloseChildWindowById(WindowClass wc, WindowNumber number) const
1093{
1094 Window *child = this->FindChildWindowById(wc, number);
1095 while (child != nullptr) {
1096 child->Close();
1097 child = this->FindChildWindowById(wc, number);
1098 }
1099}
1100
1101/**
1102 * Hide the window and all its child windows, and mark them for a later deletion.

Callers 5

ShowNewGRFTextfileWindowFunction · 0.80
ShowScriptTextfileWindowFunction · 0.80

Calls 2

FindChildWindowByIdMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected