Closed dcnieho closed 5 months ago
ok, my attempt wouldn't work anyway, i have instead devised another approach that doesn't need these functions. Still, I guess others may need them, so would still be good to make them available unless there is a reason not to.
The reason they are not wrapped is indeed the signature:
InputTextEx and TempInputText
bool InputTextEx(const char* label, const char* hint, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
bool TempInputText(const ImRect& bb, ImGuiID id, const char* label, char* buf, int buf_size, ImGuiInputTextFlags flags);
imgui_stdlib.h does not provide a wrapper based on std::string, so that it needs to be implemented manually
TempInputScalar
TempInputScalar(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* p_data, const char* format, const void* p_clamp_min = NULL, const void* p_clamp_max = NULL);
With so many opaque values, this one cannot be wrapped.
If this is not actionable, just close it :)
Hi
I added InputTextEx & TempInputText
see: https://github.com/pthom/imgui_bundle/commit/f68abf6d404d0a1a1ca546729268428eeb8e5488
Is it correct that some of the functions in this block, https://github.com/ocornut/imgui/blob/master/imgui_internal.h#L3350, are not wrapped? Specifically, i am looking to use
TempInputIsActive
andTempInputText
as for a custom widget i want to replicate the functionality of e.g.DragScalar
where when activated it changes to an input text.I see that wrapping these is disabled here: https://github.com/pthom/imgui_bundle/blob/14faa5660067aa5ff474ebbec8f9ae735126ddc9/external/imgui/bindings/litgen_options_imgui.py#L308 Could you enable those or is there a problem with the signature taking a plain
char*
? If not, i guessInputTextEx
could also be enabled (but note the callback, like in issue #160.Thanks and all the best!