Search Results for

    Show / Hide Table of Contents

    Class ButtonStateTracker<TButton>

    Tracks button state changes.

    Inheritance
    object
    ButtonStateTracker<TButton>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Evergine.Common.Input
    Assembly: Evergine.Common.dll
    Syntax
    public class ButtonStateTracker<TButton>
    Type Parameters
    Name Description
    TButton

    The type of the 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 every 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()

    Do a commit operation and update 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 be checked.

    Returns
    Type Description
    bool

    true if the button is down; otherwise, false.

    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