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

Method Close

src/newgrf_gui.cpp:663–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661 }
662
663 void Close([[maybe_unused]] int data = 0) override
664 {
665 CloseWindowByClass(WC_GRF_PARAMETERS);
666 CloseWindowByClass(WC_SAVE_PRESET);
667
668 if (this->editable && this->modified && !this->execute && !_exit_game) {
669 CopyGRFConfigList(this->orig_list, this->actives, true);
670 ResetGRFConfig(false);
671 ReloadNewGRFData();
672 }
673
674 this->Window::Close();
675 }
676
677 int GetCurrentActivePosition() const
678 {

Callers 1

OnClickMethod · 0.45

Calls 4

CloseWindowByClassFunction · 0.85
CopyGRFConfigListFunction · 0.85
ResetGRFConfigFunction · 0.85
ReloadNewGRFDataFunction · 0.85

Tested by

no test coverage detected