mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-18 01:14:19 +00:00
IsWindowHovered(): Changed default behavior to now return false is a widget from another window is active + Added support for ImGuiHoveredFlags_AllowWhenBlockedByActiveItem. (relate to drag'n drop idoms: #143)
This commit is contained in:
parent
564ff2dfd3
commit
695ea45fca
2 changed files with 22 additions and 8 deletions
|
|
@ -1768,11 +1768,11 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|||
// Testing IsWindowHovered() function
|
||||
ImGui::BulletText(
|
||||
"IsWindowHovered() = %d\n"
|
||||
"IsWindowHovered(_AllowWhenBlockedByPopup) = %d\n",
|
||||
//"IsWindowHovered(_AllowWhenBlockedByActiveItem) = %d\n",
|
||||
"IsWindowHovered(_AllowWhenBlockedByPopup) = %d\n"
|
||||
"IsWindowHovered(_AllowWhenBlockedByActiveItem) = %d\n",
|
||||
ImGui::IsWindowHovered(),
|
||||
ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup));
|
||||
//ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem));
|
||||
ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup),
|
||||
ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem));
|
||||
|
||||
// Testing IsItemHovered() function (because BulletText is an item itself and that would affect the output of IsItemHovered, we pass all lines in a single items to shorten the code)
|
||||
ImGui::Button("ITEM");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue