← API Reference Struct

asge::game::components::UISlider

A draggable value picker between m_Min and m_Max, drawn and hit-tested like UIButton.

#include <UISlider.hpp>

Collaboration

classDiagram
    class N4["asge::signals::Signal"]
    class N1["asge::game::components::UISlider"]
    class N3["asge::game::components::details::StateColors"]
    class N2["asge::graphics::RGBA_Color"]
    N1 --> N2 : m_TrackColor
    N1 --> N3 : m_ThumbColor
    N1 --> N4 : m_OnValueChanged
    N3 --> N2 : m_Color
    click N4 href "classasge_1_1signals_1_1Signal.html"
    click N1 href "structasge_1_1game_1_1components_1_1UISlider.html"
    click N3 href "structasge_1_1game_1_1components_1_1details_1_1StateColors.html"
    click N2 href "structasge_1_1graphics_1_1RGBA__Color.html"

A full slider is UISlider + Interactable + UIRect (its footprint). RenderSystem draws a filled/empty track split at the thumb plus a circular thumb colored by m_ThumbColor's state. systems::UIInteractionSystem sets m_Value from the pointer's x while the Interactable is held (even off the rect) and fires m_OnValueChanged whenever it changes, including on the initial press.

Public Attributes

#float m_Min { 0.0f }
#float m_Max { 1.0f }
#float m_Value { 0.0f }
#details::StateColors m_ThumbColor {}
#signals::Signal< float > m_OnValueChanged