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

Method setText

src/openrct2-ui/windows/TextInput.cpp:115–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113 }
114
115 void setText(std::string_view text, size_t maxLength)
116 {
117 text = String::utf8TruncateCodePoints(text, maxLength);
118 _buffer = u8string{ text };
119 _maxInputLength = maxLength;
120 SetTexboxSession(ContextStartTextInput(_buffer, maxLength));
121 }
122
123 void setCallback(std::function<void(std::string_view)> callback, std::function<void()> cancelCallback)
124 {

Callers 3

WindowTextInputRawOpenFunction · 0.80
WindowTextInputOpenFunction · 0.80

Calls 3

utf8TruncateCodePointsFunction · 0.85
SetTexboxSessionFunction · 0.85
ContextStartTextInputFunction · 0.85

Tested by

no test coverage detected