|
R-Type
Distributed multiplayer game engine in C++
|
Abstract interface for UI sliders. More...
#include <ISlider.hpp>


Public Member Functions | |
| virtual | ~ISlider ()=default |
| Virtual destructor. | |
| virtual void | Update ()=0 |
| Update the slider internal state (hover, drag). | |
| virtual void | Render ()=0 |
| Render the slider. | |
| virtual void | SetOnValueChanged (std::function< void(float)> callback)=0 |
| Set callback invoked when value changes. | |
| virtual void | SetPosition (float x, float y)=0 |
| Set the top-left position of the slider. | |
| virtual void | GetPosition (float &x, float &y) const =0 |
| Get the current top-left position of the slider. | |
| virtual void | SetSize (float width, float height)=0 |
| Set the slider size. | |
| virtual void | GetSize (float &width, float &height) const =0 |
| Get the current size of the slider. | |
| virtual void | SetTrackColor (unsigned int color)=0 |
| Set the track color (unfilled portion). | |
| virtual void | SetFilledColor (unsigned int color)=0 |
| Set the filled track color (portion before handle). | |
| virtual void | SetHandleColor (unsigned int color)=0 |
| Set the handle color. | |
| virtual void | SetHandleHoverColor (unsigned int color)=0 |
| Set the handle hover color. | |
| virtual void | SetMinValue (float minValue)=0 |
| Set the minimum value. | |
| virtual void | SetMaxValue (float maxValue)=0 |
| Set the maximum value. | |
| virtual void | SetValue (float value)=0 |
| Set the current value. | |
| virtual float | GetValue () const =0 |
| Get the current value. | |
| virtual void | SetAlign (Align align)=0 |
| Set alignment mode relative to the window. | |
| virtual Align | GetAlign () const =0 |
| Get the current alignment mode. | |
| virtual void | ApplyAlignment ()=0 |
| Apply the current alignment mode to the position. | |
| virtual void | SetEnabled (bool enabled)=0 |
| Enable or disable the slider. | |
| virtual bool | IsEnabled () const =0 |
| Check if the slider is enabled. | |
Abstract interface for UI sliders.
This interface defines a slider control with the following features:
Definition at line 30 of file ISlider.hpp.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Apply the current alignment mode to the position.
Implemented in UI::RaylibSlider.
|
pure virtual |
|
pure virtual |
Get the current top-left position of the slider.
| x | Output X position in pixels. |
| y | Output Y position in pixels. |
Implemented in UI::RaylibSlider.
|
pure virtual |
Get the current size of the slider.
| width | Output width in pixels. |
| height | Output height in pixels. |
Implemented in UI::RaylibSlider.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Render the slider.
Implemented in UI::RaylibSlider.
|
pure virtual |
Set alignment mode relative to the window.
| align | Alignment mode. |
Implemented in UI::RaylibSlider.
|
pure virtual |
Enable or disable the slider.
| enabled | true to enable, false to disable. |
Implemented in UI::RaylibSlider.
|
pure virtual |
Set the filled track color (portion before handle).
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibSlider.
|
pure virtual |
Set the handle color.
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibSlider.
|
pure virtual |
Set the handle hover color.
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibSlider.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Set callback invoked when value changes.
| callback | Function called when the slider value changes. |
Implemented in UI::RaylibSlider.
|
pure virtual |
Set the top-left position of the slider.
| x | X position in pixels. |
| y | Y position in pixels. |
Implemented in UI::RaylibSlider.
|
pure virtual |
Set the slider size.
| width | Width in pixels (track length). |
| height | Height in pixels (track thickness). |
Implemented in UI::RaylibSlider.
|
pure virtual |
Set the track color (unfilled portion).
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibSlider.
|
pure virtual |
Set the current value.
| value | Current value (will be clamped to [min, max]). |
Implemented in UI::RaylibSlider.
|
pure virtual |
Update the slider internal state (hover, drag).
Implemented in UI::RaylibSlider.