1
0
mirror of https://github.com/ocornut/imgui.git synced 2025-01-19 01:34:08 +01:00

Version 1.91.0

This commit is contained in:
ocornut 2024-07-30 14:49:07 +02:00
parent ec9a4ef487
commit 8199457a7d
8 changed files with 78 additions and 70 deletions

View File

@ -36,9 +36,11 @@ HOW TO UPDATE?
- Please report any issue! - Please report any issue!
----------------------------------------------------------------------- -----------------------------------------------------------------------
VERSION 1.91.0 WIP (In Progress) VERSION 1.91.0 (Released 2024-07-30)
----------------------------------------------------------------------- -----------------------------------------------------------------------
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.0
Breaking changes: Breaking changes:
- IO, IME: renamed platform IME hook and added explicit context for consistency and future-proofness. - IO, IME: renamed platform IME hook and added explicit context for consistency and future-proofness.
@ -46,7 +48,7 @@ Breaking changes:
- new: io.PlatformSetImeDataFn(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data); - new: io.PlatformSetImeDataFn(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
It is expected that for a vast majority of users this is automatically set by core It is expected that for a vast majority of users this is automatically set by core
library and/or platform backend so it won't have any effect. library and/or platform backend so it won't have any effect.
- Obsoleted GetContentRegionMax(), GetWindowContentRegionMin() and GetWindowContentRegionMax(). - Obsoleted GetContentRegionMax(), GetWindowContentRegionMin() and GetWindowContentRegionMax(). (#7838)
You should never need those functions! You can do everything in less a confusing manner by only You should never need those functions! You can do everything in less a confusing manner by only
using GetCursorScreenPos() and GetContentRegionAvail(). Also always consider that if you are using using GetCursorScreenPos() and GetContentRegionAvail(). Also always consider that if you are using
GetWindowPos() and GetCursorPos() you may also be making things unnecessarily complicated. GetWindowPos() and GetCursorPos() you may also be making things unnecessarily complicated.
@ -69,32 +71,24 @@ Breaking changes:
- Commented out obsolete ImGuiModFlags_XXX values (renamed to ImGuiMod_XXX in 1.89). (#4921, #456) - Commented out obsolete ImGuiModFlags_XXX values (renamed to ImGuiMod_XXX in 1.89). (#4921, #456)
- ImGuiModFlags_Ctrl -> ImGuiMod_Ctrl, ImGuiModFlags_Shift -> ImGuiMod_Shift etc. - ImGuiModFlags_Ctrl -> ImGuiMod_Ctrl, ImGuiModFlags_Shift -> ImGuiMod_Shift etc.
- Backends: GLFW+Emscripten: Renamed ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to - Backends: GLFW+Emscripten: Renamed ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to
ImGui_ImplGlfw_InstallEmscriptenCallbacks(), with additional GLFWWindow* parameter. (#7647) [@ypujante] ImGui_ImplGlfw_InstallEmscriptenCallbacks(), with an additional GLFWWindow* parameter. (#7647) [@ypujante]
Other changes: Other changes:
- Added TextLink(), TextLinkOpenURL() hyperlink widgets. (#7660) - Added TextLink(), TextLinkOpenURL() hyperlink widgets. (#7660)
- IO: added io.PlatformOpenInShellFn handler to open a link/folder/file in OS shell. (#7660) - IO: added io.PlatformOpenInShellFn handler to open a link/folder/file in OS shell. (#7660)
Default to use ShellExecute() under Windows, and system("") under Mac/Linux/etc. Added IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS to disable default Windows/Linux/Mac implementations.
Added IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS to disable default implementation. - IO: added io.ConfigNavSwapGamepadButtons to swap Activate/Cancel (A<>B) buttons, to match the
- IO: added io.ConfigNavSwapGamepadButtons to swap Activate/Cancel (A<>B) buttons, to match tye
typical "Nintendo/Japanese consoles" button layout when using Gamepad navigation. (#787, #5723) typical "Nintendo/Japanese consoles" button layout when using Gamepad navigation. (#787, #5723)
- Added PushItemFlag()/PopItemFlags(), ImGuiItemFlags to modify shared item flags: - Added PushItemFlag()/PopItemFlags(), ImGuiItemFlags to modify shared item flags:
- Added ImGuiItemFlags_NoTabStop to disable tabbing through items. - Added ImGuiItemFlags_NoTabStop to disable tabbing through items.
- Added ImGuiItemFlags_NoNav to disable any navigation and focus of items. (#787) - Added ImGuiItemFlags_NoNav to disable any navigation and focus of items. (#787)
- Added ImGuiItemFlags_NoNavDefaultFocus to disable item being default focus. (#787) - Added ImGuiItemFlags_NoNavDefaultFocus to disable item being default focus. (#787)
- Added ImGuiItemFlags_ButtonRepeat to enable repeat on any button-like behavior. - Added ImGuiItemFlags_ButtonRepeat to enable repeat on any button-like behavior.
- Added ImGuiItemFlags_AutoClosePopups to disable menu items/selection auto closing parent popups. - Added ImGuiItemFlags_AutoClosePopups to disable menu items/selection auto closing parent popups.
Disabling this was previously possible for Selectable() via a direct flag but not for MenuItem(). Disabling this was previously possible for Selectable() via a direct flag but not for MenuItem().
(#1379, #1468, #2200, #4936, #5216, #7302, #7573) (#1379, #1468, #2200, #4936, #5216, #7302, #7573)
- This was mostly all previously in imgui_internal.h. - This was mostly all previously in imgui_internal.h.
- Inputs: added SetItemKeyOwner(ImGuiKey key) in public API. This is a simplified version of a more
complete set of function available in imgui_internal.h. One common use-case for this is to allow
your items to disable standard inputs behaviors such as Tab or Alt handling, Mouse Wheel scrolling,
etc. (#456, #2637, #2620, #2891, #3370, #3724, #4828, #5108, #5242, #5641)
// Hovering or activating the button will disable mouse wheel default behavior to scroll
InvisibleButton(...);
SetItemKeyOwner(ImGuiKey_MouseWheelY);
- Multi-Select: added multi-select API and demos. (#1861, #6518) - Multi-Select: added multi-select API and demos. (#1861, #6518)
- This system implements standard multi-selection idioms (CTRL+mouse click, CTRL+keyboard moves, - This system implements standard multi-selection idioms (CTRL+mouse click, CTRL+keyboard moves,
SHIFT+mouse click, SHIFT+keyboard moves, etc.) with support for clipper (not submitting non-visible SHIFT+mouse click, SHIFT+keyboard moves, etc.) with support for clipper (not submitting non-visible
@ -103,15 +97,16 @@ Other changes:
This is designed to allow all kinds of selection storage you may use in your application This is designed to allow all kinds of selection storage you may use in your application
(e.g. set/map/hash, intrusive selection, interval trees, up to you). (e.g. set/map/hash, intrusive selection, interval trees, up to you).
- The supported widgets are Selectable(), Checkbox(). TreeNode() is also technically supported but... - The supported widgets are Selectable(), Checkbox(). TreeNode() is also technically supported but...
using this correctly is more complicated (you need some sort of linear/random access to your tree, using this correctly is more complicated. You need some sort of linear/random access to your tree,
which is suited to advanced trees setups already implementing filters and clipper. which is suited to advanced trees setups already implementing filters and clipper.
We will work toward simplifying and demoing this later. We will work toward simplifying our existing demo for trees.
- A helper ImGuiSelectionBasicStorage is provided to facilitate getting started in a typical app. - A helper ImGuiSelectionBasicStorage is provided to facilitate getting started in a typical app
(likely to suit a majority of users).
- Documentation: - Documentation:
- Wiki page https://github.com/ocornut/imgui/wiki/Multi-Select for API overview. - Wiki page https://github.com/ocornut/imgui/wiki/Multi-Select for API overview.
- Demo code + headers are well commented. - Demo code + headers are well commented.
- Added BeginMultiSelect(), EndMultiSelect(), SetNextItemSelectionUserData(). - Added BeginMultiSelect(), EndMultiSelect(), SetNextItemSelectionUserData().
- Added IsItemToggledSelection() for use if you need latest selection update during currnet iteration. - Added IsItemToggledSelection() for use if you need latest selection update during current iteration.
- Added ImGuiMultiSelectIO and ImGuiSelectionRequest structures: - Added ImGuiMultiSelectIO and ImGuiSelectionRequest structures:
- BeginMultiSelect() and EndMultiSelect() return a ImGuiMultiSelectIO structure, which - BeginMultiSelect() and EndMultiSelect() return a ImGuiMultiSelectIO structure, which
is mostly an array of ImGuiSelectionRequest actions (clear, select all, set range, etc.) is mostly an array of ImGuiSelectionRequest actions (clear, select all, set range, etc.)
@ -142,12 +137,23 @@ Other changes:
- Multi-Select (with clipper) - Multi-Select (with clipper)
- Multi-Select (with deletion) - Multi-Select (with deletion)
- Multi-Select (dual list box) (#6648) - Multi-Select (dual list box) (#6648)
- Multi-Select (in a table)
- Multi-Select (checkboxes) - Multi-Select (checkboxes)
- Multi-Select (multiple scopes) - Multi-Select (multiple scopes)
- Multi-Select (tiled assert browser)
- Multi-Select (trees) (#1861)
- Multi-Select (advanced) - Multi-Select (advanced)
- Inputs: added SetItemKeyOwner(ImGuiKey key) in public API.
This is a simplified version of a more complete set of function available in imgui_internal.h.
One common use-case for this is to allow your widgets to disable standard inputs behaviors such
as Tab or Alt handling, Mouse Wheel scrolling, etc.
(#456, #2637, #2620, #2891, #3370, #3724, #4828, #5108, #5242, #5641)
// Hovering or activating the button will disable mouse wheel default behavior to scroll
InvisibleButton(...);
SetItemKeyOwner(ImGuiKey_MouseWheelY);
- Nav: fixed clicking window decorations (e.g. resize borders) from losing focused item when - Nav: fixed clicking window decorations (e.g. resize borders) from losing focused item when
within a child window using ImGuiChildFlags_NavFlattened. within a child window using ImGuiChildFlags_NavFlattened.
- InputText: added '\' and '/' as word seperator. (#7824, #7704) [@reduf] - InputText: added '\' and '/' as word separator. (#7824, #7704) [@reduf]
- TreeNode: added SetNextItemStorageID() to specify/override the identifier used for persisting - TreeNode: added SetNextItemStorageID() to specify/override the identifier used for persisting
open/close storage. Useful if needing to often read/write from storage without manipulating open/close storage. Useful if needing to often read/write from storage without manipulating
the ID stack. (#7553, #6990, #3823, #1131) the ID stack. (#7553, #6990, #3823, #1131)
@ -155,35 +161,37 @@ Other changes:
the hovered state. (#7820) [@rerilier] the hovered state. (#7820) [@rerilier]
- Clipper: added SeekCursorForItem() function. When using ImGuiListClipper::Begin(INT_MAX) you can - Clipper: added SeekCursorForItem() function. When using ImGuiListClipper::Begin(INT_MAX) you can
can use the clipper without knowing the amount of items beforehand. (#1311) can use the clipper without knowing the amount of items beforehand. (#1311)
In this situation, call ImGuiListClipper::SeekCursorForItem(items_count) as the end of your iteration In this situation, call ImGuiListClipper::SeekCursorForItem(items_count) at the end of your iteration
loop to position the layout cursor correctly. This is done automatically if provided a count to Begin(). loop to position the layout cursor correctly. This is done automatically if provided a count to Begin().
- Groups, Tables: fixed EndGroup() failing to correctly capture current table occupied size. (#7543) - Groups, Tables: fixed EndGroup() failing to correctly capture current table occupied size. (#7543)
- TabBar, Style: added style.TabBarOverlineSize / ImGuiStyleVar_TabBarOverlineSize to manipulate - Style, TabBar: added style.TabBarOverlineSize / ImGuiStyleVar_TabBarOverlineSize to manipulate
thickness of the horizontal line over selectable tabs. [@DctrNoob] thickness of the horizontal line over selected tabs. [@DctrNoob]
- Misc: added GetID(int) variant for consistency. (#7111)
- Style: close button and collapse/window-menu button hover highlight made rectangular instead of round. - Style: close button and collapse/window-menu button hover highlight made rectangular instead of round.
- Debug Tools: Added IMGUI_DEBUG_LOG(), ImGui::DebugLog() in public API. (#5855) - Misc: added GetID(int) variant for consistency. (#7111)
Debug log entries add a imgui frame counter prefix + are redirected to ShowDebugLogWindow() and - Debug Tools:
other configurable locations. Always call IMGUI_DEBUG_LOG() for maximum stripping in caller code. - Debug Log: Added IMGUI_DEBUG_LOG(), ImGui::DebugLog() in public API. (#5855)
- Debug Tools: Debug Log: Added "Configure Outputs.." button. (#5855) Printed entries include imgui frame counter prefix + are redirected to ShowDebugLogWindow() and
- Debug Tools: Debug Log: Fixed incorrect checkbox layout when partially clipped. other configurable locations. Always call IMGUI_DEBUG_LOG() for maximum stripping in caller code.
- Demo: Reworked "Property Editor" demo in a manner that more ressemble the tree data and - Debug Log: Added "Configure Outputs.." button. (#5855)
- Debug Log: Fixed incorrect checkbox layout when partially clipped.
- Demo: Reworked "Property Editor" demo in a manner that more resemble the tree data and
struct description data that a real application would want to use. struct description data that a real application would want to use.
- Backends: Win32: Fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN. - Backends:
(#7768, #4858, #2622) [@Aemony] - Backends: Win32: Fixed ImGuiMod_Super being mapped to VK_APPS instead of (VK_LWIN || VK_RWIN).
- Backends: SDL3: Update for API changes: SDL_GetGamepads() memory ownership change. (#7807) (#7768, #4858, #2622) [@Aemony]
- Backends: SDL3: Update for API changes: SDL_GetClipboardText() memory ownership change. (#7801) - Backends: SDL3: Update for API changes: SDL_GetGamepads() memory ownership change. (#7807)
- Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762) - Backends: SDL3: Update for API changes: SDL_GetClipboardText() memory ownership change. (#7801)
- Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) [@wermipls] - Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762)
- Backends: SDL2,SDL3,OSX: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() rename. - Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) [@wermipls]
- Backends: GLFW,SDL2: Added io.PlatformOpenInShellFn handler for web/Emscripten versions. (#7660) - Backends: SDL2,SDL3,OSX: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() rename.
[@ypujante, @ocornut] - Backends: GLFW,SDL2: Added io.PlatformOpenInShellFn handler for web/Emscripten versions. (#7660)
- Backends; GLFW+Emscripten: Added support for GLFW3 contrib port which fixes many of the things [@ypujante, @ocornut]
not supported by the embedded GLFW: gamepad support, mouse cursor shapes, copy to clipboard, - Backends; GLFW+Emscripten: Added support for GLFW3 contrib port which fixes many of the things
workaround for Super/Meta key, different ways of resizing, multi-window (glfw/canvas) support. not supported by the embedded GLFW: gamepad support, mouse cursor shapes, copy to clipboard,
(#7647) [@ypujante] workaround for Super/Meta key, different ways of resizing, multi-window (glfw/canvas) support.
- Backends: GLFW+Emscripten: Fixed Emscripten warning when using mouse wheel on some setups (#7647) [@ypujante]
"Unable to preventDefault inside passive event listener". (#7647, #7600) [@ypujante] - Backends: GLFW+Emscripten: Fixed Emscripten warning when using mouse wheel on some setups
"Unable to preventDefault inside passive event listener". (#7647, #7600) [@ypujante]
----------------------------------------------------------------------- -----------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.0 WIP // dear imgui, v1.91.0
// (main code and documentation) // (main code and documentation)
// Help: // Help:
@ -430,7 +430,7 @@ CODE
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files. When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
You can read releases logs https://github.com/ocornut/imgui/releases for more details. You can read releases logs https://github.com/ocornut/imgui/releases for more details.
- 2024/07/25 (1.91.0) - obsoleted GetContentRegionMax(), GetWindowContentRegionMin() and GetWindowContentRegionMax(). - 2024/07/25 (1.91.0) - obsoleted GetContentRegionMax(), GetWindowContentRegionMin() and GetWindowContentRegionMax(). (see #7838 on GitHub for more info)
you should never need those functions. you can do everything with GetCursorScreenPos() and GetContentRegionAvail() in a more simple way. you should never need those functions. you can do everything with GetCursorScreenPos() and GetContentRegionAvail() in a more simple way.
- instead of: GetWindowContentRegionMax().x - GetCursorPos().x - instead of: GetWindowContentRegionMax().x - GetCursorPos().x
- you can use: GetContentRegionAvail().x - you can use: GetContentRegionAvail().x

22
imgui.h
View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.0 WIP // dear imgui, v1.91.0
// (headers) // (headers)
// Help: // Help:
@ -27,8 +27,8 @@
// Library Version // Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345') // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.91.0 WIP" #define IMGUI_VERSION "1.91.0"
#define IMGUI_VERSION_NUM 19099 #define IMGUI_VERSION_NUM 19100
#define IMGUI_HAS_TABLE #define IMGUI_HAS_TABLE
/* /*
@ -480,7 +480,7 @@ namespace ImGui
IMGUI_API void SetCursorPos(const ImVec2& local_pos); // [window-local] " IMGUI_API void SetCursorPos(const ImVec2& local_pos); // [window-local] "
IMGUI_API void SetCursorPosX(float local_x); // [window-local] " IMGUI_API void SetCursorPosX(float local_x); // [window-local] "
IMGUI_API void SetCursorPosY(float local_y); // [window-local] " IMGUI_API void SetCursorPosY(float local_y); // [window-local] "
IMGUI_API ImVec2 GetCursorStartPos(); // [window-local] initial cursor position, in window-local coordinates IMGUI_API ImVec2 GetCursorStartPos(); // [window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after Begin() to get the absolute coordinates version.
// Other layout functions // Other layout functions
IMGUI_API void Separator(); // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator. IMGUI_API void Separator(); // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
@ -669,12 +669,12 @@ namespace ImGui
IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool* p_selected" point to the selection state (read-write), as a convenient helper. IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool* p_selected" point to the selection state (read-write), as a convenient helper.
// Multi-selection system for Selectable(), Checkbox() functions* // Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used. // - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else). // - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo. // - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
// - (*) TreeNode() is technically supported but... using this correctly is more complicate: you need some sort of linear/random access to your tree, // - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
// which is suited to advanced trees setups already implementing filters and clipper. We will work toward simplifying and demoing this. // which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them. // - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
IMGUI_API ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1); IMGUI_API ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1);
IMGUI_API ImGuiMultiSelectIO* EndMultiSelect(); IMGUI_API ImGuiMultiSelectIO* EndMultiSelect();
@ -2781,10 +2781,10 @@ enum ImGuiMultiSelectFlags_
ImGuiMultiSelectFlags_SingleSelect = 1 << 0, // Disable selecting more than one item. This is available to allow single-selection code to share same code/logic if desired. It essentially disables the main purpose of BeginMultiSelect() tho! ImGuiMultiSelectFlags_SingleSelect = 1 << 0, // Disable selecting more than one item. This is available to allow single-selection code to share same code/logic if desired. It essentially disables the main purpose of BeginMultiSelect() tho!
ImGuiMultiSelectFlags_NoSelectAll = 1 << 1, // Disable CTRL+A shortcut to select all. ImGuiMultiSelectFlags_NoSelectAll = 1 << 1, // Disable CTRL+A shortcut to select all.
ImGuiMultiSelectFlags_NoRangeSelect = 1 << 2, // Disable Shift+selection mouse/keyboard support (useful for unordered 2D selection). With BoxSelect is also ensure contiguous SetRange requests are not combined into one. This allows not handling interpolation in SetRange requests. ImGuiMultiSelectFlags_NoRangeSelect = 1 << 2, // Disable Shift+selection mouse/keyboard support (useful for unordered 2D selection). With BoxSelect is also ensure contiguous SetRange requests are not combined into one. This allows not handling interpolation in SetRange requests.
ImGuiMultiSelectFlags_NoAutoSelect = 1 << 3, // Disable selecting items when navigating (useful for e.g. supporting range-select in a list of checkboxes) ImGuiMultiSelectFlags_NoAutoSelect = 1 << 3, // Disable selecting items when navigating (useful for e.g. supporting range-select in a list of checkboxes).
ImGuiMultiSelectFlags_NoAutoClear = 1 << 4, // Disable clearing selection when navigating or selecting another one (generally used with ImGuiMultiSelectFlags_NoAutoSelect. useful for e.g. supporting range-select in a list of checkboxes) ImGuiMultiSelectFlags_NoAutoClear = 1 << 4, // Disable clearing selection when navigating or selecting another one (generally used with ImGuiMultiSelectFlags_NoAutoSelect. useful for e.g. supporting range-select in a list of checkboxes).
ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1 << 5, // Disable clearing selection when clicking/selecting an already selected item ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1 << 5, // Disable clearing selection when clicking/selecting an already selected item.
ImGuiMultiSelectFlags_BoxSelect1d = 1 << 6, // Enable box-selection with same width and same x pos items (e.g. only full row Selectable()). Box-selection works better with little bit of spacing between items hit-box in order to be able to aim at empty space. ImGuiMultiSelectFlags_BoxSelect1d = 1 << 6, // Enable box-selection with same width and same x pos items (e.g. full row Selectable()). Box-selection works better with little bit of spacing between items hit-box in order to be able to aim at empty space.
ImGuiMultiSelectFlags_BoxSelect2d = 1 << 7, // Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or 2D layout/grid). This is slower: alters clipping logic so that e.g. horizontal movements will update selection of normally clipped items. ImGuiMultiSelectFlags_BoxSelect2d = 1 << 7, // Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or 2D layout/grid). This is slower: alters clipping logic so that e.g. horizontal movements will update selection of normally clipped items.
ImGuiMultiSelectFlags_BoxSelectNoScroll = 1 << 8, // Disable scrolling when box-selecting near edges of scope. ImGuiMultiSelectFlags_BoxSelectNoScroll = 1 << 8, // Disable scrolling when box-selecting near edges of scope.
ImGuiMultiSelectFlags_ClearOnEscape = 1 << 9, // Clear selection when pressing Escape while scope is focused. ImGuiMultiSelectFlags_ClearOnEscape = 1 << 9, // Clear selection when pressing Escape while scope is focused.

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.0 WIP // dear imgui, v1.91.0
// (demo code) // (demo code)
// Help: // Help:
@ -3621,7 +3621,7 @@ static void ShowDemoWindowMultiSelect(ImGuiDemoWindowData* demo_data)
static bool use_deletion = true; static bool use_deletion = true;
static bool use_drag_drop = true; static bool use_drag_drop = true;
static bool show_in_table = false; static bool show_in_table = false;
static bool show_color_button = false; static bool show_color_button = true;
static ImGuiMultiSelectFlags flags = ImGuiMultiSelectFlags_ClearOnEscape | ImGuiMultiSelectFlags_BoxSelect1d; static ImGuiMultiSelectFlags flags = ImGuiMultiSelectFlags_ClearOnEscape | ImGuiMultiSelectFlags_BoxSelect1d;
static WidgetType widget_type = WidgetType_Selectable; static WidgetType widget_type = WidgetType_Selectable;

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.0 WIP // dear imgui, v1.91.0
// (drawing and font code) // (drawing and font code)
/* /*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.0 WIP // dear imgui, v1.91.0
// (internal structures/api) // (internal structures/api)
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility. // You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.0 WIP // dear imgui, v1.91.0
// (tables and columns code) // (tables and columns code)
/* /*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.91.0 WIP // dear imgui, v1.91.0
// (widgets code) // (widgets code)
/* /*