Skip to main content

Module drag_value

Module drag_value 

Source
Expand description

DragValue — a numeric scrubber that lets the user drag left/right to change a value.

Displays the current value as formatted text centered inside a lightly tinted rectangle. Clicking and dragging horizontally adjusts the value at a configurable speed; the value is clamped to [min, max] and optionally snapped to a step interval.

A plain click (no significant drag) enters an inline edit mode: the widget shows a cursor and accepts keyboard input. Pressing Enter or losing focus commits the edit; Escape cancels it.

Typical use-case: property panels, inspector rows, compact parameter editors.

Structs§

DragValue
A horizontal drag-to-scrub numeric value widget.