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::InputChannelNotifications Class Reference

#include <InputChannelNotificationBus.h>

Inherits AZ::EBusTraits.

Public Member Functions

virtual ~InputChannelNotifications ()=default
 Default destructor.
 
virtual void OnInputChannelEvent (const InputChannel &, bool &)
 
virtual AZ::s32 GetPriority () const
 
bool Compare (const InputChannelNotifications *other) const
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 EBus Trait: input notifications are addressed to a single address.
 
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::MultipleAndOrdered
 EBus Trait: input notifications can be handled by multiple (ordered) listeners.
 

Detailed Description

EBus interface used to listen for input events as they're broadcast from input channels when they are active or when their state/value changes. Most common input consumers should derive instead from InputChannelEventListener (which respects the 'o_hasBeenConsumed' parameter for OnInputChannelEvent) to ensure events are only processed once. However, if a system needs to process input events that may have already been consumed by a higher priority listener, they are free to derive from InputChannelNotificationBus::Handler and ignore 'o_hasBeenConsumed'.

Member Function Documentation

◆ Compare()

bool AzFramework::InputChannelNotifications::Compare ( const InputChannelNotifications other) const
inline

Compare function required by BusHandlerOrderCompare = BusHandlerCompareDefault

Parameters
[in]otherAnother instance of the class to compare
Returns
True if the priority of this handler is greater than the other, false otherwise

◆ GetPriority()

virtual AZ::s32 AzFramework::InputChannelNotifications::GetPriority ( ) const
inlinevirtual

Access to the priority of the input notification handler (sorted from highest to lowest)

Returns
Priority of the input notification handler

◆ OnInputChannelEvent()

virtual void AzFramework::InputChannelNotifications::OnInputChannelEvent ( const InputChannel ,
bool &   
)
inlinevirtual

Override to be notified when an input channel is active or its state or value is updated

Parameters
[in]inputChannelThe input channel that is active or whose state or value updated
[in,out]o_hasBeenConsumedCheck and/or set whether the event has been handled

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