You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I imported imgui into my game app on windows 11, thanks very much for you guys' great work.
I found the InputText will be invalid when create a second frame.
It just show there with no cursor blink and can not edit, like turned to be readonly.
I am not sure it is a bug, or imgui can create only one frame.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
//new a frame and create my InputText
ImGui_NewFrame();
ImGui_Begin();
InputTextWithHint(xxx);
ImGui_End();
//close the frame and render
ImGui_ImplSDLRenderer2_RenderDrawData(ImGui::GetDrawData(), renderer);
//create another frame, the InputText is shown but can not focus and edit.
ImGui_NewFrame();
ImGui_EndFrame();
The text was updated successfully, but these errors were encountered:
Why the second frame, especially an empty one? Frames need to be continuous. The interaction with widgets happens mostly between frames. If you don't submit a widget for a frame, it cannot hold focus or do anything basically. That's expected behavior, not a bug.
Your example code is not valid (it wouldn't compile when pasted into a test application) and leaves a few questions open. Are you using a wrapper? The functions of the C++ interface are in a namespace, they don't use an ImGui_ prefix. Also Begin() has no default value for its first parameter, the window title. If you are using a wrapper and that has a default, maybe what you are trying to make is a second window, not a second frame. You would have to submit the second window within the same frame.
Version/Branch of Dear ImGui:
Branch: master
Back-ends:
imgui_impl_sdl2.cpp+imgui_impl_sdlrenderer2.cpp
Compiler, OS:
windows11 + mingw64
Full config/build information:
No response
Details:
I imported imgui into my game app on windows 11, thanks very much for you guys' great work.
I found the InputText will be invalid when create a second frame.
It just show there with no cursor blink and can not edit, like turned to be readonly.
I am not sure it is a bug, or imgui can create only one frame.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
//new a frame and create my InputText
ImGui_NewFrame();
ImGui_Begin();
InputTextWithHint(xxx);
ImGui_End();
//close the frame and render
ImGui_ImplSDLRenderer2_RenderDrawData(ImGui::GetDrawData(), renderer);
//create another frame, the InputText is shown but can not focus and edit.
ImGui_NewFrame();
ImGui_EndFrame();
The text was updated successfully, but these errors were encountered: