From 84932815dfa612b881e7f8178ae5303f82a24354 Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Tue, 14 Oct 2003 05:19:41 +0000 Subject: Glut emulation turns mousewheel back into mouse buttons 3 and 4, for compatability with glut. Suggested by Joerg Schmalzl git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/glut_compatability.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') 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<