MCPcopy Create free account
hub / github.com/WiVRn/WiVRn / InputText

Function InputText

client/render/imgui_impl.cpp:1401–1417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1399}
1400
1401void InputText(const char * label, std::string & text, const ImVec2 & size, ImGuiInputTextFlags flags)
1402{
1403 auto callback = [](ImGuiInputTextCallbackData * data) -> int {
1404 std::string & text = *reinterpret_cast<std::string *>(data->UserData);
1405
1406 if (data->EventFlag == ImGuiInputTextFlags_CallbackResize)
1407 {
1408 assert(text.data() == data->Buf);
1409 text.resize(data->BufTextLen);
1410 data->Buf = text.data();
1411 }
1412
1413 return 0;
1414 };
1415
1416 ImGui::InputTextEx(label, nullptr, text.data(), text.size() + 1, size, flags | ImGuiInputTextFlags_CallbackResize, callback, &text);
1417}
1418
1419bool RadioButtonWithoutCheckBox(const std::string & label, bool active, ImVec2 size_arg)
1420{

Callers 1

gui_new_serverMethod · 0.85

Calls 3

dataMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected