mirror of
https://github.com/ocornut/imgui.git
synced 2026-07-09 02:49:39 +00:00
Merge branch 'master' into docking
# Conflicts: # docs/CHANGELOG.txt
This commit is contained in:
@@ -36,12 +36,14 @@ HOW TO UPDATE?
|
||||
- Please report any issue!
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.92.7 WIP (In Progress)
|
||||
VERSION 1.92.7 (Released 2026-04-02)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.7
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
- Separator(): fixed a legacy quirk where Separator() was submitting a zero-height
|
||||
- Separator: fixed a legacy quirk where `Separator()` was submitting a zero-height
|
||||
item for layout purpose, even though it draws a 1-pixel separator.
|
||||
The fix could affect code e.g. computing height from multiple widgets in order to
|
||||
allocate vertical space for a footer or multi-line status bar. (#2657, #9263)
|
||||
@@ -53,18 +55,18 @@ Breaking Changes:
|
||||
BeginChild("ScrollingRegion", { 0, -footer_height });
|
||||
When such idiom was used and assuming zero-height Separator, it is likely that
|
||||
in 1.92.7 the resulting window will have unexpected 1 pixel scrolling range.
|
||||
- Multi-Select: renamed ImGuiMultiSelectFlags_SelectOnClick to ImGuiMultiSelectFlags_SelectOnAuto.
|
||||
- Multi-Select: renamed `ImGuiMultiSelectFlags_SelectOnClick` to `ImGuiMultiSelectFlags_SelectOnAuto`.
|
||||
Kept inline redirection enum (will obsolete).
|
||||
- Combo(), ListBox(): commented out legacy signatures which were obsoleted in 1.90
|
||||
(Nov 2023), when the getter callback type was changed from:
|
||||
getter type: bool (*getter)(void* user_data, int idx, const char** out_text)
|
||||
bool (*getter)(void* user_data, int idx, const char** out_text)
|
||||
To:
|
||||
getter type: const char* (*getter)(void* user_data, int idx)
|
||||
const char* (*getter)(void* user_data, int idx)
|
||||
|
||||
Other Changes:
|
||||
|
||||
- TreeNode:
|
||||
- Moved TreeNodeGetOpen() helper to public API. I was hesitant to make this public
|
||||
- Moved `TreeNodeGetOpen()` helper to public API. I was hesitant to make this public
|
||||
because I intend to provide a more generic and feature-full version, but in the meanwhile
|
||||
this will do. (#3823, #9251, #7553, #6754, #5423, #2958, #2079, #1947, #1131, #722)
|
||||
- In 'Demo->Property Editor' demonstrate a way to perform tree clipping by fast-forwarding
|
||||
@@ -73,13 +75,13 @@ Other Changes:
|
||||
it was prior to 1.91.
|
||||
- InputText:
|
||||
- Shift+Enter in multi-line editor always adds a new line, regardless of
|
||||
ImGuiInputTextFlags_CtrlEnterForNewLine being set or not. (#9239)
|
||||
- Reworked io.ConfigInputTextEnterKeepActive mode so that pressing Enter will
|
||||
deactivate/reactivate the item in order for e.g. IsItemDeactivatedAfterEdit()
|
||||
`ImGuiInputTextFlags_CtrlEnterForNewLine` being set or not. (#9239)
|
||||
- Reworked `io.ConfigInputTextEnterKeepActive` mode so that pressing Enter will
|
||||
deactivate/reactivate the item in order for e.g. `IsItemDeactivatedAfterEdit()`
|
||||
signals to be emitted the same way regardless of that setting. (#9001, #9115)
|
||||
- Fixed a glitch when using ImGuiInputTextFlags_ElideLeft where the local x offset
|
||||
- Fixed a glitch when using `ImGuiInputTextFlags_ElideLeft` where the local x offset
|
||||
would be incorrect during the deactivation frame. (#9298)
|
||||
- Fixed a crash introduced in 1.92.6 when handling ImGuiInputTextFlags_CallbackResize
|
||||
- Fixed a crash introduced in 1.92.6 when handling `ImGuiInputTextFlags_CallbackResize`
|
||||
in certain situations. (#9174)
|
||||
- Fixed selection highlight Y1 offset being very slightly off (since 1.92.3). (#9311) [@v-ein]
|
||||
- InputTextMultiline: fixed an issue introduced in 1.92.3 where line count calculated
|
||||
@@ -89,19 +91,19 @@ Other Changes:
|
||||
- InputTextMultiline: avoid going through reactivation code and fixed losing revert value
|
||||
when activating scrollbar.
|
||||
- InputTextMultiline: fixed an issue where edit buffer wouldn't be reapplied to back
|
||||
buffer on the IsItemDeactivatedAfterEdit() frame. This could create issues when
|
||||
using the idiom of not applying edits before IsItemDeactivatedAfterEdit().
|
||||
buffer on the `IsItemDeactivatedAfterEdit()` frame. This could create issues when
|
||||
using the idiom of not applying edits before `IsItemDeactivatedAfterEdit()`.
|
||||
(#9308, #8915, #8273)
|
||||
- Tables:
|
||||
- Allow reordering columns by dragging them in the context menu. (#9312)
|
||||
- Context menu now presents columns in display order. (#9312)
|
||||
- Fixed and clarified the behavior of using TableSetupScrollFreeze() with columns>1,
|
||||
- Fixed and clarified the behavior of using `TableSetupScrollFreeze()` with columns>1,
|
||||
and where some of the columns within that range were Hidable.
|
||||
- Before: TableSetupScrollFreeze(N, 0): include the N left-most visible columns as
|
||||
- Before: `TableSetupScrollFreeze(N, 0)`: include the N left-most visible columns as
|
||||
part of the scroll freeze. So if you intentionally hide columns <N, the scroll
|
||||
freeze area would start covering the subsequent/following columns (N+1) etc.
|
||||
- After: TableSetupScrollFreeze(N, 0): include the N left-most columns (regardless of visibility),
|
||||
as part of the scroll freeze. So if you intentionally hide columns <N, the scroll
|
||||
- After: `TableSetupScrollFreeze(N, 0)`: include the N left-most columns (regardless of visibility),
|
||||
part of the scroll freeze. So if you intentionally hide columns <N, the scroll as
|
||||
freeze area will cover less columns.
|
||||
- This is generally more sane and logical.
|
||||
- Fixed dragging a header to reorder outside of visible bounds (due to horizontal scrolling)
|
||||
@@ -109,27 +111,29 @@ Other Changes:
|
||||
- Angled Headers: angled section for column being reordered via the regular headers
|
||||
stays highlighted during reordering.
|
||||
- Style:
|
||||
- Border sizes are now scaled (and rounded) by ScaleAllSizes().
|
||||
- When using large values with ScallAllSizes(), the following items thickness
|
||||
- Fonts: fixed an issue introduced in 1.92.6 where `style.FontBaseSize` would be
|
||||
cleared during the first frame if no fonts was explicitly added before.
|
||||
- Border sizes are now scaled (and rounded) by `ScaleAllSizes()`.
|
||||
- When using large values with `ScallAllSizes()`, the following items thickness
|
||||
are scaled to integer amounts:
|
||||
- InputText Caret/cursor thickness. (#7031)
|
||||
- CloseButton() thickness.
|
||||
- TextLink() underline thickness.
|
||||
- ColorButton() border thickness.
|
||||
- Separator() thickness, via scaling newly added style.SeparatorSize. (#2657, #9263)
|
||||
- `InputText()` caret/cursor thickness. (#7031)
|
||||
- `CloseButton()` thickness.
|
||||
- `TextLink()` underline thickness.
|
||||
- `ColorButton()` border thickness.
|
||||
- `Separator()` thickness, via scaling newly added `style.SeparatorSize`. (#2657, #9263)
|
||||
- Nav:
|
||||
- Popups: Shift+F10 or Menu key can now open popups menus when using
|
||||
`BeginPopupContextItem()`, `BeginPopupContextWindow()` or `OpenPopupOnItemClick()`.
|
||||
(#8803, #9270) [@exelix11, @ocornut]
|
||||
- Changed Gamepad mapping for "Activate with Text Input" action: (#8803, #787)
|
||||
- Previously: press North button (PS4/PS5 triangle, Switch X, Xbox Y).
|
||||
- Now: long press (hold) Activate button (PS4/PS5 cross, Switch B, Xbox A) for ~0.60 secs.
|
||||
This is rarely used, somehow easier to discover, and frees a button for other uses.
|
||||
See updated Gamepad Control Sheets: https://www.dearimgui.com/controls_sheets
|
||||
- Short Gamepad Activation press on InputText() always activate with Text Input mode.
|
||||
- Popups: Shift+F10 or Menu key can now open popups menus when using
|
||||
BeginPopupContextItem(), BeginPopupContextWindow() or OpenPopupOnItemClick().
|
||||
(#8803, #9270) [@exelix11, @ocornut]
|
||||
- Popups: pressing North button (PS4/PS5 triangle, SwitchX, Xbox Y) also open popups menus.
|
||||
- Multi-Select:
|
||||
- Added ImGuiMultiSelectFlags_SelectOnClickAlways mode (rarely used).
|
||||
- Added `ImGuiMultiSelectFlags_SelectOnClickAlways` mode (rarely used).
|
||||
This prevents Drag and Drop of multiple items, but it allows to start a new Box-Selection
|
||||
from inside an existing selection (Excel style). (#9307, #1861)
|
||||
- Clipper:
|
||||
@@ -144,9 +148,9 @@ Other Changes:
|
||||
mouse at the extreme of the screen will reach the scrollbar. (#9276)
|
||||
- Fixed an issue which could lead initial click to move the current scroll by a pixel.
|
||||
- Button:
|
||||
- Moved ImGuiButtonFlags_AllowOverlap from imgui_internal.h to imgui.h,
|
||||
as a convenience for when using e.g. InvisibleButton().
|
||||
- Focus: fixed fallback "Debug" window temporarily taking focus and setting io.WantCaptureKeyboard
|
||||
- Moved `ImGuiButtonFlags_AllowOverlap` from imgui_internal.h to imgui.h,
|
||||
as a convenience for when using e.g. `InvisibleButton()`.
|
||||
- Focus: fixed fallback "Debug" window temporarily taking focus and setting `io.WantCaptureKeyboard`
|
||||
for one frame on e.g. application boot if no other windows are submitted. (#9243)
|
||||
- DrawList:
|
||||
- PathArcTo(): fixed erroneous segment count for pathologically small arcs on large
|
||||
@@ -155,26 +159,26 @@ Other Changes:
|
||||
- Discard/GC of ImDrawList buffers for unused windows favor restoring them to
|
||||
~Size*1.05 instead of Capacity when awakening again. Facilitate releasing ImDrawList
|
||||
buffers after unusual usage spike. (#9303)
|
||||
- Fixed GetForegroundDrawList()/GetBackgroundDrawList() per-viewport buffers not being
|
||||
collected when unused for io.ConfigMemoryCompactTimer amount of time. (#9303)
|
||||
- Demo: fixed IMGUI_DEMO_MARKER locations for examples applets. (#9261, #3689) [@pthom]
|
||||
- Fixed `GetForegroundDrawList()`/`GetBackgroundDrawList()` per-viewport buffers not being
|
||||
collected when unused for `io.ConfigMemoryCompactTimer` amount of time. (#9303)
|
||||
- Demo: fixed `IMGUI_DEMO_MARKER` locations for examples applets. (#9261, #3689) [@pthom]
|
||||
- Misc: added missing ImVec2/ImVec4 operators. (#9339, #8258) [@dkosmari, @ArashPartow]
|
||||
- Internals:
|
||||
- ButtonBehavior: fixed internal/low-level ImGuiButtonFlags_PressedOnRelease
|
||||
(as well as equivalent ImGuiSelectableFlags_SelectOnRelease for Selectable) from
|
||||
not taking current active id. ImGuiButtonFlags_NoHoldingActiveID allows that.
|
||||
This was pretty sure only used internally by MenuItem().
|
||||
- ButtonBehavior: fixed internal/low-level `ImGuiButtonFlags_PressedOnRelease`
|
||||
(as well as equivalent `ImGuiSelectableFlags_SelectOnRelease` for Selectable) from
|
||||
not taking current active id. `ImGuiButtonFlags_NoHoldingActiveID` allows that.
|
||||
This was only used internally by MenuItem().
|
||||
- Backends:
|
||||
- DirectX9, OpenGL2, OpenGL3, Metal, SDLGPU3, SDLRenderer2, SDLRenderer3: fixed easy-to-fix
|
||||
issues in code assuming ImTextureID_Invalid is always defined to 0. (#9295, #9310)
|
||||
- GLFW: mouse cursor is properly restored if changed by user app/code while using
|
||||
glfwSetInputMode(..., GLFW_CURSOR_DISABLED) or ImGuiConfigFlags_NoMouseCursorChange.
|
||||
`glfwSetInputMode(..., GLFW_CURSOR_DISABLED)` or `ImGuiConfigFlags_NoMouseCursorChange`.
|
||||
Amend optimization done in 1.92.6.
|
||||
- SDLGPU3: removed unnecessary call to SDL_WaitForGPUIdle when releasing
|
||||
- SDLGPU3: removed unnecessary call to `SDL_WaitForGPUIdle()` when releasing
|
||||
vertex/index buffers. (#9262) [@jaenis]
|
||||
- WebGPU: fixed version check for Emscripten 5.0.0+.
|
||||
- WebGPU: removed support for Emscripten <4.0.10. (#9281) [@ypujante]
|
||||
- WebGPU: added support for WGVK native backend via IMGUI_IMPL_WEBGPU_BACKEND_WGVK,
|
||||
- WebGPU: added support for WGVK native backend via `IMGUI_IMPL_WEBGPU_BACKEND_WGVK`,
|
||||
using SPIRV shaders if WGSL is not available. (#9316, #9246, #9257) [@r-lyeh]
|
||||
(WGVK is a lightweight alternative to Dawn or WGPU for native applications,
|
||||
which is easier to build/setup, see: https://github.com/manuel5975p/WGVK)
|
||||
@@ -185,9 +189,9 @@ Other Changes:
|
||||
- Emscripten: fixed minor rendering issues with our HTML shell. (#9281) [@ypujante]
|
||||
- hidden small blue outline when canvas is focused on Chrome.
|
||||
- hidden scrollbar in Firefox.
|
||||
- Vulkan: added ImGui_ImplVulkan_PipelineInfo::ExtraDynamicStates[] to allow specifying
|
||||
- Vulkan: added `ImGui_ImplVulkan_PipelineInfo::ExtraDynamicStates[]` to allow specifying
|
||||
extra dynamic states to add when creating the VkPipeline. (#9211) [@DziubanMaciej]
|
||||
- Vulkan: ImGui_ImplVulkan_AddTexture() skips updating descriptor_set if failing
|
||||
- Vulkan: `ImGui_ImplVulkan_AddTexture()` skips updating descriptor_set if failing
|
||||
to allocate one. (#8677) [@micb25]
|
||||
- WebGPU: fixed undefined behaviors in example code for requesting adapter
|
||||
and device. (#9246, #9256) [@r-lyeh]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.7 WIP
|
||||
// dear imgui, v1.92.7
|
||||
// (main code and documentation)
|
||||
|
||||
// Help:
|
||||
|
||||
10
imgui.h
10
imgui.h
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.7 WIP
|
||||
// dear imgui, v1.92.7
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
// Library Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||
#define IMGUI_VERSION "1.92.7 WIP"
|
||||
#define IMGUI_VERSION_NUM 19269
|
||||
#define IMGUI_VERSION "1.92.7"
|
||||
#define IMGUI_VERSION_NUM 19270
|
||||
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
|
||||
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
|
||||
#define IMGUI_HAS_VIEWPORT // In 'docking' WIP branch.
|
||||
@@ -2116,11 +2116,11 @@ enum ImGuiTableFlags_
|
||||
// Features
|
||||
ImGuiTableFlags_None = 0,
|
||||
ImGuiTableFlags_Resizable = 1 << 0, // Enable resizing columns.
|
||||
ImGuiTableFlags_Reorderable = 1 << 1, // Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
|
||||
ImGuiTableFlags_Reorderable = 1 << 1, // Enable reordering columns in header row. (Need calling TableSetupColumn() + TableHeadersRow() to display headers, or using ImGuiTableFlags_ContextMenuInBody to access context-menu without headers).
|
||||
ImGuiTableFlags_Hideable = 1 << 2, // Enable hiding/disabling columns in context menu.
|
||||
ImGuiTableFlags_Sortable = 1 << 3, // Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate.
|
||||
ImGuiTableFlags_NoSavedSettings = 1 << 4, // Disable persisting columns order, width, visibility and sort settings in the .ini file.
|
||||
ImGuiTableFlags_ContextMenuInBody = 1 << 5, // Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow().
|
||||
ImGuiTableFlags_ContextMenuInBody = 1 << 5, // Right-click on columns body/contents will also display table context menu. By default it is available in TableHeadersRow().
|
||||
// Decorations
|
||||
ImGuiTableFlags_RowBg = 1 << 6, // Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
|
||||
ImGuiTableFlags_BordersInnerH = 1 << 7, // Draw horizontal borders between rows.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.7 WIP
|
||||
// dear imgui, v1.92.7
|
||||
// (demo code)
|
||||
|
||||
// Help:
|
||||
@@ -8261,6 +8261,7 @@ void ImGui::ShowAboutWindow(bool* p_open)
|
||||
if (copy_to_clipboard)
|
||||
{
|
||||
ImGui::LogToClipboard();
|
||||
ImGui::LogText("// (Copy from the next line. Keep the ``` markers for formatting.)\n");
|
||||
ImGui::LogText("```cpp\n"); // Back quotes will make text appears without formatting when pasting on GitHub
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.7 WIP
|
||||
// dear imgui, v1.92.7
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
@@ -3264,7 +3264,9 @@ void ImFontAtlasBuildNotifySetFont(ImFontAtlas* atlas, ImFont* old_font, ImFont*
|
||||
shared_data->Font = new_font;
|
||||
if (ImGuiContext* ctx = shared_data->Context)
|
||||
{
|
||||
if (ctx->FrameCount == 0 && old_font == NULL) // While this should work either way, we save ourselves the bother / debugging confusion of running ImGui code so early when it is not needed.
|
||||
// While this should work either way, we save ourselves the bother / debugging confusion of running ImGui code so early when it is not needed.
|
||||
// Also fixes erroneously rewriting style.FontSizeBase during init if adding default fonts.
|
||||
if (old_font == NULL && ctx->Font == NULL && ctx->FontSizeBase == 0.0f)
|
||||
continue;
|
||||
|
||||
if (ctx->IO.FontDefault == old_font)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.7 WIP
|
||||
// dear imgui, v1.92.7
|
||||
// (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.
|
||||
@@ -1256,7 +1256,8 @@ struct IMGUI_API ImGuiInputTextState
|
||||
bool CursorFollow; // set when we want scrolling to follow the current cursor position (not always!)
|
||||
bool CursorCenterY; // set when we want scrolling to be centered over the cursor position (while resizing a word-wrapping field)
|
||||
bool SelectedAllMouseLock; // after a double-click to select all, we ignore further mouse drags to update selection
|
||||
bool Edited; // edited this frame
|
||||
bool EditedBefore; // edited since activated
|
||||
bool EditedThisFrame; // edited this frame
|
||||
bool WantReloadUserBuf; // force a reload of user buf so it may be modified externally. may be automatic in future version.
|
||||
ImS8 LastMoveDirectionLR; // ImGuiDir_Left or ImGuiDir_Right. track last movement direction so when cursor cross over a word-wrapping boundaries we can display it on either line depending on last move.s
|
||||
int ReloadSelectionStart;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.7 WIP
|
||||
// dear imgui, v1.92.7
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
@@ -699,7 +699,7 @@ void ImGui::TableBeginApplyRequests(ImGuiTable* table)
|
||||
}
|
||||
|
||||
// Handle reordering request
|
||||
// Note: we don't clear ReorderColumn after handling the request (FIXME: clarify why or add a test).
|
||||
//// Note: we don't clear ReorderColumn after handling the request (FIXME: clarify why or add a test).
|
||||
if (table->InstanceCurrent == 0)
|
||||
{
|
||||
table->LastHeldHeaderColumn = table->HeldHeaderColumn;
|
||||
@@ -709,6 +709,13 @@ void ImGui::TableBeginApplyRequests(ImGuiTable* table)
|
||||
TableSetColumnDisplayOrder(table, table->ReorderColumn, table->ReorderColumnDstOrder);
|
||||
table->ReorderColumnDstOrder = -1;
|
||||
}
|
||||
|
||||
// Release
|
||||
ImGuiContext& g = *GImGui;
|
||||
if (g.ActiveId == 0) // FIXME: Need to revisit. See 38f5e5a.
|
||||
table->ReorderColumn = -1;
|
||||
//if (table->HeldHeaderColumn == -1 && table->ReorderColumn != -1)
|
||||
// table->ReorderColumn = -1;
|
||||
}
|
||||
|
||||
// Handle display order reset request
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.7 WIP
|
||||
// dear imgui, v1.92.7
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
@@ -4191,7 +4191,7 @@ static void STB_TEXTEDIT_DELETECHARS(ImGuiInputTextState* obj, int pos, int n)
|
||||
char* dst = obj->TextA.Data + pos;
|
||||
char* src = obj->TextA.Data + pos + n;
|
||||
memmove(dst, src, obj->TextLen - n - pos + 1);
|
||||
obj->Edited = true;
|
||||
obj->EditedBefore = obj->EditedThisFrame = true;
|
||||
obj->TextLen -= n;
|
||||
}
|
||||
|
||||
@@ -4221,7 +4221,7 @@ static int STB_TEXTEDIT_INSERTCHARS(ImGuiInputTextState* obj, int pos, const cha
|
||||
memmove(text + pos + new_text_len, text + pos, (size_t)(text_len - pos));
|
||||
memcpy(text + pos, new_text, (size_t)new_text_len);
|
||||
|
||||
obj->Edited = true;
|
||||
obj->EditedBefore = obj->EditedThisFrame = true;
|
||||
obj->TextLen += new_text_len;
|
||||
obj->TextA[obj->TextLen] = '\0';
|
||||
|
||||
@@ -4848,6 +4848,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
// Start edition
|
||||
state->ID = id;
|
||||
state->TextLen = buf_len;
|
||||
state->EditedBefore = false;
|
||||
if (!is_readonly)
|
||||
{
|
||||
state->TextA.resize(buf_size + 1); // we use +1 to make sure that .Data is always pointing to at least an empty string.
|
||||
@@ -4963,7 +4964,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
if (g.ActiveId == id)
|
||||
{
|
||||
IM_ASSERT(state != NULL);
|
||||
state->Edited = false;
|
||||
state->EditedThisFrame = false;
|
||||
state->BufCapacity = buf_size;
|
||||
state->Flags = flags;
|
||||
state->WrapWidth = wrap_width;
|
||||
@@ -5301,7 +5302,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
event_flag = ImGuiInputTextFlags_CallbackHistory;
|
||||
event_key = ImGuiKey_DownArrow;
|
||||
}
|
||||
else if ((flags & ImGuiInputTextFlags_CallbackEdit) && state->Edited)
|
||||
else if ((flags & ImGuiInputTextFlags_CallbackEdit) && state->EditedThisFrame)
|
||||
{
|
||||
event_flag = ImGuiInputTextFlags_CallbackEdit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user