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

Function CloseWindowByClass

src/window.cpp:1207–1215  ·  view source on GitHub ↗

* Close all windows of a given class * @param cls Window class of windows to delete */

Source from the content-addressed store, hash-verified

1205 * @param cls Window class of windows to delete
1206 */
1207void CloseWindowByClass(WindowClass cls, int data)
1208{
1209 /* Note: the container remains stable, even when deleting windows. */
1210 for (Window *w : Window::Iterate()) {
1211 if (w->window_class == cls) {
1212 w->Close(data);
1213 }
1214 }
1215}
1216
1217/**
1218 * Close all windows of a company. We identify windows of a company

Callers 15

ShowRenameSignWindowFunction · 0.85
OpenGRFParameterWindowFunction · 0.85
CloseMethod · 0.85
UpgradeCurrentMethod · 0.85
OnClickMethod · 0.85
OnDropdownSelectMethod · 0.85
OnKeyPressMethod · 0.85
ShowNewGRFSettingsFunction · 0.85
ShowSavePresetWindowFunction · 0.85
ShowSetDateWindowFunction · 0.85
RelocateAllWindowsFunction · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected