-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Regarding opening of two frames, which caused ImGui_implWin32_WndFrocHandler to be unable to accept messages #7948
Comments
Issues related to cheating usually don't get support for obvious reasons. I guess it would be OK for single player games, but I see that you recently forked an injector for League of Legends. That doesn't look very single player to me. |
Yes, I recently worked on a League of Legends injector, but now I'm working on Black Myth: Wukong |
Well then. An ImGui context can't handle being used for two unrelated things like that. It needs submitted items to be consistent from frame to frame to make interaction possible. If you can't combine those two locations into a single frame, create (and initialize) two separate ImGui contexts. Switch between them as needed, submit only one frame for each context. You might need to feed inputs into both contexts at the same time. |
Thank you for your answer. The game crashes when I switch contexts, and I have been searching for the reason for a long time but cannot find it. Do you have any examples? Thank you very much |
Crashes must be something on your end. Might be a threading issue, ImGui is not thread safe. |
That's a sorry but #1586 as per the rules. |
Version/Branch of Dear ImGui:
Version 1.XX, Branch: XXX (master/docking/etc.)
Back-ends:
imgui_impl_XXX.cpp + imgui_impl_XXX.cpp
Compiler, OS:
Windows10 + vs2019
Full config/build information:
Hello, I am working on a cheating plugin project for a single player game (ps: a DLL project for injecting into it), and my plugin requires an interface, so I used imgui. I want to use imgui to draw two locations, one under a specific element and the other at the top level. Of course, I found these two drawing locations, they are on the same thread, and I performed the following code operations separately in these two locations:
ImGui_ImplDX11_NewFrame(); ImGui_ImplWin32_NewFrame(); ImGui::NewFrame(); Render()//Draw different elements in different places ImGui::Render(); d3d11_device_context->OMSetRenderTargets(1, &_target_view, nullptr); ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
Then I want the top-level imgui to accept the message sent by ImGui_implWin32_WndFrocHandler, but two frames make this message invalid. I cannot click or move the top-level elements. How can I solve this problem? thank you.
Details:
My Issue/Question:
XXX (please provide as much context as possible)
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: