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

Method OnQueryTextFinished

src/game/game_gui.cpp:348–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346 }
347
348 void OnQueryTextFinished(std::optional<std::string> str) override
349 {
350 if (!str.has_value()) return;
351 auto value = ParseInteger<int32_t>(*str, 10, true);
352 if (!value.has_value()) return;
353 this->SetValue(*value);
354 }
355
356 void OnDropdownSelect(WidgetID widget, int index, int) override
357 {

Callers

nothing calls this directly

Calls 1

SetValueMethod · 0.95

Tested by

no test coverage detected