Overlap: Added 'SetNextItemAllowOverlap()' as a replacement for 'SetItemAllowOverlap()'. (#6512, #3909, #517)

# Conflicts:
#	imgui.cpp
#	imgui_widgets.cpp
This commit is contained in:
ocornut
2023-06-26 15:00:51 +02:00
parent a9a5cbf431
commit 8439a73645
6 changed files with 50 additions and 25 deletions

View File

@ -2962,8 +2962,6 @@ void ImGui::TableHeader(const char* label)
// Using AllowOverlap mode because we cover the whole cell, and we want user to be able to submit subsequent items.
bool hovered, held;
bool pressed = ButtonBehavior(bb, id, &hovered, &held, ImGuiButtonFlags_AllowOverlap);
if (g.ActiveId != id)
SetItemAllowOverlap();
if (held || hovered || selected)
{
const ImU32 col = GetColorU32(held ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);