A labelled numeric - value + row: label left, stepper box right. Clicking -/+ changes by
step, clamped to [min, max]; holding repeats after a delay with acceleration. Clicking
the value itself types a number directly (Enter/blur commits, Escape cancels).
onChange(value) fires on every change; decimals controls display rounding.
Constructor
new(label:String, width:Float, value:Float, step:Float = 1, ?onChange:Float ‑> Void)
Parameters:
label | the row text on the left |
|---|---|
width | layout width (the stepper box sits at the right edge) |
value | the initial value |
step | the per-click delta |
onChange | fired on every value change (clicks, holds and typed commits) |
Variables
Methods
bump(dir:Int, multiplier:Float = 1):Void
Applies a delta and notifies onChange.
Parameters:
dir | -1 or +1 (0 is ignored) |
|---|---|
multiplier | scales the step for accelerated input |
localize(key:String, fallback:String):Void
Switches the label to a localized string.
Parameters:
key | the translation key |
|---|---|
fallback | the source-language text |