Button.h 286 B

12345678910111213141516171819
  1. #ifndef BUTTON_H
  2. #define BUTTON_H
  3. class Button final {
  4. int downTime;
  5. int upTime;
  6. public:
  7. Button();
  8. void press();
  9. void release();
  10. void tick();
  11. bool isDown() const;
  12. int getDownTime() const;
  13. bool isUp() const;
  14. int getUpTime() const;
  15. };
  16. #endif