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
parentHudParentBase
Properties
CursorEnteredCallback
Invoked when the mouse cursor enters the element's interactive area. Event initializer.
public EventHandler CursorEnteredCallback { set; }
Property Value
CursorExitedCallback
Invoked when the mouse cursor leaves the element's interactive area. Event initializer.
public EventHandler CursorExitedCallback { set; }
Property Value
FocusHandler
UI element that owns the input, used for event callbacks.
public IFocusHandler FocusHandler { get; protected set; }
Property Value
IsLeftClicked
Returns true if the element is currently being held down with the left mouse button.
public bool IsLeftClicked { get; }
Property Value
IsLeftReleased
Returns true if the element was just released after being left-clicked this frame.
public bool IsLeftReleased { get; }
Property Value
IsNewLeftClicked
Returns true if the element was just clicked with the left mouse button this frame.
public bool IsNewLeftClicked { get; }
Property Value
IsNewRightClicked
Returns true if the element was just clicked with the right mouse button this frame.
public bool IsNewRightClicked { get; }
Property Value
IsRightClicked
Returns true if the element is currently being held down with the right mouse button.
public bool IsRightClicked { get; }
Property Value
IsRightReleased
Returns true if the element was just released after being right-clicked this frame.
public bool IsRightReleased { get; }
Property Value
LeftClickedCallback
Invoked when the element is clicked with the left mouse button. Event initializer.
public EventHandler LeftClickedCallback { set; }
Property Value
LeftReleasedCallback
Invoked when the left mouse button is released over the element. Event initializer.
public EventHandler LeftReleasedCallback { set; }
Property Value
RequestCursor
If true, the input element will temporarily show the cursor while it's enabled.
Uses EnableCursorTemp().
public bool RequestCursor { get; set; }
Property Value
RightClickedCallback
Invoked when the element is clicked with the right mouse button. Event initializer.
public EventHandler RightClickedCallback { set; }
Property Value
RightReleasedCallback
Invoked when the right mouse button is released over the element. Event initializer.
public EventHandler RightReleasedCallback { set; }
Property Value
ToolTip
Optional tooltip text shown when the element is moused over.
public ToolTip ToolTip { get; set; }
Property Value
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
CursorExited
Invoked when the mouse cursor leaves the element's interactive area.
public event EventHandler CursorExited
Event Type
LeftClicked
Invoked when the element is clicked with the left mouse button.
public event EventHandler LeftClicked
Event Type
LeftReleased
Invoked when the left mouse button is released over the element.
public event EventHandler LeftReleased
Event Type
RightClicked
Invoked when the element is clicked with the right mouse button.
public event EventHandler RightClicked
Event Type
RightReleased
Invoked when the right mouse button is released over the element.
public event EventHandler RightReleased