class GUIHoverHitBox

Helper class used for detecting when mousing over a certain and getting notified when that state changes.

Public

Methods

staticGetGuiTypeName

static const String &GetGuiTypeName()

Returns type name of the GUI element used for finding GUI element styles.

staticCreate

static GUIHoverHitBox *Create()

Creates a new hover hit box that will detect mouse hover/out events over certain area.

staticCreate

static GUIHoverHitBox *Create(const GUIOptions &options)

Creates a new hover hit box that will detect mouse hover/out events over certain area.

Fields

OnHover

Event<void ()> OnHover

Triggered when pointer hovers over the hit box.

OnOut

Event<void ()> OnOut

Triggered when pointer that was previously hovering leaves the hit box.

Private

Constructors

GUIHoverHitBox

GUIHoverHitBox(const GUISizeConstraints &dimensions)

Methods

DoOnMouseEvent

bool DoOnMouseEvent(const GUIMouseEvent &ev) override

Called when a mouse event is received on any GUI element the mouse is interacting with.

Return true if you have processed the event and don't want other elements to process it.