Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImGui::InputText not supported #263

Closed
tommysalt opened this issue Feb 29, 2024 · 3 comments
Closed

ImGui::InputText not supported #263

tommysalt opened this issue Feb 29, 2024 · 3 comments

Comments

@tommysalt
Copy link

I discovered that InputText is not supported:

IMGUI_API bool          InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);

https://github.com/ocornut/imgui/blob/c6236699671b2e5f94481c051cd19afe00cda583/imgui.h#L601
Example C++ usecase:

ImGui::InputText("password (clear)", password, IM_ARRAYSIZE(password));

Is there a reason for it? It seems to be one of the most important widgets.

@gucio321
Copy link
Collaborator

generally input text is a hard thing to wrap because it involves InputTextCallback which is a callback type. Callback types are a bit tricky in go/C (see #224 )

Currently InputText widget is only available in the form of manually wrapped function InputTextWithHint.

@gucio321
Copy link
Collaborator

spoiler: I'm working on this on a branch in my fork callbacks-2

@gucio321
Copy link
Collaborator

gucio321 commented Mar 1, 2024

closing as a duplicate of #224

@gucio321 gucio321 closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants