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>
- 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",
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
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.
Using a FrameCount for compare. Kept time as float to be consistent with other GC-related timestamps: if there is an actual need to use double we'll switch everywhere.