Search Results for

    Show / Hide Table of Contents

    Class ButtonStateTracker<TButton>

    Tracks button state changes.

    Inheritance
    object
    ButtonStateTracker<TButton>
    Namespace: Evergine.Common.Input
    Assembly: Evergine.Common.dll
    Syntax
    public class ButtonStateTracker<TButton>
    Type Parameters
    Name Description
    TButton

    The type of buttons to be tracked.

    Constructors

    ButtonStateTracker(Action<TButton>)

    Initializes a new instance of the ButtonStateTracker<TButton> class.

    Declaration
    public ButtonStateTracker(Action<TButton> onReleasing = null)
    Parameters
    Type Name Description
    Action<TButton> onReleasing

    Action to be invoked for each releasing button.

    Methods

    ButtonDown(TButton)

    Handles a button down event.

    Declaration
    public void ButtonDown(TButton button)
    Parameters
    Type Name Description
    TButton button

    The button.

    ButtonUp(TButton)

    Handles a button-up event.

    Declaration
    public void ButtonUp(TButton button)
    Parameters
    Type Name Description
    TButton button

    The button.

    Commit()

    Performs a commit operation and updates the button status.

    Declaration
    public void Commit()

    IsButtonDown(TButton)

    Gets a value indicating whether the current state of a button is Pressing or Pressed.

    Declaration
    public bool IsButtonDown(TButton button)
    Parameters
    Type Name Description
    TButton button

    The button to check.

    Returns
    Type Description
    bool

    true if the button is pressed; false otherwise.

    ReadButtonState(TButton)

    Gets the current state of a button.

    Declaration
    public ButtonState ReadButtonState(TButton button)
    Parameters
    Type Name Description
    TButton button

    The button to be checked.

    Returns
    Type Description
    ButtonState

    The state of the specified button.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX