27 files changed, 179 insertions, 549 deletions
diff --git a/src/controller/callbacks/mouse_motion.c b/src/controller/callbacks/mouse_motion.c new file mode 100644 index 0000000..3279773 --- a/dev/null +++ b/src/controller/callbacks/mouse_motion.c @@ -0,0 +1,19 @@ +#include "mouse_motion.h" +#include "../../view/state0.h" +#include "../actions/pan.h" +#include <GL/glut.h> + +#define S state0 + +void +mouse_motion (int x, int y) +{ + if (S.pan.active) + { + pan (S.pan.begin[0], S.pan.begin[1], x, y); + S.pan.begin[0] = x; + S.pan.begin[1] = y; + } + + return; +} |