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

Method OnQueryTextFinished

src/company_gui.cpp:1502–1515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1500 }
1501
1502 void OnQueryTextFinished(std::optional<std::string> str) override
1503 {
1504 if (!str.has_value()) return;
1505 /* Parse new company manager face number */
1506 auto cmf = ParseCompanyManagerFaceCode(*str);
1507 if (cmf.has_value()) {
1508 this->face = *cmf;
1509 ShowErrorMessage(GetEncodedString(STR_FACE_FACECODE_SET), {}, WL_INFO);
1510 this->UpdateData();
1511 this->SetDirty();
1512 } else {
1513 ShowErrorMessage(GetEncodedString(STR_FACE_FACECODE_ERR), {}, WL_INFO);
1514 }
1515 }
1516};
1517
1518/** Company manager face selection window description */

Callers

nothing calls this directly

Calls 5

UpdateDataMethod · 0.95
ShowErrorMessageFunction · 0.85
GetEncodedStringFunction · 0.70
SetDirtyMethod · 0.45

Tested by

no test coverage detected