Timo Suoranta
0cc7e51da2
Drags: added value ladder: stepped value editing with explicit magnitude selection (Houdini-style) ( #9463 )
...
Hold middle mouse button over a DragXXX widget to open a vertical ladder
of step magnitudes: drag vertically to select the step magnitude,
horizontally to add/subtract steps of that size. Release middle mouse
button to confirm, press Escape to cancel and revert to the initial value.
- Enable globally with io.ConfigDragValueLadder or per-widget with
ImGuiSliderFlags_ValueLadder.
- Rungs are powers of ten, from the smallest step representable with the
display format (1 for integers) up to 10000. For bounded widgets, rungs
covering the whole range or more are dropped.
- Keyboard/gamepad navigation support: activating the widget
(Space) opens the ladder, Up/Down select the step magnitude,
Left/Right add/subtract steps, Space confirms, Escape cancels and
reverts.
- The ladder is disabled when it would yield fewer than 3 rungs.
- Unlike regular drag speed tweaks (Alt/Shift), the ladder makes the
current step magnitude visible and exact, and any size of change is
reachable without a range.
- Min/max clamping, wrap-around and display format rounding behave the
same as regular mouse drags (reuses the DragBehaviorT pipeline).
- Multi-component widgets (DragFloat3 etc.) get a ladder per component.
- Overlay is drawn on the viewport foreground draw list, so it cannot
interfere with inputs and may spill outside the host window.
The overlay grows (monotonically, staying centered and clamped into
the viewport) whenever the formatted value is wider than the box.
- Not supported together with ImGuiSliderFlags_Logarithmic.
- Demo: added dedicated Widgets->Value Ladder section, checkboxes in
Configuration->Widgets and Widgets->Drag/Slider Flags.
- Added DataTypeAsDouble() to the DataTypeXXX API (replacing the local
ValueLadderGetValueAsDouble() helper). Range span is computed with
DataTypeApplyOp() subtraction followed by DataTypeAsDouble(), which
also clamps integer overflow.
Addresses feature request #9463 .
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-17 09:41:42 +03:00
ocornut
367b2c24f3
Merge branch 'master' into docking
2026-09-09 21:25:09 +02:00
ocornut
e8602501bb
Mixed Value: various fixes. ( #5518 , #5677 , #6865 )
...
- With MixedValue+LiveEdit: a single edit that ends up with same output reports as edited.
- Standardize path sin TempInputscalar(), InputScalar(), InputTextEx().
- Refer to changes in imgui_test_suite, in particular "widgets_datatype_1", "widgets_status_liveedit_off",
2026-09-09 20:44:34 +02:00
ocornut
ea6d21687b
BeginComboPreview(): fixed issues with nesting. Previous comments were wrong. ( #1658 , #4168 )
2026-09-08 21:52:23 +02:00
ocornut
db5b735a5d
(Breaking) BeginComboPreview: removed ImGuiComboFlags_CustomPreview: now unnecessary + better detect issues ( #1658 , #4168 )
2026-09-08 19:38:42 +02:00
ocornut
32c3f6095a
BeginComboPreview: set/restore WorkRect.Max.x. ( #1658 , #4168 )
2026-09-08 17:44:56 +02:00
ocornut
148d128f6e
Mixed Value: use ImGuiCol_TextMixedValue (= ImGuiCol_TextDisabled). Set MixedValueLabel to null to display original value. ( #5518 , #5677 , #6865 )
2026-09-08 16:47:04 +02:00
ocornut
a2b7d6e792
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx10.cpp
# backends/imgui_impl_dx12.cpp
# backends/imgui_impl_metal.mm
# backends/imgui_impl_metal4.mm
# backends/imgui_impl_opengl2.cpp
# backends/imgui_impl_opengl3.cpp
# backends/imgui_impl_sdlgpu3.cpp
# backends/imgui_impl_vulkan.cpp
# imgui.cpp
2026-09-07 19:52:24 +02:00
ocornut
334f484892
ColorEdit4, ColorPicker4: added support for ImGuiItemFlags_MixedValue. ( #5518 , #5677 , #6865 )
2026-09-07 19:48:28 +02:00
ocornut
dd32dace81
InputText: using MixedValue automatically sets ImGuiInputTextFlags_AutoSelectAll. ( #5518 , #5677 , #6865 )
2026-09-07 19:09:24 +02:00
ocornut
04b37d6d23
Added ImGuiItemFlags_MixedValue support for Drags, Sliders, InputScalar, InputText, RadioButton, Combo. ( #5518 , #5677 , #6865 )
2026-09-07 18:56:32 +02:00
ocornut
687f7fb8ac
Drags, Sliders: ongoing drags may be cancelled using Right-Mouse mouse button, reverting to the initial value. ( #8564 , #9534 )
2026-09-07 16:16:55 +02:00
ocornut
96b6eb7728
Fixed PVS-Studio false positives.
...
Not sure if there's a way to report them.
2026-09-04 12:37:48 +02:00
ocornut
f150bf09f9
Drags, Sliders: ongoing drags may be cancelled using Escape or Gamepad Triangle, reverting to the initial value. ( #8564 , #9534 )
2026-09-04 12:24:49 +02:00
ocornut
51c3c0c992
Sliders: moved code from SliderBehaviorT() to SliderBehavior().
...
Remove a level of indent too.
2026-09-03 17:28:48 +02:00
slowriot
7edd2b1f12
Sliders, Drags: adjust ScaleValueFromRatioT() to increase remapping precision (in theory). ( #9536 )
...
Omar: couldn't detect any output difference in test suite with large u64/s64 ranges drag/sliders.
I believe this is entirely theoretical and it's principal value is to shut Linter warnings
2026-09-03 15:42:24 +02:00
ocornut
1807b25b9a
ScaleValueFromRatioT: removed unnecessary check, amend f27af1b20.
2026-09-03 15:29:37 +02:00
ocornut
7e1b65d26d
Merge branch 'master' into docking
...
# Conflicts:
# imgui_internal.h
2026-09-02 17:27:51 +02:00
ocornut
a15761f11c
TreeNode: fixed UB shifts and general tree issues when using ImGuiTreeNodeFlags_DrawLinesXXX flags and over 32 deep. ( #9509 )
...
+ fix minor typo (#9533 )
2026-09-01 20:06:02 +02:00
ocornut
ebc7307db5
ColorButton, RenderColorRectWithAlphaCheckerboard: fixed issues/inconsistencies with checkerboard rendering when combining color alpha and global style alpha. ( #9511 )
...
Cleanup hacks in ColorButton(). Amend d851775c80 , e9ff7162b .
2026-08-31 18:04:03 +02:00
ocornut
fd74775a0d
ColorButton: fixed double style alpha multiply. Remove call to GetColorU32() in RenderColorRectWithAlphaCheckerboard() for consistency. ( #9511 )
...
The main fix is the change from GetColorU32() to ColorConvertFloat4ToU32() in calling code.
The change from GetColorU32() to manual multiply in RenderColorRectWithAlphaCheckerboard() is merely for consistency with other ::Render calls.
2026-08-31 17:29:10 +02:00
ocornut
19ead810d2
ColorButton, ColorEdit, ColorPicker: cancel-out alpha caused by BeginDisabled() so disabled color buttons have the same color. ( #9511 )
2026-08-31 17:29:10 +02:00
ocornut
d3c5ff395c
Drags, Sliders: fixed an overflow using ImGuiSliderFlags_Logarithmic with S32/S64 types. ( #9526 , #3361 , #1823 , #1316 , #642 )
2026-08-30 19:44:15 +02:00
ocornut
fd13a1e892
Merge branch 'master' into docking
...
# Conflicts:
# examples/example_apple_opengl2/main.mm
2026-08-19 13:39:46 +02:00
ocornut
46d39d56fe
Fixed GCC false positive. ( #9508 )
2026-08-07 18:42:39 +02:00
ocornut
551a0a6bc0
TextAligned, TextAlignedV: rework to always use provided width. ( #7024 , #9455 , #1980 )
2026-08-07 17:48:50 +02:00
ocornut
11bd4e7731
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2026-08-04 14:34:04 +02:00
ocornut
ebd752a0ec
Version 1.93.0 WIP
2026-08-03 14:42:56 +02:00
ocornut
b48d1afbe8
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
2026-07-31 16:25:00 +02:00
ocornut
f1cc2ae15e
Version 1.92.9b
2026-07-31 16:14:42 +02:00
ocornut
448ef2baa9
DragXXX, SliderXXX: fixed a regression in 1.92.9 where clicking a previously Ctrl+Clicked field would flick it to text edit mode for a frame. ( #9476 , #701 )
2026-07-31 13:09:40 +02:00
ocornut
9b4eb24cee
Merge branch 'master' into docking
2026-07-25 13:45:27 +02:00
ocornut
01380c5797
Version 1.92.9
2026-07-25 13:28:06 +02:00
ocornut
93bd4f0adb
Merge branch 'master' into docking
...
# Conflicts:
# .github/workflows/build.yml
# backends/imgui_impl_opengl2.cpp
# backends/imgui_impl_opengl3.cpp
# backends/imgui_impl_sdl2.cpp
# examples/example_apple_metal4/main.mm
# imgui.cpp
2026-07-16 15:56:36 +02:00
ocornut
26b8292635
Split ImGuiItemFlags_LiveEdit into ImGuiItemFlags_LiveEditText, ImGuiItemFlags_LiveEditScalar. Added Demo contents. ( #9476 , #701 )
...
cc #3936 , #3946 , #5904 , #6284 , #8149 , #8065 , #8665 , #9117 , #9299 , #700 , #1351 , #1875 , #2060 , #2215 , #2380 , #2550 , #3083 , #3338 , #3556 , #4373 , #4714 , #4885 , #5184,#5777, #6707 , #6766 , #8004 , #8303 , #8915 , #9308
2026-07-16 15:46:47 +02:00
ocornut
4853f5c96b
Internals: rename NextItemData.ItemFlags -> ItemFlagsSet
2026-07-16 15:46:40 +02:00
ocornut
18d63b12be
Added ImGuiItemFlags_LiveEdit flag, and much-awaited support for disabling it. ( #9476 , #701 )
...
cc #3936 , #3946 , #5904 , #6284 , #8149 , #8065 , #8665 , #9117 , #9299 , #700 , #1351 , #1875 , #2060 , #2215 , #2380 , #2550 , #3083 , #3338 , #3556 , #4373 , #4714 , #4885 , #5184,#5777, #6707 , #6766 , #8004 , #8303 , #8915 , #9308
2026-07-16 15:39:53 +02:00
ocornut
2392a52660
InputText: tag InputTextDeactivatedState with an elapsing frame. Avoid unnecessary InputTextDeactivateHook() call on manual deactivation. InputTextDeactivateHook() only takes a record when Edited + callback marks edited. ( #9476 , #701 )
...
for _NoLiveEdit it's easier than we don't use IsItemDeactivatedAfterEdit() in InputText()'s `if (g.InputTextDeactivatedState.ID == id)` block.
2026-07-16 15:39:52 +02:00
ocornut
b62bfd6b06
InputText: reworked io.ConfigInputTextEnterKeepActive mode so that pressing Ctrl+Enter or Shift+Enter still allows to deactivate.
...
cc #9239
2026-07-10 21:36:43 +02:00
ocornut
a23e9fb1b5
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
2026-07-08 15:10:22 +02:00
ocornut
f626c1c793
ColorPicker: added option to fix Saturation/Value triangle in wheel picker. Amends. ( #9337 )
...
ConfigColorPickerRotateTriangle -> !ImGuiColorEditFlags_PickerNoRotate
2026-07-07 16:18:34 +02:00
ocornut
5d56c09432
ColorPicker: added option to fix Saturation/Value triangle in wheel picker. Amends. ( #9337 )
2026-07-07 16:14:13 +02:00
SeanTheBuilder1
0785cdb2bb
ColorPicker: added option to fix Saturation/Value triangle in wheel picker. ( #9337 )
2026-07-07 16:14:11 +02:00
ocornut
aca69173df
(Breaking) ColorEdit: obsoleted SetColorEditOptions() function in favor of poking to io.ConfigColorEditFlags. (Amend 0e479b9, 9f7d808)
...
Apologies, 9f7d808 was extremely flaky.
2026-07-07 16:10:35 +02:00
ocornut
9f7d8086fe
(Breaking) ColorEdit: obsoleted SetColorEditOptions() function in favor of poking to io.ColorEditFlags. (Amend 0e479b9)
...
Reordered IO fields breaks ABI backward compat which was never guaranteed. Occasional breaking is a good way to enforce that lack of guarantee!
2026-07-06 16:02:17 +02:00
ocornut
0e479b9554
(Breaking) ColorEdit: obsoleted SetColorEditOptions() function in favor of poking to style.ColorEditFlags.
2026-07-06 15:34:13 +02:00
ocornut
d098bf9657
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_glfw.cpp
# backends/imgui_impl_sdl2.cpp
# backends/imgui_impl_sdl3.cpp
# imgui.cpp
# imgui.h
# imgui_internal.h
2026-07-03 16:59:31 +02:00
ocornut
0edad6d097
Internals: track WasSelected/WasSoleSelected data for ActiveId. ( #8337 )
2026-07-01 18:53:27 +02:00
ocornut
e408733ecc
BeginMenu(), MenuItem() use NextItemData.Flags + Fixed typo in comment. ( #9456 )
2026-07-01 12:38:32 +02:00
ocornut
5098ce161d
Merge branch 'master' into docking
2026-06-25 15:48:42 +02:00