-
-
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
Frame hover glitch when moving on adjacent item border, with SetNextItemAllowOverlap #7514
Comments
Hello, This is expected with how AllowOverlap mode is implemented. It requires an extra frame before hovering starts being reported, to ensure a subsequent item is not overlapping our item. I don't expect to be able to change this. (I know this is a manufactured repro, and it's great submitted as is! But obviously in your example the button are not overlapping. I wonder what your actual problem encompassing the several overlap-related issues is) C++ repro // #7514
{
ImGui::SeparatorText("#7514");
ImGui::SetNextItemAllowOverlap();
ImGui::Button("Button1", { 50.0f, 50.0 });
bool h1 = ImGui::IsItemHovered();
ImGui::Button("Button2", { 50.0, 50.0 });// # button or dummy, irrelevant
//ImGui::Dummy({ 50.0, 50.0});// # button or dummy, irrelevant
bool h2 = ImGui::IsItemHovered();
//if (h1 || h2)
if (ImGui::IsWindowHovered())
printf("[%05d] %s%s\n", ImGui::GetFrameCount(), h1 ? "hover top button" : "", h2 ? "hover bottom button" : "");
} |
…() and Overlap behavior. ocornut/imgui#7514 ocornut/imgui#7515
produces something like this...
when moving down (good)
when moving up (bad)
Version/Branch of Dear ImGui: 1.89.9 master
Back-ends: crsfml, 2.5.3
Compiler, OS: gcc/crystal, Ubuntu
The text was updated successfully, but these errors were encountered: