#ifndef MOUSE_H #define MOUSE_H #include class MouseManager { public: MouseManager(); bool isDown(int mapping); bool isReleased(int mapping); unsigned int getDownTime(int mapping); void resetDownTime(int mapping); bool map(int mapping, int key); void tick(); void press(int button); void release(int button); private: static const int NUMBER_OF_BUTTONS = GLFW_MOUSE_BUTTON_LAST + 1; bool isInRange(int i); struct Mouse { bool down = false; bool shouldRelease = false; unsigned int downTime = 0; }; Mouse mouseArray[NUMBER_OF_BUTTONS]; int mappingArray[NUMBER_OF_BUTTONS]; }; #endif