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

InputText: How to update the value without resetting ? #3864

Closed
Corezcy opened this issue Mar 2, 2021 · 1 comment
Closed

InputText: How to update the value without resetting ? #3864

Corezcy opened this issue Mar 2, 2021 · 1 comment

Comments

@Corezcy
Copy link

Corezcy commented Mar 2, 2021

Version/Branch of Dear ImGui:

Version: 1.81
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_OpenGL3.cpp + imgui_impl_glfw.cpp _
Compiler: bazel VScode
Operating System: Ubuntu 18.04.5 LTS

My Issue/Question:
I have a ImGui::InputText("aaa", b). At first, the string b is empty .The problem is that I will update the b outside(such as a button, when I enter the button , b will be assigned) , but in the next loop, the b is reset (actually b is empty again). So how can I update the b outside without resetting ? ? ? Or in outside I can change the content in the inputtext(aaa)?
Thanks a lot !

@ocornut ocornut changed the title How to update the value without resetting ? InputText: How to update the value without resetting ? Mar 2, 2021
@ocornut
Copy link
Owner

ocornut commented Mar 2, 2021

It's not possible via public api yet.
See PR #2890 and #1506
I will try to merge #2890 soon.

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

No branches or pull requests

2 participants