| 391 | } |
| 392 | |
| 393 | void WindowTextInputOpen( |
| 394 | std::string_view title, std::string_view description, std::string_view initialValue, size_t maxLength, |
| 395 | std::function<void(std::string_view)> callback, std::function<void()> cancelCallback) |
| 396 | { |
| 397 | auto* windowMgr = GetWindowManager(); |
| 398 | auto w = windowMgr->Create<TextInputWindow>( |
| 399 | WindowClass::textinput, { kWindowSize.width, kWindowSize.height + 10 }, |
| 400 | { WindowFlag::centreScreen, WindowFlag::stickToFront }); |
| 401 | if (w != nullptr) |
| 402 | { |
| 403 | w->setTitle(title, description); |
| 404 | w->setText(initialValue, maxLength); |
| 405 | w->setCallback(callback, cancelCallback); |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | void WindowTextInputOpen( |
| 410 | WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, |
no test coverage detected