Search Results for

    Class PointerHitbox

    Pointer hitbox class

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


    Constructors

    PointerHitbox(Coordinate, Action<PointerEventContext>?)

    Makes a new instance of the pointer hitbox

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

    Pointer hitbox to process at this point

    callback Action<PointerEventContext>

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

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

    Makes a new instance of the pointer hitbox

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

    Pointer hitbox to process at this point

    callback Func<PointerEventContext, object>

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

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

    Makes a new instance of the pointer hitbox

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

    Starting position of the pointer hitbox

    end Coordinate

    Ending position of the pointer hitbox

    callback Action<PointerEventContext>

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

    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
    Name Type Description
    start Coordinate

    Starting position of the pointer hitbox

    end Coordinate

    Ending position of the pointer hitbox

    callback Func<PointerEventContext, object>

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

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

    Makes a new instance of the pointer hitbox

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

    Starting position of the pointer hitbox

    size Size

    Size of the pointer hitbox

    callback Action<PointerEventContext>

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

    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
    Name Type Description
    start Coordinate

    Starting position of the pointer hitbox

    size Size

    Size of the pointer hitbox

    callback Func<PointerEventContext, object>

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



    Properties

    Button

    Gets the button or the scrolling direction

    Property Value
    PointerButton
    Declaration
    public PointerButton Button { get; set; }

    ButtonPress

    Gets the button press state

    Property Value
    PointerButtonPress
    Declaration
    public PointerButtonPress ButtonPress { get; set; }

    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.

    Property Value
    int
    Declaration
    public int ClickTier { get; set; }

    Dragging

    Whether the pointer is being dragged or not

    Property Value
    bool
    Declaration
    public bool Dragging { get; set; }

    End

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

    Property Value
    Coordinate
    Declaration
    public Coordinate End { get; }

    Modifiers

    Gets the modifiers pressed at the time of the event

    Property Value
    PointerModifiers
    Declaration
    public PointerModifiers Modifiers { get; set; }

    ProcessTier

    Whether to process the click tier or not

    Property Value
    bool
    Declaration
    public bool ProcessTier { get; set; }

    Size

    Gets the size of the hitbox

    Property Value
    Size
    Declaration
    public Size Size { get; }

    Start

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

    Property Value
    Coordinate
    Declaration
    public Coordinate Start { get; }


    Methods

    IsPointerModifierMatch(PointerEventContext)

    Checks to see whether the pointer matches the modifier conditions specified

    Returns
    bool

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

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

    Pointer event context to use in comparison

    IsPointerWithin(PointerEventContext)

    Checks to see whether the pointer is within this hitbox

    Returns
    bool

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

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

    Pointer event context to use in comparison

    ProcessPointer(PointerEventContext, out bool)

    Processes the pointer with a callback function

    Returns
    object

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

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

    Pointer event context to use when processing the pointer

    status bool

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

    Show / Hide Table of Contents

    Table of contents



      About

      Copyright © 2014-2026 Aptivi

      Find us

    •  
    •  
    •  
    •  
    •  
    •  
    • Social media

    •  
    •  
    •  
    •