mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
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
This commit is contained in:
@@ -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).
|
// 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;
|
if (motion) return 1;
|
||||||
break;
|
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:
|
case FL_RELEASE:
|
||||||
for (button = 0; button < 3; button++) if (mouse_down & (1<<button)) {
|
for (button = 0; button < 3; button++) if (mouse_down & (1<<button)) {
|
||||||
if (mouse) mouse(button,GLUT_UP,ex,ey);
|
if (mouse) mouse(button,GLUT_UP,ex,ey);
|
||||||
@@ -406,5 +413,5 @@ int glutLayerGet(GLenum type) {
|
|||||||
#endif
|
#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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user