Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Detects when an axis should be mapped. More...
#include <ButtonMapping.h>
Public Member Functions | |
CAxisDetector (CButtonMapping *buttonMapping, unsigned int axisIndex, const AxisConfiguration &config) | |
bool | OnMotion (float position) |
Axis state has been updated. | |
void | ProcessMotion () |
Called once per frame. | |
bool | IsMapping () const |
Check if the axis was mapped and is still in motion. | |
void | SetEmitted (const CDriverPrimitive &activePrimitive) |
Set the state such that this axis has generated a mapping event. | |
Additional Inherited Members | |
Protected Member Functions inherited from KODI::JOYSTICK::CPrimitiveDetector | |
CPrimitiveDetector (CButtonMapping *buttonMapping) | |
bool | MapPrimitive (const CDriverPrimitive &primitive) |
Dispatch a mapping event. | |
Detects when an axis should be mapped.
CAxisDetector::CAxisDetector | ( | CButtonMapping * | buttonMapping, |
unsigned int | axisIndex, | ||
const AxisConfiguration & | config ) |
|
inline |
Check if the axis was mapped and is still in motion.
bool CAxisDetector::OnMotion | ( | float | position | ) |
Axis state has been updated.
position | The new state |
void CAxisDetector::ProcessMotion | ( | ) |
Called once per frame.
If an axis was activated, the button mapping command will be emitted here.
void CAxisDetector::SetEmitted | ( | const CDriverPrimitive & | activePrimitive | ) |
Set the state such that this axis has generated a mapping event.
If an axis is mapped to the Select action, it may be pressed when button mapping begins. This function is used to indicate that the axis shouldn't be mapped until after it crosses zero again.