| versions | 0095+ |
|---|---|
| contributors | companje |
| started on | 2008-01-11 17:50 |
With this 'hack' you can use the scroll wheel / mouse wheel in Processing.
/** using-the-mousewheel-scrollwheel-in-processing taken from http://processinghacks.com/hacks:using-the-mousewheel-scrollwheel-in-processing @author Rick Companje */ void setup() { addMouseWheelListener(new java.awt.event.MouseWheelListener() { public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) { mouseWheel(evt.getWheelRotation()); }}); } void mouseWheel(int delta) { println(delta); } void draw() { }