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

#include <CUGameController.h>

Public Member Functions

 GameControllerHatEvent ()
 
 GameControllerHatEvent (const std::string key, Uint8 ind, Uint8 pos, const Timestamp &stamp)
 

Public Attributes

Timestamp timestamp
 
std::string uuid
 
Uint8 index
 
GameController::Hat state
 

Detailed Description

This simple class is a struct to hold information about hat movement

A hat is a directional pad with 9 different states. This event will fire only when this state changes.

Constructor & Destructor Documentation

◆ GameControllerHatEvent() [1/2]

cugl::GameControllerHatEvent::GameControllerHatEvent ( )
inline

Constructs a new acceleration event with the default values

◆ GameControllerHatEvent() [2/2]

cugl::GameControllerHatEvent::GameControllerHatEvent ( const std::string  key,
Uint8  ind,
Uint8  pos,
const Timestamp stamp 
)

Constructs a new hat event with the given values

Parameters
keyThe device UID
indThe hat index
posThe hat position (in SDL encoding)
stampThe timestamp for the event

Member Data Documentation

◆ index

Uint8 cugl::GameControllerHatEvent::index

The hat index

◆ state

GameController::Hat cugl::GameControllerHatEvent::state

The new hat position

◆ timestamp

Timestamp cugl::GameControllerHatEvent::timestamp

The time of the input event

◆ uuid

std::string cugl::GameControllerHatEvent::uuid

The UID of the relevant device


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