74 virtual void SetSize(
float width,
float height) = 0;
81 virtual void GetSize(
float &width,
float &height)
const = 0;
Abstract interface for UI sliders.
virtual float GetValue() const =0
Get the current value.
virtual void SetEnabled(bool enabled)=0
Enable or disable the slider.
virtual void SetAlign(Align align)=0
Set alignment mode relative to the window.
virtual void GetPosition(float &x, float &y) const =0
Get the current top-left position of the slider.
virtual Align GetAlign() const =0
Get the current alignment mode.
virtual void SetMaxValue(float maxValue)=0
Set the maximum value.
virtual ~ISlider()=default
Virtual destructor.
virtual void GetSize(float &width, float &height) const =0
Get the current size of the slider.
virtual void SetValue(float value)=0
Set the current value.
virtual void SetTrackColor(unsigned int color)=0
Set the track color (unfilled portion).
virtual void SetOnValueChanged(std::function< void(float)> callback)=0
Set callback invoked when value changes.
virtual void SetMinValue(float minValue)=0
Set the minimum value.
virtual void Render()=0
Render the slider.
virtual void ApplyAlignment()=0
Apply the current alignment mode to the position.
virtual void SetPosition(float x, float y)=0
Set the top-left position of the slider.
virtual void Update()=0
Update the slider internal state (hover, drag).
virtual void SetFilledColor(unsigned int color)=0
Set the filled track color (portion before handle).
virtual bool IsEnabled() const =0
Check if the slider is enabled.
virtual void SetHandleColor(unsigned int color)=0
Set the handle color.
virtual void SetSize(float width, float height)=0
Set the slider size.
virtual void SetHandleHoverColor(unsigned int color)=0
Set the handle hover color.
Align
Alignment modes relative to the current window.