blob: 897349978c1ee7d31b65bba7db972737b85de579 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef CTRL_MOUSE_H
#define CTRL_MOUSE_H
#include "math/vector.hpp"
namespace engine::controllers {
template<typename MouseMotionCallback>
class Mouse {
public:
constexpr Mouse(MouseMotionCallback mouse_motion_cb) : mouse_motion_cb{mouse_motion_cb} {}
void mouse_motion_event(Vector2 rel) const & {
mouse_motion_cb(rel);
}
private:
MouseMotionCallback mouse_motion_cb;
};
}
#endif // CTRL_MOUSE_H
|