mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-19 01:34:08 +01:00
Selectable: Internals: removed unused ImGuiSelectableFlags_DrawHoveredWhenHeld flag.
Needlessly introduced in baae057a from WIP tables branch at the time, ended up unused by Tables. A comment "I find it counter intuitive that hovering supersedes activation." in #3516 led me to this however this is not the cause of said issue.
This commit is contained in:
parent
57a5b73a4c
commit
03add24acf
@ -890,10 +890,9 @@ enum ImGuiSelectableFlagsPrivate_
|
|||||||
ImGuiSelectableFlags_SelectOnClick = 1 << 22, // Override button behavior to react on Click (default is Click+Release)
|
ImGuiSelectableFlags_SelectOnClick = 1 << 22, // Override button behavior to react on Click (default is Click+Release)
|
||||||
ImGuiSelectableFlags_SelectOnRelease = 1 << 23, // Override button behavior to react on Release (default is Click+Release)
|
ImGuiSelectableFlags_SelectOnRelease = 1 << 23, // Override button behavior to react on Release (default is Click+Release)
|
||||||
ImGuiSelectableFlags_SpanAvailWidth = 1 << 24, // Span all avail width even if we declared less for layout purpose. FIXME: We may be able to remove this (added in 6251d379, 2bcafc86 for menus)
|
ImGuiSelectableFlags_SpanAvailWidth = 1 << 24, // Span all avail width even if we declared less for layout purpose. FIXME: We may be able to remove this (added in 6251d379, 2bcafc86 for menus)
|
||||||
ImGuiSelectableFlags_DrawHoveredWhenHeld = 1 << 25, // Always show active when held, even is not hovered. This concept could probably be renamed/formalized somehow.
|
ImGuiSelectableFlags_SetNavIdOnHover = 1 << 25, // Set Nav/Focus ID on mouse hover (used by MenuItem)
|
||||||
ImGuiSelectableFlags_SetNavIdOnHover = 1 << 26, // Set Nav/Focus ID on mouse hover (used by MenuItem)
|
ImGuiSelectableFlags_NoPadWithHalfSpacing = 1 << 26, // Disable padding each side with ItemSpacing * 0.5f
|
||||||
ImGuiSelectableFlags_NoPadWithHalfSpacing = 1 << 27, // Disable padding each side with ItemSpacing * 0.5f
|
ImGuiSelectableFlags_NoSetKeyOwner = 1 << 27, // Don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
|
||||||
ImGuiSelectableFlags_NoSetKeyOwner = 1 << 28, // Don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Extend ImGuiTreeNodeFlags_
|
// Extend ImGuiTreeNodeFlags_
|
||||||
|
@ -6370,8 +6370,6 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
|
|||||||
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
|
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
if (held && (flags & ImGuiSelectableFlags_DrawHoveredWhenHeld))
|
|
||||||
hovered = true;
|
|
||||||
if (hovered || selected)
|
if (hovered || selected)
|
||||||
{
|
{
|
||||||
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
|
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user