36 friend class UIComponent;
38 friend class Dropdown;
39 friend class ScrollList;
101 p->
pOwningCanvas->OnComponentLayerChanged(p, oldLayer, newLayer);
Attorney for game loop access to UIComponent methods.
Definition UIAttorney.h:34
static void OnButtonRelease(UIComponent *p)
Calls the OnRelease method of the Button object.
Definition UIAttorney.h:84
static void OnComponentLayerChanged(UIComponent *p, int oldLayer, int newLayer)
Sets the enabled state of the UIComponent.
Definition UIAttorney.h:97
static void Render(UIComponent *p)
Calls the Render method of the UIComponent object.
Definition UIAttorney.h:45
static void OnButtonHover(UIComponent *p)
Calls the OnPress method of the Button object.
Definition UIAttorney.h:72
static bool IsEnabled(UIComponent *p)
Checks if the UIComponent is enabled.
Definition UIAttorney.h:90
static bool IsMouseOver(UIComponent *p, float xPos, float yPos)
Checks if the mouse is over the UIComponent object.
Definition UIAttorney.h:54
static void OnPress(UIComponent *p)
Calls the OnPress method of the UIComponent object.
Definition UIAttorney.h:60
static void OnButtonHold(UIComponent *p)
Calls the OnHold method of the Button object.
Definition UIAttorney.h:78
static UIComponentType GetType(UIComponent *p)
Calls the OnRelease method of the UIComponent object.
Definition UIAttorney.h:66
Attorney class for controlled access to UIComponent internals.
Definition UIAttorney.h:21
virtual bool IsMouseOver(float xPos, float yPos)=0
Checks if the mouse is over the component. Must be implemented by derived classes.
UIComponentType GetType() const
Gets the type of the UI component.
Definition UIComponent.h:55
Canvas * pOwningCanvas
Pointer to the owning canvas, if any.
Definition UIComponent.h:79
virtual void Render()=0
Renders the UI component. Must be implemented by derived classes.
bool IsEnabled() const
Returns whether the component is enabled or not.
Definition UIComponent.h:61
virtual void OnPress()=0
Handles press events on the component. Must be implemented by derived classes.