Gainput
v1.0.0
|
Records a sequence of button state changes. More...
#include <GainputInputRecorder.h>
Public Member Functions | |
InputRecorder (InputManager &manager) | |
Initializes the recorder. More... | |
~InputRecorder () | |
Destructs the recorder. | |
void | Start () |
Starts recording. More... | |
void | Stop () |
Stops recording. | |
bool | IsRecording () const |
Returns if the recorder is currently recording. | |
void | AddDeviceToRecord (DeviceId device) |
Adds a device to record the button state changes of. More... | |
bool | IsDeviceToRecord (DeviceId device) |
Returns if the given device should be recorded. More... | |
InputRecording * | GetRecording () |
Returns the recording that is being recorded to, may be 0. | |
const InputRecording * | GetRecording () const |
Returns the recording that is being recorded to, may be 0. | |
uint64_t | GetStartTime () const |
Returns the time the recording was started. | |
Records a sequence of button state changes.
In order for input recording to be available, Gainput must have been built with GAINPUT_ENABLE_RECORDER
defined.
gainput::InputRecorder::InputRecorder | ( | InputManager & | manager | ) |
Initializes the recorder.
manager | The InputManager to receive button state changes from. |
|
inline |
Adds a device to record the button state changes of.
If no device is set, all devices are recorded.
device | The ID of the device to record. |
|
inline |
Returns if the given device should be recorded.
device | The ID of the device to check. |
void gainput::InputRecorder::Start | ( | ) |
Starts recording.
Also clears the InputRecording that is being recorded to so that it's not possible to resume recording after stopping to record.