diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2003-10-14 05:19:41 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2003-10-14 05:19:41 +0000 |
| commit | 84932815dfa612b881e7f8178ae5303f82a24354 (patch) | |
| tree | d4f4a16793cade98745eaaa4afadb144e77ba367 /src | |
| parent | 01ceac46e9b4232dff8e2de8b999843bc77c9db2 (diff) | |
Glut emulation turns mousewheel back into mouse buttons 3 and 4, for
compatability with glut. Suggested by Joerg Schmalzl <joergs@earth.uni-muenster.de>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rwxr-xr-x | src/glut_compatability.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glut_compatability.cxx b/src/glut_compatability.cxx index f2872bd8c..5dbe46573 100755 --- a/src/glut_compatability.cxx +++ b/src/glut_compatability.cxx @@ -1,5 +1,5 @@ // -// "$Id: glut_compatability.cxx,v 1.4.2.5.2.5 2003/01/30 21:44:34 easysw Exp $" +// "$Id: glut_compatability.cxx,v 1.4.2.5.2.6 2003/10/14 05:19:41 spitzak Exp $" // // GLUT emulation routines for the Fast Light Tool Kit (FLTK). // @@ -93,6 +93,13 @@ int Fl_Glut_Window::handle(int event) { if (motion) return 1; break; + case FL_MOUSEWHEEL: + button = Fl::event_dy(); + while (button < 0) {mouse(3,GLUT_DOWN,ex,ey); ++button;} + while (button > 0) {mouse(4,GLUT_DOWN,ex,ey); --button;} + return 1; + break; + case FL_RELEASE: for (button = 0; button < 3; button++) if (mouse_down & (1<<button)) { if (mouse) mouse(button,GLUT_UP,ex,ey); @@ -406,5 +413,5 @@ int glutLayerGet(GLenum type) { #endif // -// End of "$Id: glut_compatability.cxx,v 1.4.2.5.2.5 2003/01/30 21:44:34 easysw Exp $". +// End of "$Id: glut_compatability.cxx,v 1.4.2.5.2.6 2003/10/14 05:19:41 spitzak Exp $". // |
