This commit is contained in:
nastys
2019-07-30 13:48:28 +02:00
parent 17b6c02aee
commit d1349cfebe
157 changed files with 0 additions and 0 deletions
@@ -0,0 +1,19 @@
#include "TouchSliderState.h"
namespace TLAC::Components
{
void TouchSliderState::SetSensor(int index, int value)
{
if (index < 0 || index >= SLIDER_SENSORS)
return;
SensorPressureLevels[index] = value;
SensorTouched[index].IsTouched = value > 0;
}
void TouchSliderState::ResetSensors()
{
for (int i = 0; i < SLIDER_SENSORS; i++)
SetSensor(i, NO_PRESSURE);
}
}