MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / onTextInput

Method onTextInput

src/openrct2-ui/windows/Cheats.cpp:685–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683 }
684
685 void onTextInput(WidgetIndex widgetIndex, std::string_view text) override
686 {
687 if (page == WINDOW_CHEATS_PAGE_MONEY && widgetIndex == WIDX_MONEY_SPINNER)
688 {
689 auto val = StringToMoney(std::string(text).c_str());
690 if (val != kMoney64Undefined)
691 {
692 _moneySpinnerValue = val;
693 }
694 invalidate();
695 }
696 }
697
698 StringWithArgs onTooltip(WidgetIndex widgetIndex, StringId fallback) override
699 {

Callers

nothing calls this directly

Calls 2

StringToMoneyFunction · 0.85
invalidateFunction · 0.50

Tested by

no test coverage detected