1. a new variable is introduced "lastDownId". 2. This variable is used to track the last pressed button. In case of "holds" the button HAS to be the last one pressed, this is the case on all the official games. 3. This will fix the syndrome "just hold R2 / L2 to get the full hold score".
30 lines
431 B
C++
30 lines
431 B
C++
#pragma once
|
|
#include <vector>
|
|
#include "IInputBinding.h"
|
|
|
|
namespace TLAC::Input
|
|
{
|
|
class Binding
|
|
{
|
|
// Used in down & tapped events
|
|
int lastDownId = -1;
|
|
|
|
public:
|
|
std::vector<IInputBinding*> InputBindings;
|
|
|
|
Binding();
|
|
~Binding();
|
|
|
|
void AddBinding(IInputBinding* inputBinding);
|
|
|
|
bool AnyDown();
|
|
bool AnyTapped();
|
|
bool AnyReleased();
|
|
|
|
int GetDownCount();
|
|
int GetTappedCount();
|
|
int GetReleasedCount();
|
|
};
|
|
}
|
|
|