mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-27 23:37:03 -05:00
This commit is contained in:
@@ -53,6 +53,9 @@ Other Changes:
|
|||||||
resizing the parent window while keeping the multi-line field active (which is
|
resizing the parent window while keeping the multi-line field active (which is
|
||||||
most typically achieved when resizing programmatically or via a docking layout
|
most typically achieved when resizing programmatically or via a docking layout
|
||||||
reacting to a platform window resize). (#3237, #9007) [@anton-kl, @ocornut]
|
reacting to a platform window resize). (#3237, #9007) [@anton-kl, @ocornut]
|
||||||
|
- MultiSelect: added ImGuiMultiSelectFlags_NoSelectOnRightClick to disable default
|
||||||
|
right-click processing, which selects item on mouse down and is designed for
|
||||||
|
context-menus. (#8200, #9015)
|
||||||
- Backends: Vulkan: added IMGUI_IMPL_VULKAN_VOLK_FILENAME to configure path to
|
- Backends: Vulkan: added IMGUI_IMPL_VULKAN_VOLK_FILENAME to configure path to
|
||||||
Volk (default to "volk.h"). (#9008, #7722, #6582, #4854) [@mwlasiuk]
|
Volk (default to "volk.h"). (#9008, #7722, #6582, #4854) [@mwlasiuk]
|
||||||
- Backends: WebGPU: update to compile with Dawn and Emscripten's 4.0.10+
|
- Backends: WebGPU: update to compile with Dawn and Emscripten's 4.0.10+
|
||||||
|
|||||||
1
imgui.h
1
imgui.h
@@ -3003,6 +3003,7 @@ enum ImGuiMultiSelectFlags_
|
|||||||
ImGuiMultiSelectFlags_SelectOnClickRelease = 1 << 14, // Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
|
ImGuiMultiSelectFlags_SelectOnClickRelease = 1 << 14, // Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
|
||||||
//ImGuiMultiSelectFlags_RangeSelect2d = 1 << 15, // Shift+Selection uses 2d geometry instead of linear sequence, so possible to use Shift+up/down to select vertically in grid. Analogous to what BoxSelect does.
|
//ImGuiMultiSelectFlags_RangeSelect2d = 1 << 15, // Shift+Selection uses 2d geometry instead of linear sequence, so possible to use Shift+up/down to select vertically in grid. Analogous to what BoxSelect does.
|
||||||
ImGuiMultiSelectFlags_NavWrapX = 1 << 16, // [Temporary] Enable navigation wrapping on X axis. Provided as a convenience because we don't have a design for the general Nav API for this yet. When the more general feature be public we may obsolete this flag in favor of new one.
|
ImGuiMultiSelectFlags_NavWrapX = 1 << 16, // [Temporary] Enable navigation wrapping on X axis. Provided as a convenience because we don't have a design for the general Nav API for this yet. When the more general feature be public we may obsolete this flag in favor of new one.
|
||||||
|
ImGuiMultiSelectFlags_NoSelectOnRightClick = 1 << 17, // Disable default right-click processing, which selects item on mouse down, and is designed for context-menus.
|
||||||
};
|
};
|
||||||
|
|
||||||
// Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
|
// Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
|
||||||
|
|||||||
@@ -2647,6 +2647,10 @@ static void DemoWindowWidgetsSelectionAndMultiSelect(ImGuiDemoWindowData* demo_d
|
|||||||
{
|
{
|
||||||
HelpMarker("Selections can be built using Selectable(), TreeNode() or other widgets. Selection state is owned by application code/data.");
|
HelpMarker("Selections can be built using Selectable(), TreeNode() or other widgets. Selection state is owned by application code/data.");
|
||||||
|
|
||||||
|
ImGui::BulletText("Wiki page:");
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::TextLinkOpenURL("imgui/wiki/Multi-Select", "https://github.com/ocornut/imgui/wiki/Multi-Select");
|
||||||
|
|
||||||
// Without any fancy API: manage single-selection yourself.
|
// Without any fancy API: manage single-selection yourself.
|
||||||
IMGUI_DEMO_MARKER("Widgets/Selection State/Single-Select");
|
IMGUI_DEMO_MARKER("Widgets/Selection State/Single-Select");
|
||||||
if (ImGui::TreeNode("Single-Select"))
|
if (ImGui::TreeNode("Single-Select"))
|
||||||
@@ -3180,6 +3184,7 @@ static void DemoWindowWidgetsSelectionAndMultiSelect(ImGuiDemoWindowData* demo_d
|
|||||||
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_NoAutoSelect", &flags, ImGuiMultiSelectFlags_NoAutoSelect);
|
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_NoAutoSelect", &flags, ImGuiMultiSelectFlags_NoAutoSelect);
|
||||||
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_NoAutoClear", &flags, ImGuiMultiSelectFlags_NoAutoClear);
|
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_NoAutoClear", &flags, ImGuiMultiSelectFlags_NoAutoClear);
|
||||||
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_NoAutoClearOnReselect", &flags, ImGuiMultiSelectFlags_NoAutoClearOnReselect);
|
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_NoAutoClearOnReselect", &flags, ImGuiMultiSelectFlags_NoAutoClearOnReselect);
|
||||||
|
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_NoSelectOnRightClick", &flags, ImGuiMultiSelectFlags_NoSelectOnRightClick);
|
||||||
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_BoxSelect1d", &flags, ImGuiMultiSelectFlags_BoxSelect1d);
|
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_BoxSelect1d", &flags, ImGuiMultiSelectFlags_BoxSelect1d);
|
||||||
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_BoxSelect2d", &flags, ImGuiMultiSelectFlags_BoxSelect2d);
|
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_BoxSelect2d", &flags, ImGuiMultiSelectFlags_BoxSelect2d);
|
||||||
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_BoxSelectNoScroll", &flags, ImGuiMultiSelectFlags_BoxSelectNoScroll);
|
ImGui::CheckboxFlags("ImGuiMultiSelectFlags_BoxSelectNoScroll", &flags, ImGuiMultiSelectFlags_BoxSelectNoScroll);
|
||||||
|
|||||||
@@ -8213,8 +8213,8 @@ void ImGui::MultiSelectItemFooter(ImGuiID id, bool* p_selected, bool* p_pressed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Right-click handling.
|
// Right-click handling.
|
||||||
// FIXME-MULTISELECT: Currently filtered out by ImGuiMultiSelectFlags_NoAutoSelect but maybe should be moved to Selectable(). See https://github.com/ocornut/imgui/pull/5816
|
// FIXME-MULTISELECT: Maybe should be moved to Selectable()? Also see #5816, #8200, #9015
|
||||||
if (hovered && IsMouseClicked(1) && (flags & ImGuiMultiSelectFlags_NoAutoSelect) == 0)
|
if (hovered && IsMouseClicked(1) && (flags & (ImGuiMultiSelectFlags_NoAutoSelect | ImGuiMultiSelectFlags_NoSelectOnRightClick)) == 0)
|
||||||
{
|
{
|
||||||
if (g.ActiveId != 0 && g.ActiveId != id)
|
if (g.ActiveId != 0 && g.ActiveId != id)
|
||||||
ClearActiveID();
|
ClearActiveID();
|
||||||
|
|||||||
Reference in New Issue
Block a user