CUGL 3.0
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, GameController::Button index, bool dwn, const Timestamp &stamp)
 

Public Attributes

Timestamp timestamp
 
std::string uuid
 
GameController::Button button
 
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,
GameController::Button  index,
bool  dwn,
const Timestamp stamp 
)
inline

Constructs a new button event with the given values

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

Member Data Documentation

◆ button

GameController::Button cugl::GameControllerButtonEvent::button

The button reference

◆ down

bool cugl::GameControllerButtonEvent::down

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

◆ 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: