| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | |
| 5 | namespace al { |
| 6 | class KeyRepeatCtrl { |
| 7 | public: |
| 8 | KeyRepeatCtrl(); |
| 9 | |
| 10 | void init(s32 initialMaxWait, s32 maxWait); |
| 11 | void reset(); |
| 12 | void update(bool up, bool down); |
| 13 | bool isDown() const; |
| 14 | bool isUp() const; |
| 15 | |
| 16 | private: |
| 17 | s32 mInitialMaxWait; |
| 18 | s32 mMaxWait; |
| 19 | s32 mUpCounter; |
| 20 | s32 mDownCounter; |
| 21 | bool mIsEnableCounter; |
| 22 | }; |
| 23 | } // namespace al |
| 24 |