pub enum SettingOp {
Next,
Prev,
SetIndex(usize),
SetFraction(f32),
Rebind(InputKey),
RebindButton(GamepadButton),
}Expand description
What a “setting:*” action does to its value: cycle one step (for a stepper row), jump to an absolute option index (for a dropdown pick), set an absolute position in [0, 1] (for a slider row’s drag), or bind a key (for a key-rebind row).
Eq is intentionally not derived: SetFraction carries an f32.
Variants§
Next
Step the value one option forward.
Prev
Step the value one option back.
SetIndex(usize)
Jump straight to this option index (clamped to the option count). Sent once when the user picks an entry from an open dropdown list.
SetFraction(f32)
Set the value to this fraction of its range, 0.0..=1.0. Sent each frame while a slider is dragged.
Rebind(InputKey)
Bind the named action (the command’s setting) to this key. Sent once when the user presses a key while a rebind row is capturing.
RebindButton(GamepadButton)
Bind the named gamepad action (the command’s pad_* setting) to this
button. Sent once when the user presses a button while a gamepad rebind
row is capturing.