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

Method OnQueryTextFinished

src/script/script_gui.cpp:486–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484 }
485
486 void OnQueryTextFinished(std::optional<std::string> str) override
487 {
488 if (!str.has_value()) return;
489 auto value = ParseInteger<int32_t>(*str, 10, true);
490 if (!value.has_value()) return;
491 this->SetValue(*value);
492 }
493
494 void OnDropdownSelect(WidgetID widget, int index, int) override
495 {

Callers

nothing calls this directly

Calls 1

SetValueMethod · 0.95

Tested by

no test coverage detected