Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::InputChannelEventListener Class Referenceabstract

#include <InputChannelEventListener.h>

Inherits InputChannelNotificationBus::Handler.

Inherited by AzFramework::InputContext.

Public Member Functions

 InputChannelEventListener ()
 Constructor.
 
 InputChannelEventListener (bool autoConnect)
 
 InputChannelEventListener (AZ::s32 priority)
 
 InputChannelEventListener (AZ::s32 priority, bool autoConnect)
 
 InputChannelEventListener (AZStd::shared_ptr< InputChannelEventFilter > filter)
 
 InputChannelEventListener (AZStd::shared_ptr< InputChannelEventFilter > filter, AZ::s32 priority)
 
 InputChannelEventListener (AZStd::shared_ptr< InputChannelEventFilter > filter, AZ::s32 priority, bool autoConnect)
 
 AZ_DEFAULT_COPY (InputChannelEventListener)
 
 ~InputChannelEventListener () override=default
 Default destructor.
 
AZ::s32 GetPriority () const override
 AzFramework::InputChannelNotifications::GetPriority
 
void SetFilter (AZStd::shared_ptr< InputChannelEventFilter > filter)
 
void Connect ()
 Connect to the input notification bus to start receiving input notifications.
 
void Disconnect ()
 Disconnect from the input notification bus to stop receiving input notifications.
 

Static Public Member Functions

static AZ::s32 GetPriorityFirst ()
 
static AZ::s32 GetPriorityDebug ()
 
static AZ::s32 GetPriorityDebugUI ()
 
static AZ::s32 GetPriorityUI ()
 
static AZ::s32 GetPriorityDefault ()
 
static AZ::s32 GetPriorityLast ()
 

Protected Member Functions

void OnInputChannelEvent (const InputChannel &inputChannel, bool &o_hasBeenConsumed) final
 AzFramework::InputChannelNotifications::OnInputChannelEvent
 
virtual bool OnInputChannelEventFiltered (const InputChannel &inputChannel)=0
 

Detailed Description

Class that handles input notifications by priority, and that allows events to be filtered by their channel name, device name, device index (local player) or any combination of the three.

Constructor & Destructor Documentation

◆ InputChannelEventListener() [1/6]

AzFramework::InputChannelEventListener::InputChannelEventListener ( bool  autoConnect)
explicit

Constructor

Parameters
[in]autoConnectWhether to connect to the input notification bus on construction

◆ InputChannelEventListener() [2/6]

AzFramework::InputChannelEventListener::InputChannelEventListener ( AZ::s32  priority)
explicit

Constructor

Parameters
[in]priorityThe priority used to sort relative to other input event listeners

◆ InputChannelEventListener() [3/6]

AzFramework::InputChannelEventListener::InputChannelEventListener ( AZ::s32  priority,
bool  autoConnect 
)
explicit

Constructor

Parameters
[in]priorityThe priority used to sort relative to other input event listeners
[in]autoConnectWhether to connect to the input notification bus on construction

◆ InputChannelEventListener() [4/6]

AzFramework::InputChannelEventListener::InputChannelEventListener ( AZStd::shared_ptr< InputChannelEventFilter filter)
explicit

Constructor

Parameters
[in]filterThe filter used to determine whether an inut event should be handled

◆ InputChannelEventListener() [5/6]

AzFramework::InputChannelEventListener::InputChannelEventListener ( AZStd::shared_ptr< InputChannelEventFilter filter,
AZ::s32  priority 
)
explicit

Constructor

Parameters
[in]filterThe filter used to determine whether an inut event should be handled
[in]priorityThe priority used to sort relative to other input event listeners

◆ InputChannelEventListener() [6/6]

AzFramework::InputChannelEventListener::InputChannelEventListener ( AZStd::shared_ptr< InputChannelEventFilter filter,
AZ::s32  priority,
bool  autoConnect 
)
explicit

Constructor

Parameters
[in]filterThe filter used to determine whether an inut event should be handled
[in]priorityThe priority used to sort relative to other input event listeners
[in]autoConnectWhether to connect to the input notification bus on construction

Member Function Documentation

◆ GetPriorityFirst()

static AZ::s32 AzFramework::InputChannelEventListener::GetPriorityFirst ( )
inlinestatic

Predefined input event listener priority, used to sort handlers from highest to lowest

◆ OnInputChannelEventFiltered()

virtual bool AzFramework::InputChannelEventListener::OnInputChannelEventFiltered ( const InputChannel inputChannel)
protectedpure virtual

Override to be notified when an input channel is active or its state or value is updated, unless the event was consumed by a higher priority listener, or did not pass the filter.

Parameters
[in]inputChannelThe input channel that is active or whose state or value updated
Returns
True if the input event has been consumed, false otherwise

Implemented in AzFramework::InputContext.

◆ SetFilter()

void AzFramework::InputChannelEventListener::SetFilter ( AZStd::shared_ptr< InputChannelEventFilter filter)

Allow the filter to be set as necessary even if already connected to the input event bus

Parameters
[in]filterThe filter used to determine whether an inut event should be handled

The documentation for this class was generated from the following file: