ocornut
136d067eed
Scrollbar: fixed a codepath leading to a divide-by-zero. ( #9089 )
2025-11-24 14:27:03 +01:00
ocornut
324cea1f41
Version 1.92.6 WIP
2025-11-24 13:35:41 +01:00
ocornut
6d910d5487
Version 1.92.5
2025-11-20 17:49:52 +01:00
ocornut
9afc62d087
InputText: Fixed an assert when using ImGuiInputTextFlags_ReadOnly and making underlying contents shorter while text is selected. ( #9069 )
2025-11-18 16:20:51 +01:00
ocornut
e60e5bff63
Misc: standardized casing of keyboard mods in comments and demo ("CTRL" -> "Ctrl").
2025-11-13 15:24:03 +01:00
ocornut
bd0e2036e0
Drag and Drop: added ImGuiDragDropFlags_AcceptDrawAsHovered. ( #8632 )
...
Not calling SetHoveredId() in that path, does not seem necessary.
2025-11-06 18:07:18 +01:00
ocornut
3c578fa87e
InputText: restore truncating, now between UTF-8 codepoint. ( #9029 )
...
Amend e612536 , 2a194e2 .
2025-10-29 18:40:40 +01:00
ocornut
8df962a6ed
Debug Tools: fixed DebugTextEncoding() potentially reading out of bounds if provided a trailing truncated UTF-8 sequence.
2025-10-29 17:58:52 +01:00
ocornut
2a194e21a0
InputText: revert truncation behavior from e612536 as it can truncate mid-UTF8. ( #9029 )
2025-10-29 17:24:23 +01:00
ocornut
9753c741b9
Disabled, ButtonBehavior: fixed a bug when a previously enabled item that got nav focus and then turns disabled could still be activated using keyboard. ( #9036 )
...
ButtonBehavior() was relying on lack of nav focus for keyboard handling
2025-10-29 16:43:27 +01:00
ocornut
7c483a0eba
Add indentation to ButtonBehavior() - no logic change.
2025-10-29 16:39:37 +01:00
ocornut
8019d39545
Shuffle a few internal context fields to reduce padding.
2025-10-28 19:06:36 +01:00
ocornut
a1632c6116
InputText, Demo: amend comments to direct more users to the std::string version.
...
https://www.youtube.com/watch?v=pLwvNdpTpjs wasted a solid hour before finding this.
Crazy that people are using AI instead of actually _reading_ comments, demo and headers. (The information appeared multiple times on their screen)
2025-10-24 17:10:57 +02:00
ocornut
e6125361f9
InputText: paste does a truncate when not fitting instead of ignoring it. ( #9029 )
2025-10-23 20:53:29 +02:00
ocornut
b7e45b3a48
InputText: rework STB_TEXTEDIT_INSERTCHARS() signature to allow partial insertion (unused). ( #9029 )
...
To be submitted as a PR to nothings/stb.
2025-10-23 20:19:16 +02:00
ocornut
750c5d2a61
InputText: do not require anymore that CursorPos be clamped by user code. ( #9029 )
...
Add clamping outside of callback code + simplify logic. The previous logic checking for difference was because old code e.g. 21d03edcb0 required a ImTextCountCharsFromUtf8() which is not required since #7925 .
2025-10-23 18:54:32 +02:00
ocornut
e571ccf3f4
InputText: removed unnecessary variables.
2025-10-23 18:43:20 +02:00
ocornut
63bfad401f
MultiSelect: added ImGuiMultiSelectFlags_NoSelectOnRightClick. ( #8200 , #9015 )
2025-10-20 18:58:45 +02:00
ocornut
36de604a5b
InputText: avoid continuously overwriting ownership of ImGuiKey_Enter / ImGuiKey_KeypadEnter in order to allow e.g. external Shortcut to override behavior. ( #9004 )
2025-10-16 16:12:40 +02:00
ocornut
2a5e9a15e4
InputTextMultiline: fixed a crash when using ImGuiInputTextFlags_WordWrap and resizing the parent window while keeping the multi-line field active. ( #9007 , #3237 )
2025-10-15 19:12:40 +02:00
ocornut
7d8d587bc0
Version 1.92.5 WIP
2025-10-15 16:46:18 +02:00
ocornut
9a5d5c45f5
Version 1.92.4
2025-10-14 19:26:56 +02:00
ocornut
2b770a029b
InputText: fixed an infinite loop error happening if a custom input text callback modifies/clear BufTextLen before calling InsertChars(). ( #8994 , #3237 )
...
+ misc comments.
2025-10-08 19:06:12 +02:00
ocornut
2128e2f44b
Style: added ImGuiCol_UnsavedMarker. ( #8983 )
2025-10-06 12:16:48 +02:00
ocornut
1c87024840
InputText: fixed single-line InputText() not applying fine character clipping properly (regression in 1.92.3). ( #8967 )
2025-09-29 13:38:27 +02:00
ocornut
0e7cd694eb
Version 1.92.4 WIP
2025-09-18 15:38:46 +02:00
ocornut
1c544ee941
Version 1.92.3
2025-09-17 18:37:56 +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
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
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
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
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
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
Harry Mander
5e5658e68f
Debug Tools: fixed assertion failure when opening a combo box while using io.ConfigDebugBeginReturnValueOnce/ConfigDebugBeginReturnValueLoop. ( #8931 )
2025-09-10 19:12:03 +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
e66afbbbe0
Selectable: ImGuiSelectableFlags_SelectOnNav doesn't close popups.
2025-09-09 17:33:03 +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
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
3cc7d1c81a
InputText: InputTextCalcTextSize() uses ImFontCalcTextSizeEx().
...
(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
fdsa
09ebcf1779
Docs: fixed mismatched parentheses & other small changes. ( #8922 )
2025-09-08 11:30:14 +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