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

Method FindChildWindowById

src/window.cpp:1064–1071  ·  view source on GitHub ↗

* Find the Window whose parent pointer points to this window * @param wc Window class of the window to find. * @param number Window number of the window to find. * @return a Window pointer that is the child of this window, or \c nullptr otherwise */

Source from the content-addressed store, hash-verified

1062 * @return a Window pointer that is the child of this window, or \c nullptr otherwise
1063 */
1064Window *Window::FindChildWindowById(WindowClass wc, WindowNumber number) const
1065{
1066 for (Window *v : Window::Iterate()) {
1067 if (wc == v->window_class && number == v->window_number && v->parent == this) return v;
1068 }
1069
1070 return nullptr;
1071}
1072
1073/**
1074 * Close all children a window might have in a head-recursive manner

Callers 1

CloseChildWindowByIdMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected