asge::game::components::UICheckbox
A toggleable box, drawn and hit-tested like UIButton.
#include <UICheckbox.hpp>Collaboration
classDiagram
class N4["asge::signals::Signal"]
class N1["asge::game::components::UICheckbox"]
class N2["asge::game::components::details::StateColors"]
class N3["asge::graphics::RGBA_Color"]
N1 --> N2 : m_BoxColors
N1 --> N3 : m_CheckColor
N1 --> N4 : m_OnToggled
N2 --> N3 : m_Color
click N4 href "classasge_1_1signals_1_1Signal.html"
click N1 href "structasge_1_1game_1_1components_1_1UICheckbox.html"
click N2 href "structasge_1_1game_1_1components_1_1details_1_1StateColors.html"
click N3 href "structasge_1_1graphics_1_1RGBA__Color.html"
A full checkbox is UICheckbox + Interactable (hover/held/click state) + UIRect (its rectangular footprint); add UILabel for a caption alongside it. RenderSystem's Draw(UIRect) picks m_BoxColors' m_Color/m_HoverColor/ m_PressedColor by the sibling Interactable's m_Hovered/m_Held (held wins, same as UIButton), then draws an inset m_CheckColor square on top when m_Checked is true. systems::UIInteractionSystem flips m_Checked and fires m_OnToggled once, the frame that same Interactable transitions from held to released while still hovered.
Public Attributes
#
details::StateColors m_BoxColors#
graphics::RGBA_Color m_CheckColor { graphics::colors::s_Black }#
signals::Signal< bool > m_OnToggled