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

Method OnInvalidateData

src/script/script_gui.cpp:529–536  ·  view source on GitHub ↗

* Some data on this window has become invalid. * @param data Information about the changed data. * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details. */

Source from the content-addressed store, hash-verified

527 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
528 */
529 void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
530 {
531 this->script_config = GetConfig(this->slot);
532 if (this->script_config->GetConfigList()->empty()) this->Close();
533 this->RebuildVisibleSettings();
534 this->CloseChildWindows(WC_DROPDOWN_MENU);
535 this->CloseChildWindows(WC_QUERY_STRING);
536 }
537
538private:
539 bool IsEditableItem(const ScriptConfigItem &config_item) const

Callers 1

ScriptSettingsWindowMethod · 0.95

Calls 6

GetConfigFunction · 0.85
CloseChildWindowsMethod · 0.80
emptyMethod · 0.45
GetConfigListMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected