123456789101112131415161718192021222324 |
- #ifndef BUTTON_H
- #define BUTTON_H
- class Button final {
- friend class Buttons;
- int key;
- int downTime;
- bool released;
- const char* name;
- public:
- Button(int key, const char* name);
- bool isDown() const;
- int getDownTime() const;
- bool wasReleased() const;
- const char* getName() const;
- private:
- void tick(bool down);
- };
- #endif
|