UISlider Class

Slider UI component for adjusting numeric values.

public class UISlider : Brine2D.UI.IUIComponent

Inheritance System.Object → UISlider

Implements IUIComponent

Properties
FillColor Fill color (filled portion).
HandleColor Handle (thumb) color.
HandleHoverColor Handle color when hovered.
HandleSize Handle size in pixels.
IsDragging Returns whether the slider is currently being dragged.
MaxValue Maximum value.
MinValue Minimum value.
ShowValue Whether to show the value as text.
Step Step size for value increments (0 = continuous).
TrackColor Track color (background bar).
Value Current value (between MinValue and MaxValue).
ValueFormat Value display format (e.g., "0.00" for 2 decimal places).
ValueTextColor Text color for value display.
Methods
EndDrag() Called by UICanvas when mouse drag ends.
GetNormalizedValue() Gets the normalized value (0.0 to 1.0).
SetHovered(bool) Called by UICanvas when mouse hovers over slider.
StartDrag() Called by UICanvas when mouse drag starts.
UpdateDrag(Vector2) Called by UICanvas during mouse drag.
Events
OnValueChanged Event fired when value changes.