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

Method ExecuteCallback

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

Source from the content-addressed store, hash-verified

328 }
329
330 void ExecuteCallback(bool hasValue)
331 {
332 if (HasParentWindow())
333 {
334 if (hasValue)
335 {
336 auto w = GetParentWindow();
337 if (w != nullptr)
338 {
339 w->onTextInput(_parentWidget.widgetIndex, _buffer);
340 }
341 }
342 }
343 else
344 {
345 if (hasValue)
346 {
347 if (_callback)
348 {
349 _callback(_buffer.data());
350 }
351 }
352 else
353 {
354 if (_cancelCallback)
355 {
356 _cancelCallback();
357 }
358 }
359 }
360 }
361
362 bool HasParentWindow() const
363 {

Callers

nothing calls this directly

Calls 2

onTextInputMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected