CUGL 2.5
Cornell University Game Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cugl::GameControllerButtonEvent Class Reference

#include <CUGameController.h>

Public Member Functions

 GameControllerButtonEvent ()
 
 GameControllerButtonEvent (const std::string key, Uint8 ind, bool dwn, const Timestamp &stamp)
 

Public Attributes

Timestamp timestamp
 
std::string uuid
 
Uint8 index
 
bool down
 

Detailed Description

This simple class is a struct to hold information about button presses

A button has only two states: up and down. This event will fire only when this state changes.

Constructor & Destructor Documentation

◆ GameControllerButtonEvent() [1/2]

cugl::GameControllerButtonEvent::GameControllerButtonEvent ( )
inline

Constructs a new button event with the default values

◆ GameControllerButtonEvent() [2/2]

cugl::GameControllerButtonEvent::GameControllerButtonEvent ( const std::string  key,
Uint8  ind,
bool  dwn,
const Timestamp stamp 
)
inline

Constructs a new button event with the given values

Parameters
keyThe device UID
indThe button index
dwnWhether the button is pressed
stampThe timestamp for the event

Member Data Documentation

◆ down

bool cugl::GameControllerButtonEvent::down

Whether the button event is from a press (not a release)

◆ index

Uint8 cugl::GameControllerButtonEvent::index

The button index

◆ timestamp

Timestamp cugl::GameControllerButtonEvent::timestamp

The time of the input event

◆ uuid

std::string cugl::GameControllerButtonEvent::uuid

The UID of the relevant device


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