asge::game::components::UIButton
The click-signal and fill-color half of a clickable UI widget.
#include <UIButton.hpp>Collaboration
classDiagram
class N1["asge::game::components::UIButton"]
class N2["asge::game::components::details::StateColors"]
class N3["asge::graphics::RGBA_Color"]
class N4["asge::signals::Signal"]
N1 --> N2 : m_Colors
N1 --> N4 : m_OnClick
N2 --> N3 : m_Color
click N1 href "structasge_1_1game_1_1components_1_1UIButton.html"
click N2 href "structasge_1_1game_1_1components_1_1details_1_1StateColors.html"
click N3 href "structasge_1_1graphics_1_1RGBA__Color.html"
click N4 href "classasge_1_1signals_1_1Signal.html"
A full button is UIButton + Interactable (hover/held/click state) + UIRect (its rectangular footprint); add UILabel for a text caption. RenderSystem's Draw(UIRect) picks m_Colors' m_Color/m_HoverColor/ m_PressedColor by the sibling Interactable's m_Hovered/m_Held (held wins), and systems::UIInteractionSystem fires m_OnClick once, the frame that same Interactable transitions from held to released while still hovered.
Public Attributes
#
details::StateColors m_Colors#
signals::Signal m_OnClick