MCPcopy Create free account
hub / github.com/chrxh/alien / InputTextMultiline

Method InputTextMultiline

source/Gui/AlienImGui.cpp:448–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448void AlienImGui::InputTextMultiline(InputTextMultilineParameters const& parameters, std::string& text)
449{
450 static char buffer[1024*16];
451 StringHelper::copy(buffer, IM_ARRAYSIZE(buffer), text);
452
453 auto textWidth = StyleRepository::get().scale(parameters._textWidth);
454 auto height = parameters._height == 0
455 ? ImGui::GetContentRegionAvail().y
456 : StyleRepository::get().scale(parameters._height);
457
458 ImGui::InputTextEx(
459 ("##" + parameters._name).c_str(),
460 parameters._hint.c_str(),
461 buffer,
462 IM_ARRAYSIZE(buffer),
463 {ImGui::GetContentRegionAvail().x - textWidth, height},
464 ImGuiInputTextFlags_Multiline);
465 ImGui::SameLine();
466 AlienImGui::Text(parameters._name.c_str());
467
468 text = std::string(buffer);
469}
470
471namespace
472{

Callers

nothing calls this directly

Calls 1

scaleMethod · 0.80

Tested by

no test coverage detected