Search Results for

    Show / Hide Table of Contents

    Class PointerHitbox

    Pointer hitbox class

    Inheritance
    object
    PointerHitbox
    Namespace: Terminaux.Inputs.Pointer
    Assembly: Terminaux.dll
    Syntax
    public class PointerHitbox

    Constructors

    | Edit this page View Source

    PointerHitbox(Coordinate, Action<PointerEventContext>?)

    Makes a new instance of the pointer hitbox

    Declaration
    public PointerHitbox(Coordinate point, Action<PointerEventContext>? callback)
    Parameters
    Type Name Description
    Coordinate point

    Pointer hitbox to process at this point

    Action<PointerEventContext> callback

    Callback function to run when a mouse event around it is processed

    | Edit this page View Source

    PointerHitbox(Coordinate, Func<PointerEventContext, object?>?)

    Makes a new instance of the pointer hitbox

    Declaration
    public PointerHitbox(Coordinate point, Func<PointerEventContext, object?>? callback)
    Parameters
    Type Name Description
    Coordinate point

    Pointer hitbox to process at this point

    Func<PointerEventContext, object> callback

    Callback function to run when a mouse event around it is processed

    | Edit this page View Source

    PointerHitbox(Coordinate, Coordinate, Action<PointerEventContext>?)

    Makes a new instance of the pointer hitbox

    Declaration
    public PointerHitbox(Coordinate start, Coordinate end, Action<PointerEventContext>? callback)
    Parameters
    Type Name Description
    Coordinate start

    Starting position of the pointer hitbox

    Coordinate end

    Ending position of the pointer hitbox

    Action<PointerEventContext> callback

    Callback function to run when a mouse event around it is processed

    | Edit this page View Source

    PointerHitbox(Coordinate, Coordinate, Func<PointerEventContext, object?>?)

    Makes a new instance of the pointer hitbox

    Declaration
    public PointerHitbox(Coordinate start, Coordinate end, Func<PointerEventContext, object?>? callback)
    Parameters
    Type Name Description
    Coordinate start

    Starting position of the pointer hitbox

    Coordinate end

    Ending position of the pointer hitbox

    Func<PointerEventContext, object> callback

    Callback function to run when a mouse event around it is processed

    | Edit this page View Source

    PointerHitbox(Coordinate, Size, Action<PointerEventContext>?)

    Makes a new instance of the pointer hitbox

    Declaration
    public PointerHitbox(Coordinate start, Size size, Action<PointerEventContext>? callback)
    Parameters
    Type Name Description
    Coordinate start

    Starting position of the pointer hitbox

    Size size

    Size of the pointer hitbox

    Action<PointerEventContext> callback

    Callback function to run when a mouse event around it is processed

    | Edit this page View Source

    PointerHitbox(Coordinate, Size, Func<PointerEventContext, object?>?)

    Makes a new instance of the pointer hitbox

    Declaration
    public PointerHitbox(Coordinate start, Size size, Func<PointerEventContext, object?>? callback)
    Parameters
    Type Name Description
    Coordinate start

    Starting position of the pointer hitbox

    Size size

    Size of the pointer hitbox

    Func<PointerEventContext, object> callback

    Callback function to run when a mouse event around it is processed

    Properties

    | Edit this page View Source

    Button

    Gets the button or the scrolling direction

    Declaration
    public PointerButton Button { get; set; }
    Property Value
    Type Description
    PointerButton
    | Edit this page View Source

    ButtonPress

    Gets the button press state

    Declaration
    public PointerButtonPress ButtonPress { get; set; }
    Property Value
    Type Description
    PointerButtonPress
    | Edit this page View Source

    ClickTier

    Specifies whether this is a single-click (1), double-click (2), or more. Only populated in the Released event, and you'll need to populate it when listening to this event via the hitbox instance if ProcessTier is on.

    Declaration
    public int ClickTier { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Dragging

    Whether the pointer is being dragged or not

    Declaration
    public bool Dragging { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    End

    Gets the position of where the mouse hitbox ends (usually lower right corner of a rectangle)

    Declaration
    public Coordinate End { get; }
    Property Value
    Type Description
    Coordinate
    | Edit this page View Source

    Modifiers

    Gets the modifiers pressed at the time of the event

    Declaration
    public PointerModifiers Modifiers { get; set; }
    Property Value
    Type Description
    PointerModifiers
    | Edit this page View Source

    ProcessTier

    Whether to process the click tier or not

    Declaration
    public bool ProcessTier { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Size

    Gets the size of the hitbox

    Declaration
    public Size Size { get; }
    Property Value
    Type Description
    Size
    | Edit this page View Source

    Start

    Gets the position of where the mouse hitbox starts (usually upper left corner of a rectangle)

    Declaration
    public Coordinate Start { get; }
    Property Value
    Type Description
    Coordinate

    Methods

    | Edit this page View Source

    IsPointerModifierMatch(PointerEventContext)

    Checks to see whether the pointer matches the modifier conditions specified

    Declaration
    public bool IsPointerModifierMatch(PointerEventContext context)
    Parameters
    Type Name Description
    PointerEventContext context

    Pointer event context to use in comparison

    Returns
    Type Description
    bool

    True if the pointer meets all modifier conditions; otherwise, false.

    | Edit this page View Source

    IsPointerWithin(PointerEventContext)

    Checks to see whether the pointer is within this hitbox

    Declaration
    public bool IsPointerWithin(PointerEventContext context)
    Parameters
    Type Name Description
    PointerEventContext context

    Pointer event context to use in comparison

    Returns
    Type Description
    bool

    True if the pointer is within the hitbox; otherwise, false.

    | Edit this page View Source

    ProcessPointer(PointerEventContext, out bool)

    Processes the pointer with a callback function

    Declaration
    public object? ProcessPointer(PointerEventContext context, out bool status)
    Parameters
    Type Name Description
    PointerEventContext context

    Pointer event context to use when processing the pointer

    bool status

    True if the pointer is within the hitbox and meets all modifier conditions; otherwise, false.

    Returns
    Type Description
    object

    null if status is false or if there is no callback function; otherwise, the callback function return value

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX