From 4e33aeed8285bb961ad5beb7b3bd251169bb7972 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 14 Aug 2018 16:07:01 -0700 Subject: [PATCH] Selectable: Added ImGuiSelectableFlags_Disabled flag in the public API. (#211) --- CHANGELOG.txt | 1 + imgui.h | 3 ++- imgui_internal.h | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index eada3b56..959125e4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -59,6 +59,7 @@ Other Changes: - Drag and Drop: Payload stays available and under the mouse if the source stops being submitted, however the tooltip is replaced by "...". (#1725) - Drag and Drop: Added ImGuiDragDropFlags_SourceAutoExpirePayload flag to force payload to expire if the source stops being submitted. (#1725, #143). - IsItemHovered(): Added ImGuiHoveredFlags_AllowWhenDisabled flag to query hovered status on disabled items. (#1940, #211) + - Selectable: Added ImGuiSelectableFlags_Disabled flag in the public API. (#211) - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut] - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors. - Made assertion more clear when trying to call Begin() outside of the NewFrame()..EndFrame() scope. (#1987) diff --git a/imgui.h b/imgui.h index e28d8832..70ca231b 100644 --- a/imgui.h +++ b/imgui.h @@ -686,7 +686,8 @@ enum ImGuiSelectableFlags_ ImGuiSelectableFlags_None = 0, ImGuiSelectableFlags_DontClosePopups = 1 << 0, // Clicking this don't close parent popup window ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Selectable frame can span all columns (text will still fit in current column) - ImGuiSelectableFlags_AllowDoubleClick = 1 << 2 // Generate press events on double clicks too + ImGuiSelectableFlags_AllowDoubleClick = 1 << 2, // Generate press events on double clicks too + ImGuiSelectableFlags_Disabled = 1 << 3 // Cannot be selected, display greyed out text }; // Flags for ImGui::BeginCombo() diff --git a/imgui_internal.h b/imgui_internal.h index 74aef002..c3aee425 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -251,8 +251,7 @@ enum ImGuiSelectableFlagsPrivate_ ImGuiSelectableFlags_NoHoldingActiveID = 1 << 10, ImGuiSelectableFlags_PressedOnClick = 1 << 11, ImGuiSelectableFlags_PressedOnRelease = 1 << 12, - ImGuiSelectableFlags_Disabled = 1 << 13, - ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 14 + ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 13 }; enum ImGuiSeparatorFlags_