ocornut
46e6382b69
Added type formatters for the LLDB debuggers (e.g. Xcode, Android Studio) ( #8950 )
2025-09-22 12:26:53 +02:00
ocornut
d4f722d5b2
IO: added ImGuiPlatformIO::ClearPlatformHandlers(), ClearRendererHandlers(). Backends: call those on Shutdown(). ( #8945 , #2769 )
2025-09-18 16:58:50 +02:00
ocornut
0e7cd694eb
Version 1.92.4 WIP
2025-09-18 15:38:46 +02:00
ocornut
bf75bfec48
Amend f6890ed mostly to please static analyzers.
2025-09-17 19:05:22 +02:00
ocornut
1c544ee941
Version 1.92.3
2025-09-17 18:37:56 +02:00
ocornut
70a43f3088
Fixed build with IMGUI_ENABLE_TEST_ENGINE.
2025-09-17 18:12:32 +02:00
ocornut
9cf9d2be83
Debug Tools: ID Stack Tool: fixed a crash when using PushOverrideID(0) during a query. ( #8937 , #4631 )
2025-09-17 18:06:45 +02:00
ocornut
7e473d38d3
Debug Tools: ID Stack Tool: internal renaming (should be no-op).
2025-09-17 18:06:45 +02:00
ocornut
6d834d325e
Debug Tools: ID Stack Tool: fixed misleading/unnecessary run of UpdateDebugToolStackQueries() on first frame. ( #4631 )
...
`if (g.FrameCount != tool->LastActiveFrame + 1)` test failing on first frame.
Was not harmful but probably confusing in a debugger.
2025-09-17 18:06:45 +02:00
ocornut
f6890ed007
Nav, Inputs: fixed a crash that could occur when opening a popup following the processing of a global shortcut while no windows were focused.
...
Regression test: "window_popup_from_shortcut"
2025-09-17 16:41:40 +02:00
ocornut
431f2c5abd
InputText: fixed dubious code handling ImGuiInputTextFlags_EscapeClearsAll.
...
Specifically the missing = 0. Somehow only now got reported by Emscripten CI.
2025-09-15 19:32:24 +02:00
ocornut
6274ca4266
Backends: GLFW: fixed build for Emscripten which doesn't expose glfw3native.h.
...
Amend 10d0162
2025-09-15 19:28:01 +02:00
ocornut
d92c8c6aff
Backends: SDL2: Content Scales are always reported as 1.0 on Wayland. ( #8921 )
...
SDL_GetDisplayDPI() seems generally broken on X11/Wayland, but our logs shows that on Wayland we get both a content scale from SDL_GetDisplayDPI() and a framebuffer scale.
2025-09-15 19:20:56 +02:00
ocornut
72c00f39c1
Backends: GLFW: fix ImGui_ImplGlfw_IsWayland() amend broken 10d0162. ( #8921 , #8920 )
...
Accidentally broke this while shuffling code...
2025-09-15 19:16:05 +02:00
ocornut
2675b7ca26
Backends: GLFW: Content Scales always reported as 1.0 on Wayland, FramebufferScale always reported as 1.0 on X11. ( #8920 , #8921 )
2025-09-15 18:55:09 +02:00
ocornut
10d0162378
Backends: GLFW: added ImGui_ImplGlfw_IsWayland(). ( #8921 , #8920 )
...
(technically presently untested but we've researched this)
2025-09-15 18:40:22 +02:00
ocornut
3c6c5692b8
Examples: Win32+Vulkan, GLFW+Metal: Fixed not applying content scale. ( #8921 , #8756 )
...
Somehow it breaks in Win32+OpenGL3 example: when enabled Win32 applies some extra scale.
2025-09-15 16:50:58 +02:00
ocornut
e044d99710
Examples: standardized all examples to have a base window size of 1280x800.
2025-09-15 16:34:36 +02:00
ocornut
22a6a83c54
Backends: SDL3: use SDL_GetWindowDisplayScale() on Mac to output DisplayFrameBufferScale. The function is more reliable during resolution changes e.g. going fullscreen. ( #8703 , #4414 )
2025-09-15 15:16:42 +02:00
ocornut
cd476b27f8
Examples: GLFW+Vulkan: Fixed not applying content scale. ( #8921 , #8756 )
2025-09-12 21:32:46 +02:00
ocornut
9f13684d70
Examples: GLFW+OpenGL2: Fixed not applying content scale. ( #8921 )
...
Note that this requires GLFW 3.3.
2025-09-12 20:57:04 +02:00
ocornut
6d25cb844b
CI: switch iOS build to macos-14 runner as macos-latest currently fails.
2025-09-12 16:41:05 +02:00
ocornut
36133d8ac4
InputText: Word-Wrap: hide vertical scrollbar but takes its width into account. ( #3237 , #952 , #1062 , #7363 )
...
Also increase IMGUI_VERSION_NUM for good measure, forgot to increase it when moving to public api.
2025-09-12 16:03:18 +02:00
ocornut
b6a33f8ce1
InputText: Word-Wrap: amend 7f1e2bb to avoid triggering static analyzer. ( #3237 , #952 , #1062 , #7363 )
...
And generally more logical this way anyhow.
2025-09-12 15:05:23 +02:00
ocornut
78c1d4a92c
InputText: Word-Wrap: moving ImGuiInputTextFlags_WordWrap to public API. Added in demo. ( #3237 , #952 , #1062 , #7363 )
2025-09-12 15:03:33 +02:00
ocornut
7f1e2bb8dd
InputText: Word-Wrap: avoid word-wrap specific path InputTextLineIndexGetPosOffset() when word-wrap is disabled. ( #3237 , #952 , #1062 , #7363 )
2025-09-12 15:03:33 +02:00
ocornut
2f3e85bc37
Comments
2025-09-12 15:03:33 +02:00
ocornut
8a94422246
InputText: optimize inactive path by avoiding an early ImStrlen().
2025-09-11 21:26:10 +02:00
ocornut
ae832ce532
InputText: moved blocks so same text rendering code is now used for active and inactive states.
...
(ignore whitespace to visualize this change easily)
2025-09-11 21:26:04 +02:00
ocornut
1e52e7b90c
InputText: Added a line index. Refactored cursor and selection rendering, now simpler, easier to reason about, and faster. ( #3237 , #952 , #1062 , #7363 )
2025-09-11 21:26:01 +02:00
ocornut
67085d732a
ImGuiTextIndex: rename member.
2025-09-11 21:25:56 +02:00
ocornut
f36c65661c
InputText: fixed pressing End (without Shift) in a multi-line selection from mistakenly moving cursor based on selection start.
2025-09-11 18:45:07 +02:00
ocornut
e2b7d84e96
CI: disable pvs-studio 28 days warning (amend).
2025-09-11 15:15:48 +02:00
ocornut
271f476d08
CI: disable pvs-studio 28 days warning.
2025-09-11 15:12:51 +02:00
ocornut
e2f314d613
InputText: fixed misassignment to unused Scroll.y variable when using ImGuiInputTextFlags_NoHorizontalScroll.
...
Amend d474ed7f7 (#7913 , #383 )
2025-09-11 15:06:25 +02:00
ocornut
8eb22ea620
Demo: ShowStyleSelector(), ShowFontSelector(): remove ImGuiSelectableFlags_NoAutoClosePopups for now.
...
In this situation we kinda want keyboard Enter to select and close but ideally not click. We don't have separate options yet.
2025-09-10 22:42:12 +02:00
ocornut
55f590c1d1
Selectable: ImGuiSelectableFlags_SelectOnNav doesn't select when holding Ctrl, to be consistent with multi-select.
...
Amend e66afbb + remove needless line in CloseCurrentPopup() block
2025-09-10 22:29:42 +02:00
ocornut
013c4ed476
InputText: fixed gross buffer underflow introduced by a82f66a. ( #3237 , #952 , #1062 , #7363 )
...
Would typically not crash by detected by sanitinizers.
2025-09-10 19:00:05 +02:00
ocornut
2f1d1c8b2f
Focus, InputText: fixed an issue where SetKeyboardFocusHere() did not work on InputTextMultiline() with ImGuiInputTextFlags_AllowTabInput. ( #8928 )
2025-09-10 18:31:34 +02:00
ocornut
1cd08b883c
TabBar: fixed calling TabBarQueueFocus() before submitting tabs. ( #8929 , #6681 )
2025-09-10 18:03:34 +02:00
ocornut
4e98fb20e2
TabBar: Internals: added TabBarFindByID(), TabBarRemove() helpers.
...
Currently only for the benefit of TestEngine.
2025-09-10 17:59:26 +02:00
ocornut
045645e5f1
Demo: tweaked ShowFontSelector() and ShowStyleSelector() to update selection while navigating and to not close popup automatically.
2025-09-09 17:50:40 +02:00
ocornut
8e4955bb23
Selectable: moved ImGuiSelectableFlags_SelectOnNav to public API.
2025-09-09 17:42:14 +02:00
ocornut
e66afbbbe0
Selectable: ImGuiSelectableFlags_SelectOnNav doesn't close popups.
2025-09-09 17:33:03 +02:00
ocornut
2841c5135d
Backends: OpenGL3: add GL_NEAREST and samplers functions in loader.
2025-09-08 17:24:39 +02:00
ocornut
bf52f4a83c
Backends: OpenGL3: added HasBindSampler storage for readability and consistency.
2025-09-08 17:23:48 +02:00
ocornut
14e076c5bb
Backends: Internal renaming of samplers.
2025-09-08 16:02:23 +02:00
ocornut
ea8a5a9e17
DrawList: made AddCallback() assert when passing a null callback.
2025-09-08 15:20:18 +02:00
ocornut
230418a75d
InputText: Word-Wrap: attempt to track cursor while resizing frame/parent. ( #3237 , #952 , #1062 , #7363 )
2025-09-08 11:56:22 +02:00
ocornut
16415aa39f
InputText: Word-Wrap: added custom implementation for Home/End that is word-wrap friendly. ( #3237 , #952 , #1062 , #7363 )
2025-09-08 11:56:22 +02:00
ocornut
985723ed94
InputText: Word-Wrap: mouse clicks on word-wrapping points set cursor side correctly. ( #3237 , #952 , #1062 , #7363 )
2025-09-08 11:56:22 +02:00
ocornut
a82f66a9b0
InputText: Word-Wrap: added ImGuiInputTextFlags_WordWrap support. ( #3237 , #952 , #1062 , #7363 )
2025-09-08 11:56:20 +02:00
ocornut
e422a38e4c
InputText: internals: expose LineCount, GetPreferredOffsetX().
2025-09-08 11:54:34 +02:00
ocornut
11fff1ccf5
ImFont::RenderText() takes ImDrawTextFlags_CpuFineClip instead of bool cpu_fine_clip + forward ImDrawTextFlags to word-wrap code.
...
(for #3237 , #952 , #1062 , #7363 )
2025-09-08 11:54:33 +02:00
ocornut
3cc7d1c81a
InputText: InputTextCalcTextSize() uses ImFontCalcTextSizeEx().
...
(for #3237 , #952 , #1062 , #7363 )
2025-09-08 11:54:33 +02:00
ocornut
56189cd814
Internals: added ImDrawTextFlags_StopOnNewLine support to ImFontCalcTextSizeEx(), ImDrawTextFlags_WrapKeepTrailingBlanks to ImTextCalcWordWrapNextLineStart().
...
(for #3237 , #952 , #1062 , #7363 )
2025-09-08 11:54:33 +02:00
ocornut
a9945899c6
stb_textedit: extracted stb_textedit_move_line_start()/stb_textedit_move_line_end(), adding STB_TEXTEDIT_MOVELINESTART,STB_TEXTEDIT_MOVELINEEND support. ( #3237 , #952 , #1062 , #7363 )
2025-09-08 11:54:33 +02:00
ocornut
bc6478f651
Internals: added ImDrawTextFlags_WrapKeepTrailingBlanks required for text-edit style word-wrapping.
...
(for #3237 , #952 , #1062 , #7363 )
2025-09-08 11:54:33 +02:00
ocornut
34ab6c8a89
Internals: extracted ImFont::CalcTextSizeA() into ImFontCalcTextSizeEx() so we can make change to its signature.
...
(for #3237 , #952 , #1062 , #7363 )
2025-09-08 11:54:33 +02:00
ocornut
c63b5bd8fb
Internals: extracted ImFont::CalcWordWrapPosition() into ImFontCalcWordWrapPositionEx() so we can make change to its signature.
...
(for #3237 , #952 , #1062 , #7363 )
2025-09-08 11:54:33 +02:00
ocornut
8a35ce0e98
CalcWordWrapPosition() breaks on \n instead of relying on caller to do it + expose ImTextCalcWordWrapNextLineStart(). ( #3237 , #952 , #1062 , #7363 )
...
Should be functional no-op, fingers crossed. Breaking on \n allows caller to count lines reliably.
2025-09-08 11:54:32 +02:00
ocornut
02af06ea5f
Backends: Vulkan: rewrite pColorAttachmentFormats deep-copy to avoid issues when calling multiple times. ( #8282 , #8110 )
2025-09-04 18:14:28 +02:00
ocornut
026d47cd35
Backends: Vulkan: store pColorAttachmentFormats deep-copy into an ImVector. ( #8282 , #8110 )
2025-09-04 18:05:58 +02:00
ocornut
c63714822f
Backends: Vulkan: reorder InitInfo fields.
2025-09-04 18:05:15 +02:00
ocornut
26aa81a8b1
Backends: Vulkan: misc amends (makes ImGui_ImplVulkan_MainPipelineCreateInfo::PipelineRenderingCreateInfo consistent with InitInfo). ( #8110 , #8111 , #8053 )
2025-09-04 18:05:15 +02:00
ocornut
1ecc34a0b1
Backends: Vulkan: misc amends (e.g. changelog, coding style). (8110, 8111, 8053)
...
# Conflicts:
# backends/imgui_impl_vulkan.cpp
2025-09-04 18:04:20 +02:00
ocornut
ee03cef14f
Backends: Vulkan: revert using a struct for ImGui_ImplVulkan_CreatePipeline() for now. ( #8110 , #8111 , #8053 )
2025-09-04 18:00:05 +02:00
ocornut
7d33524042
InputText: fixed an issue where using Escape with ImGuiInputTextFlags_EscapeClearsAll. ( #8915 , #8273 )
...
Regression test: "widgets_inputtext_temp_buffer_2"
2025-09-04 13:16:05 +02:00
ocornut
605a751571
InputText, InputInt, InputFloat: fixed an issue where using Escape to revert would not write back the reverted value. ( #8915 , #8273 )
...
Revealed by 00f12b9a0
Regression test: "widgets_inputtext_temp_buffer_2"
2025-09-04 13:16:04 +02:00
ocornut
b7cb3d93a4
Comments about using MSVC SAL for printf annotation. ( #8871 )
2025-09-03 19:39:55 +02:00
ocornut
20160ff1d5
Fonts: fixed merging a font and specifying a font target in DstFont that's not the last added font (regression in 1.92). ( #8912 )
2025-09-03 19:36:02 +02:00
ocornut
3766d40394
Nav: fixed Ctrl+Tab window appearing as empty when the sole active and focused window has the ImGuiWindowFlags_NoNavFocus flag. ( #8914 )
2025-09-03 17:50:10 +02:00
ocornut
8dc457fda2
Internals: added indent, shallow tweaks + unused context pointer to InputTextCalcTextLenAndLineCount() to reduce noise in wip patch.
...
Visualize this commit with white-space changes disabled.
2025-09-02 15:39:22 +02:00
ocornut
0ef9610e70
InputText, stb_textedit: Revert special handling when pressing Down/PageDown on last line of a buffer without a trailing carriage return.
...
Revert fbf70070bb .
2025-09-02 15:39:14 +02:00
ocornut
5c92699f5f
stb_textedit: trim trailing blanks for simplicity.
...
In theory your editorconfig has this disabled for this file but MSVC plugin doesn't seem to handle this properly.
2025-08-28 18:43:41 +02:00
ocornut
771fae623d
ImRect: added AsVec4() helper. Using ImRect in InputTextEx().
2025-08-27 21:43:25 +02:00
ocornut
6351f00ff1
Clipper, Tables: removed row_increase >= 0 assert. ( #8886 )
...
Seeing cases in my own tests that are not obvious so it seems like too much of a burden for the user to assert/crash, as the row count is not always useful anyhow.
2025-08-27 20:31:05 +02:00
ocornut
55cbc66508
InputText: allow passing an empty string with buf_size==0. ( #8907 )
2025-08-27 20:21:31 +02:00
ocornut
9f969944d5
stb_textedit: fixed misleading cursor-1 in STB_TEXTEDIT_K_LINESTART handlers. ( #7925 )
...
`state->cursor - 1` in STB_TEXTEDIT_K_LINESTART handlers was technically misleadingly not UTF-8 compliant but things would naturally work anyhow.
2025-08-27 19:22:48 +02:00
ocornut
aa2f40c3bb
Clipper, Tables: added ImGuiListClipperFlags, ImGuiListClipperFlags_NoSetTableRowCounters. ( #8886 )
...
a0cdac48e0 revealed the issue but technically the core issue is that clipper assume 1 item = 1 table row.
2025-08-27 18:54:57 +02:00
ocornut
87c1ab7988
Windows: changed how g.CurrentItemFlags is modified before windows' CloseButton() submission to be less misleading. ( #8903 )
...
I don't think anyone would have `ImGuiItemFlags_NoFocus` set globally but technically it might.
2025-08-26 18:48:08 +02:00
ocornut
319c481abb
AddFontDefault(): shallow simplification.
2025-08-26 17:57:51 +02:00
ocornut
229d56e37a
Debug Tools: ID Stack Tool: when ### is used, uncontributing prefix before the ### is now skipped. ( #8904 , #4631 )
2025-08-26 16:30:13 +02:00
ocornut
7d230594de
Fixed ImHashSkipUncontributingPrefix() not looping in case of multiple ### elements.
2025-08-26 16:29:14 +02:00
ocornut
75a4a48d1f
Internals: extracted ImHashSkipUncontributingPrefix() out of CreateNewWindowSettings() and added note about it.
2025-08-26 16:23:06 +02:00
ocornut
9e864012ae
Debug Tools: ID Stack Tool: added option to hex-encode non-ASCII characters in output path. ( #8904 , #4631 )
2025-08-26 15:58:59 +02:00
ocornut
783f1e62cc
Debug Tools: ID Stack Tool: fixed using fixed-size buffers preventing long identifiers from being displayed in the tool. ( #8905 , #4631 )
2025-08-26 15:36:56 +02:00
ocornut
e728b96600
Fixed Bullet() fixed tesselation amount which looked out of place in very large sizes.
2025-08-20 20:22:31 +02:00
ocornut
fe03035112
Docs: advertise ProggyVector font as an alternative.
2025-08-20 20:02:49 +02:00
ocornut
515c0b526f
Backends: SDL_GPU: typo + changelog. ( #8892 )
2025-08-20 18:53:25 +02:00
ocornut
42656b3aa1
Scrollbar, Style: added style.ScrollbarPadding, ImGuiStyleVar_ScrollbarPadding. ( #8895 )
2025-08-20 18:27:35 +02:00
ocornut
89b7fc906a
DrawList: fixed CloneOutput() taking a copy of the ImDrawListSharedData pointer. Missing Changelog. ( #8894 , #1860 )
2025-08-20 17:57:06 +02:00
ocornut
0c4f50090a
DrawList: fixed CloneOutput() taking a copy of the ImDrawListSharedData pointer. ( #8894 , #1860 )
...
Amend b82e99c032
2025-08-20 17:49:18 +02:00
ocornut
720e94f3da
Rework FormatTextureIDForDebugDisplay() ImDrawCmd version as FormatTextureRefForDebugDisplay().
2025-08-19 15:32:38 +02:00
ocornut
321e9eb919
Fixes for printing out ImTextureID value when it is typedef to other types. ( #8889 )
2025-08-19 15:32:12 +02:00
ocornut
86ec5c8342
Version 1.92.3 WIP
2025-08-19 15:15:49 +02:00
ocornut
45acd5e0e8
Version 1.92.2b
2025-08-13 17:31:01 +02:00
ocornut
774ddb58bd
Fixed IsItemHovered() failing on disabled items and items that have no identifier. Made holding on disabled items not leak IsItemDisabled() between disabled items when window has _NoMove. ( #8877 , #8883 )
...
See amends to "widgets_status_common", "widgets_disabled_2" tests.
2025-08-13 17:08:04 +02:00
ocornut
4dee11a089
Make ImGuiInputSource int.
...
(primarily to avoid "result of comparison 'ImGuiInputSource' < 0 is always false" in GetInputSourceName().
2025-08-13 17:02:23 +02:00
ocornut
02f654cbce
Backends: Allegro5: fixed missing support for ImGuiKey_PrintScreen under Windows.
2025-08-12 20:02:08 +02:00