123456789101112131415161718192021222324252627 |
- #ifndef BUTTON_H
- #define BUTTON_H
- class Button final {
- friend class Buttons;
- int key;
- int downTime;
- int keyboardUp;
- int keyboardDown;
- bool controllerDown;
- 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();
- };
- #endif
|