Gainput  v1.0.0
Classes | Public Member Functions | List of all members
gainput::InputDeltaState Class Reference

Stores a list of input state changes. More...

#include <GainputInputDeltaState.h>

Public Member Functions

 InputDeltaState (Allocator &allocator)
 
void AddChange (DeviceId device, DeviceButtonId deviceButton, bool oldValue, bool newValue)
 Add a state change for a bool-type button. More...
 
void AddChange (DeviceId device, DeviceButtonId deviceButton, float oldValue, float newValue)
 Add a state change for a float-type button. More...
 
void Clear ()
 Clear list of state changes.
 
void NotifyListeners (Array< InputListener *> &listeners) const
 Notifies all input listeners of the previously recorded state changes. More...
 

Detailed Description

Stores a list of input state changes.

Examples:
/samples/gesture/gesturesample.cpp.

Member Function Documentation

◆ AddChange() [1/2]

void gainput::InputDeltaState::AddChange ( DeviceId  device,
DeviceButtonId  deviceButton,
bool  oldValue,
bool  newValue 
)

Add a state change for a bool-type button.

Parameters
deviceThe input device the change occurred on.
deviceButtonThe input button that was changed.
oldValueThe old button state.
newValueThe new button state.

◆ AddChange() [2/2]

void gainput::InputDeltaState::AddChange ( DeviceId  device,
DeviceButtonId  deviceButton,
float  oldValue,
float  newValue 
)

Add a state change for a float-type button.

Parameters
deviceThe input device the change occurred on.
deviceButtonThe input button that was changed.
oldValueThe old button state.
newValueThe new button state.

◆ NotifyListeners()

void gainput::InputDeltaState::NotifyListeners ( Array< InputListener *> &  listeners) const

Notifies all input listeners of the previously recorded state changes.

Parameters
listenersA list of input listeners to notify.

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