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

Method OnOk

src/misc_gui.cpp:940–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938 }
939
940 void OnOk()
941 {
942 if (!this->editbox.orig.has_value() || this->editbox.text.GetText() != this->editbox.orig) {
943 assert(this->parent != nullptr);
944
945 this->parent->OnQueryTextFinished(std::string{this->editbox.text.GetText()});
946 this->editbox.handled = true;
947 }
948 }
949
950 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
951 {

Callers 1

OnClickMethod · 0.95

Calls 2

GetTextMethod · 0.45
OnQueryTextFinishedMethod · 0.45

Tested by

no test coverage detected