NAP
Public Member Functions | Public Attributes | List of all members
ControllerButtonEvent Class Reference

#include <inputevent.h>

Public Member Functions

 ControllerButtonEvent (int deviceID, EControllerButton button, int buttonID)
 
- Public Member Functions inherited from ControllerEvent
 ControllerEvent (int deviceID)
 
- Public Member Functions inherited from Event
virtual ~Event ()=default
 
 Event ()=default
 
 Event (const Event &)=delete
 
Eventoperator= (const Event &)=delete
 

Public Attributes

EControllerButton mButton = EControllerButton::UNKNOWN
 Mapped button, unknown when no mapping is provided. More...
 
int mButtonID = -1
 Hardware button id, available when no button mapping is provided (UNKNOWN) More...
 
- Public Attributes inherited from ControllerEvent
int mDeviceID = -1
 Hardware device if of controller. More...
 

Description

Defines a controller button event This event is created when a button is pressed or released on a game controller or joystick. Use the 'mButton member to retrieve the mapped button id, ie: A, B, etc. If there is no mapping available the 'mButton' member is unknown. In that case you need to interpret the hardware id of the button stored in the 'mButtonID' variable yourself.

Inheritance diagram for ControllerButtonEvent:
[legend]
Collaboration diagram for ControllerButtonEvent:
[legend]

Constructor & Destructor Documentation

◆ ControllerButtonEvent()

ControllerButtonEvent ( int  deviceID,
EControllerButton  button,
int  buttonID 
)

Member Data Documentation

◆ mButton

Mapped button, unknown when no mapping is provided.

◆ mButtonID

int mButtonID = -1

Hardware button id, available when no button mapping is provided (UNKNOWN)