Table of Contents

Class MouseInputElement

Namespace
RichHudFramework.UI
Assembly
RichHudClient.dll

Core mouse interaction component for clickable UI elements. Handles cursor enter/exit, left/right clicks, tooltip registration, and automatic focus acquisition on click.

public class MouseInputElement : HudElementBase, IReadOnlyHudElement, IReadOnlyHudNode, IReadOnlyHudParent, IMouseInput, IFocusableElement
Inheritance
MouseInputElement
Implements
Derived
Inherited Members

Constructors

MouseInputElement()

public MouseInputElement()

MouseInputElement(HudParentBase)

public MouseInputElement(HudParentBase parent)

Parameters

parent HudParentBase

Properties

CursorEnteredCallback

Invoked when the mouse cursor enters the element's interactive area. Event initializer.

public EventHandler CursorEnteredCallback { set; }

Property Value

EventHandler

CursorExitedCallback

Invoked when the mouse cursor leaves the element's interactive area. Event initializer.

public EventHandler CursorExitedCallback { set; }

Property Value

EventHandler

FocusHandler

UI element that owns the input, used for event callbacks.

public IFocusHandler FocusHandler { get; protected set; }

Property Value

IFocusHandler

IsLeftClicked

Returns true if the element is currently being held down with the left mouse button.

public bool IsLeftClicked { get; }

Property Value

bool

IsLeftReleased

Returns true if the element was just released after being left-clicked this frame.

public bool IsLeftReleased { get; }

Property Value

bool

IsNewLeftClicked

Returns true if the element was just clicked with the left mouse button this frame.

public bool IsNewLeftClicked { get; }

Property Value

bool

IsNewRightClicked

Returns true if the element was just clicked with the right mouse button this frame.

public bool IsNewRightClicked { get; }

Property Value

bool

IsRightClicked

Returns true if the element is currently being held down with the right mouse button.

public bool IsRightClicked { get; }

Property Value

bool

IsRightReleased

Returns true if the element was just released after being right-clicked this frame.

public bool IsRightReleased { get; }

Property Value

bool

LeftClickedCallback

Invoked when the element is clicked with the left mouse button. Event initializer.

public EventHandler LeftClickedCallback { set; }

Property Value

EventHandler

LeftReleasedCallback

Invoked when the left mouse button is released over the element. Event initializer.

public EventHandler LeftReleasedCallback { set; }

Property Value

EventHandler

RequestCursor

If true, the input element will temporarily show the cursor while it's enabled.

Uses EnableCursorTemp().

public bool RequestCursor { get; set; }

Property Value

bool

RightClickedCallback

Invoked when the element is clicked with the right mouse button. Event initializer.

public EventHandler RightClickedCallback { set; }

Property Value

EventHandler

RightReleasedCallback

Invoked when the right mouse button is released over the element. Event initializer.

public EventHandler RightReleasedCallback { set; }

Property Value

EventHandler

ToolTip

Optional tooltip text shown when the element is moused over.

public ToolTip ToolTip { get; set; }

Property Value

ToolTip

Methods

ClearSubscribers()

Clears all subscribers to mouse input events.

public void ClearSubscribers()

LeftClick()

Invokes left click event

public virtual void LeftClick()

RightClick()

Invokes right click event

public virtual void RightClick()

Events

CursorEntered

Invoked when the mouse cursor enters the element's interactive area.

public event EventHandler CursorEntered

Event Type

EventHandler

CursorExited

Invoked when the mouse cursor leaves the element's interactive area.

public event EventHandler CursorExited

Event Type

EventHandler

LeftClicked

Invoked when the element is clicked with the left mouse button.

public event EventHandler LeftClicked

Event Type

EventHandler

LeftReleased

Invoked when the left mouse button is released over the element.

public event EventHandler LeftReleased

Event Type

EventHandler

RightClicked

Invoked when the element is clicked with the right mouse button.

public event EventHandler RightClicked

Event Type

EventHandler

RightReleased

Invoked when the right mouse button is released over the element.

public event EventHandler RightReleased

Event Type

EventHandler