Advertisement
Guest User

Untitled

a guest
Feb 8th, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. std::string get_text_input(std::size_t arbitrary_size)
  2. {
  3.     std::vector<char> txt(arbitrary_size+1); // set aside space
  4.  
  5.     ImGui::Begin("Window");
  6.     ImGui::InputTextMultiline("Textbox", buf.data(), arbitrary_size, ImVec2(-1.0f, ImGui::GetTextLineHeight() * 16), ImGuiInputTextFlags_AllowTabInput | (read_only ? ImGuiInputTextFlags_ReadOnly : 0));
  7.     ImGui::End();
  8.  
  9.     return buf.data(); // will construct retval string
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement