|
|
@ -990,7 +990,7 @@ static void ShowDemoWindowWidgets() |
|
|
|
static bool MyInputTextMultiline(const char* label, ImVector<char>* my_str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0) |
|
|
|
{ |
|
|
|
IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); |
|
|
|
return ImGui::InputTextMultiline(label, my_str->begin(), my_str->size(), size, flags | ImGuiInputTextFlags_CallbackResize, Funcs::MyResizeCallback, (void*)my_str); |
|
|
|
return ImGui::InputTextMultiline(label, my_str->begin(), (size_t)my_str->size(), size, flags | ImGuiInputTextFlags_CallbackResize, Funcs::MyResizeCallback, (void*)my_str); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@ -1000,7 +1000,7 @@ static void ShowDemoWindowWidgets() |
|
|
|
if (my_str.empty()) |
|
|
|
my_str.push_back(0); |
|
|
|
Funcs::MyInputTextMultiline("##MyStr", &my_str, ImVec2(-1.0f, ImGui::GetTextLineHeight() * 16)); |
|
|
|
ImGui::Text("Data: %p\nSize: %d\nCapacity: %d", my_str.begin(), my_str.size(), my_str.capacity()); |
|
|
|
ImGui::Text("Data: %p\nSize: %d\nCapacity: %d", (void*)my_str.begin(), my_str.size(), my_str.capacity()); |
|
|
|
ImGui::TreePop(); |
|
|
|
} |
|
|
|
|
|
|
|