mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Drag and Drop: handling of Escape after UpdateKeyboardInputs(). (#9071)
This commit is contained in:
parent
1f16ca5e5c
commit
db6b8e0fb3
1 changed files with 12 additions and 12 deletions
24
imgui.cpp
24
imgui.cpp
|
|
@ -5525,6 +5525,18 @@ void ImGui::NewFrame()
|
||||||
g.HoverItemDelayTimer = g.HoverItemDelayClearTimer = 0.0f; // May want a decaying timer, in which case need to clamp at max first, based on max of caller last requested timer.
|
g.HoverItemDelayTimer = g.HoverItemDelayClearTimer = 0.0f; // May want a decaying timer, in which case need to clamp at max first, based on max of caller last requested timer.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Close popups on focus lost (currently wip/opt-in)
|
||||||
|
//if (g.IO.AppFocusLost)
|
||||||
|
// ClosePopupsExceptModals();
|
||||||
|
|
||||||
|
// Update keyboard input state
|
||||||
|
UpdateKeyboardInputs();
|
||||||
|
|
||||||
|
//IM_ASSERT(g.IO.KeyCtrl == IsKeyDown(ImGuiKey_LeftCtrl) || IsKeyDown(ImGuiKey_RightCtrl));
|
||||||
|
//IM_ASSERT(g.IO.KeyShift == IsKeyDown(ImGuiKey_LeftShift) || IsKeyDown(ImGuiKey_RightShift));
|
||||||
|
//IM_ASSERT(g.IO.KeyAlt == IsKeyDown(ImGuiKey_LeftAlt) || IsKeyDown(ImGuiKey_RightAlt));
|
||||||
|
//IM_ASSERT(g.IO.KeySuper == IsKeyDown(ImGuiKey_LeftSuper) || IsKeyDown(ImGuiKey_RightSuper));
|
||||||
|
|
||||||
// Drag and drop
|
// Drag and drop
|
||||||
g.DragDropAcceptIdPrev = g.DragDropAcceptIdCurr;
|
g.DragDropAcceptIdPrev = g.DragDropAcceptIdCurr;
|
||||||
g.DragDropAcceptIdCurr = 0;
|
g.DragDropAcceptIdCurr = 0;
|
||||||
|
|
@ -5541,18 +5553,6 @@ void ImGui::NewFrame()
|
||||||
}
|
}
|
||||||
g.TooltipPreviousWindow = NULL;
|
g.TooltipPreviousWindow = NULL;
|
||||||
|
|
||||||
// Close popups on focus lost (currently wip/opt-in)
|
|
||||||
//if (g.IO.AppFocusLost)
|
|
||||||
// ClosePopupsExceptModals();
|
|
||||||
|
|
||||||
// Update keyboard input state
|
|
||||||
UpdateKeyboardInputs();
|
|
||||||
|
|
||||||
//IM_ASSERT(g.IO.KeyCtrl == IsKeyDown(ImGuiKey_LeftCtrl) || IsKeyDown(ImGuiKey_RightCtrl));
|
|
||||||
//IM_ASSERT(g.IO.KeyShift == IsKeyDown(ImGuiKey_LeftShift) || IsKeyDown(ImGuiKey_RightShift));
|
|
||||||
//IM_ASSERT(g.IO.KeyAlt == IsKeyDown(ImGuiKey_LeftAlt) || IsKeyDown(ImGuiKey_RightAlt));
|
|
||||||
//IM_ASSERT(g.IO.KeySuper == IsKeyDown(ImGuiKey_LeftSuper) || IsKeyDown(ImGuiKey_RightSuper));
|
|
||||||
|
|
||||||
// Update keyboard/gamepad navigation
|
// Update keyboard/gamepad navigation
|
||||||
NavUpdate();
|
NavUpdate();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue