Table of Contents

Class InputStateMachine

Namespace
FlowGraph.Avalonia.Input
Assembly
FlowGraph.Avalonia.dll

Manages input state transitions and delegates events to the current state.

public class InputStateMachine
Inheritance
InputStateMachine
Inherited Members

Constructors

InputStateMachine(InputStateContext)

public InputStateMachine(InputStateContext context)

Parameters

context InputStateContext

Properties

Context

Gets the context shared across all states.

public InputStateContext Context { get; }

Property Value

InputStateContext

CurrentStateName

Gets the current state name for debugging.

public string CurrentStateName { get; }

Property Value

string

Methods

HandleKeyDown(KeyEventArgs)

public bool HandleKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs

Returns

bool

HandlePointerMoved(PointerEventArgs)

public bool HandlePointerMoved(PointerEventArgs e)

Parameters

e PointerEventArgs

Returns

bool

HandlePointerPressed(PointerPressedEventArgs, Control?)

public bool HandlePointerPressed(PointerPressedEventArgs e, Control? source)

Parameters

e PointerPressedEventArgs
source Control

Returns

bool

HandlePointerReleased(PointerReleasedEventArgs)

public bool HandlePointerReleased(PointerReleasedEventArgs e)

Parameters

e PointerReleasedEventArgs

Returns

bool

HandlePointerWheel(PointerWheelEventArgs)

public bool HandlePointerWheel(PointerWheelEventArgs e)

Parameters

e PointerWheelEventArgs

Returns

bool

Reset()

Forces a return to the idle state.

public void Reset()

TransitionTo(IInputState)

Transitions to a new state.

public void TransitionTo(IInputState newState)

Parameters

newState IInputState

Update(double)

public void Update(double deltaTime)

Parameters

deltaTime double