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::InputSystemCursorRequests Class Referenceabstract

EBus interface used to query/change the state, position, or appearance of the system cursor. More...

#include <InputSystemCursorRequestBus.h>

Inherits AZ::EBusTraits.

Public Types

using BusIdType = InputDeviceId
 EBus Trait: requests can be addressed to a specific InputDeviceId.
 

Public Member Functions

virtual void SetSystemCursorState (SystemCursorState)=0
 
virtual SystemCursorState GetSystemCursorState () const =0
 
virtual void SetSystemCursorPositionNormalized (AZ::Vector2 positionNormalized)=0
 
virtual AZ::Vector2 GetSystemCursorPositionNormalized () const =0
 
virtual ~InputSystemCursorRequests ()=default
 Default destructor.
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 EBus Trait: requests should be handled by only one input device connected to each id.
 

Detailed Description

EBus interface used to query/change the state, position, or appearance of the system cursor.

Member Function Documentation

◆ GetSystemCursorPositionNormalized()

virtual AZ::Vector2 AzFramework::InputSystemCursorRequests::GetSystemCursorPositionNormalized ( ) const
pure virtual

Get the system cursor position normalized relative to the application's main window. The position obtained has had os ballistics applied, and is valid regardless of whether the system cursor is hidden or visible. When the cursor is constrained to the application's main window the values will always be in the [0.0, 1.0] range, but if unconstrained the normalized values will not be clamped so they will exceed this range anytime the system cursor is located outside the application's main window. See also InputSystemCursorRequests::SetSystemCursorState and GetSystemCursorState.

Called using either:

  • EBus<>::Broadcast (any input device can respond to the request)
  • EBus<>::Event(id) (the given device can respond to the request)
Returns
The system cursor position normalized relative to the application's main window

◆ GetSystemCursorState()

virtual SystemCursorState AzFramework::InputSystemCursorRequests::GetSystemCursorState ( ) const
pure virtual

Query input devices for the current state of the system cursor. All calls to this method should usually be addressed to a mouse input device, but it may be possible for multiple different device instances to each be associated with a system cursor.

Called using either:

  • EBus<>::Broadcast (any input device can respond to the request)
  • EBus<>::Event(id) (the given device can respond to the request)
Returns
The current state of the system cursor

◆ SetSystemCursorPositionNormalized()

virtual void AzFramework::InputSystemCursorRequests::SetSystemCursorPositionNormalized ( AZ::Vector2  positionNormalized)
pure virtual

Inform input devices that the system cursor position should be set. Calls to the method should usually be addressed to a mouse input device, but it may be possible for multiple different device instances to each be associated with a system cursor.

Called using either:

  • EBus<>::Broadcast (any input device can respond to the request)
  • EBus<>::Event(id) (the given device can respond to the request)
Parameters
[in]positionNormalizedThe desired system cursor position normalized

◆ SetSystemCursorState()

virtual void AzFramework::InputSystemCursorRequests::SetSystemCursorState ( SystemCursorState  )
pure virtual

Inform input devices that the system cursor state should be changed. Calls to the method should usually be addressed to a mouse input device, but it may be possible for multiple different device instances to each be associated with a system cursor.

Called using either:

  • EBus<>::Broadcast (any input device can respond to the request)
  • EBus<>::Event(id) (the given device can respond to the request)
Parameters
[in]systemCursorStateThe desired system cursor state

Member Data Documentation

◆ AddressPolicy

const AZ::EBusAddressPolicy AzFramework::InputSystemCursorRequests::AddressPolicy = AZ::EBusAddressPolicy::ById
static

EBus Trait: requests can be addressed to a specific InputDeviceId using EBus<>::Event, which should be handled by only one device that has connected to the bus using that id. Input requests can also be sent using EBus<>::Broadcast, in which case they'll be sent to all input devices that have connected to the input event bus regardless of their id.


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