| 46 | } // namespace Internal |
| 47 | |
| 48 | inline Result InputText(const char* name, Buffer& buffer, String& str, bool& modified) |
| 49 | { |
| 50 | SC_TRY(Internal::PrepareInputTextBuffer(buffer, str)); |
| 51 | if (ImGui::InputText(name, buffer.data(), buffer.size(), ImGuiInputTextFlags_CallbackResize, |
| 52 | Internal::InputTextFuncs::MyResizeCallback, &buffer)) |
| 53 | { |
| 54 | modified = true; |
| 55 | SC_TRY(str.assign(StringView::fromNullTerminated(buffer.data(), StringEncoding::Utf8))); |
| 56 | } |
| 57 | return Result(true); |
| 58 | } |
| 59 | |
| 60 | inline Result InputTextMultiline(const char* name, Buffer& buffer, String& str, ImVec2 size, bool& modified) |
| 61 | { |
no test coverage detected