Hi Robert,
Imgui has an ImGui::InputText element that uses char* to store the string. If you're using c++11 or higher then you can pull in a couple of extra files to use a std:string instead of char* (much more convenient). As this is everyone using vsgImGui I thought we could include it as standard.
Most of the update is easy, but I'm not very good at cmake and can't see how to copy the header file over. The two changes I know of are:
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9f0c9e0..00efa48 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,7 @@ set(HEADERS
imgui/imstb_rectpack.h
imgui/imstb_textedit.h
imgui/imstb_truetype.h
+ imgui/misc/cpp/imgui_stdlib.h
)
set(SOURCES
@@ -25,6 +26,7 @@ set(SOURCES
imgui/backends/imgui_impl_vulkan.cpp
vsgImGui/RenderImGui.cpp
vsgImGui/SendEventsToImGui.cpp
+ imgui/misc/cpp/imgui_stdlib.cpp
)
You then have to copy imgui_stdlib.h to the vsgImGui install include directory - can you help with this please? If I copy it manually and include the header in my code then std:strings work.
Thanks for your help.
Regards,
Roland