projects
/
antikythera
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move gears along their axis with the mousewheel
[antikythera]
/
src
/
main.cc
diff --git
a/src/main.cc
b/src/main.cc
index
f98f190
..
ce8466e
100644
(file)
--- a/
src/main.cc
+++ b/
src/main.cc
@@
-215,6
+215,14
@@
static void mouse(int bn, int st, int x, int y)
sel_gear = 0;
}
}
sel_gear = 0;
}
}
+
+ if(bidx == 3 || bidx == 4) { /* wheel */
+ if(hover_gear) {
+ float dz = bidx == 4 ? 1 : -1;
+ hover_gear->set_position(hover_gear->get_position() + hover_gear->get_axis() * dz);
+ machine->invalidate_meshing();
+ }
+ }
}
static void motion(int x, int y)
}
static void motion(int x, int y)