| 446 | } |
| 447 | |
| 448 | void 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 | |
| 471 | namespace |
| 472 | { |