mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Tabs: Fixed support for drag and drop ImGuiButtonFlags_PressedOnDragDropHold. (#261) incorrectly missing from the merge from Docking branch.
This commit is contained in:
parent
febc3e6aa1
commit
1b263f6ab0
@ -6343,6 +6343,8 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
|||||||
|
|
||||||
// Click to Select a tab
|
// Click to Select a tab
|
||||||
ImGuiButtonFlags button_flags = (ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_AllowItemOverlap);
|
ImGuiButtonFlags button_flags = (ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_AllowItemOverlap);
|
||||||
|
if (g.DragDropActive)
|
||||||
|
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
||||||
bool hovered, held;
|
bool hovered, held;
|
||||||
bool pressed = ButtonBehavior(bb, id, &hovered, &held, button_flags);
|
bool pressed = ButtonBehavior(bb, id, &hovered, &held, button_flags);
|
||||||
hovered |= (g.HoveredId == id);
|
hovered |= (g.HoveredId == id);
|
||||||
|
Loading…
Reference in New Issue
Block a user