]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/mouse.cxx
Moved random ground cover object management code (userdata.[ch]xx) over
[flightgear.git] / src / GUI / mouse.cxx
index 6a87506491d46fb21b6b408dd8e89aab1b01dcd9..4f63d7c4f522a2e26b572b747a78a8e47c9d9c92 100644 (file)
 #include "gui_local.hxx"
 
 SG_USING_STD(string);
-
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_STD(cout);
-#endif
 
 /* --------------------------------------------------------------------
 Mouse stuff
@@ -326,7 +323,9 @@ void CenterView( void ) {
        glutSetCursor(GLUT_CURSOR_INHERIT);
 
        // Is this necessary ??
+#if defined(FG_OLD_MENU)
        if( !gui_menu_on )   TurnCursorOff();
+#endif
 
        glutWarpPointer( _savedX, _savedY );
     }
@@ -371,6 +370,7 @@ void guiMotionFunc ( int x, int y )
     wh = MOUSE_YSIZE;
 
     if (mouse_mode == MOUSE_POINTER) {
+#if defined(FG_OLD_MENU)
         // TURN MENU ON IF MOUSE AT TOP
         if( y < 1 ) {
             if( !gui_menu_on )
@@ -381,6 +381,7 @@ void guiMotionFunc ( int x, int y )
             if( gui_menu_on )
                 guiToggleMenu();                       
         }
+#endif
         puMouse ( x, y ) ;
         glutPostRedisplay () ;
     } else {
@@ -623,11 +624,13 @@ void guiMouseFunc(int button, int updown, int x, int y)
 #endif // NO_SMOOTH_MOUSE_VIEW
 #endif // RESET_VIEW_ON_LEAVING_MOUSE_VIEW
                     glutSetCursor(GLUT_CURSOR_INHERIT);
-                    
+
+#if defined(FG_OLD_MENU)                    
 #if defined(WIN32_CURSOR_TWEAKS_OFF)
                     if(!gui_menu_on)
                         TurnCursorOff();
 #endif // WIN32_CURSOR_TWEAKS_OFF
+#endif // FG_OLD_MENU
                     break;
             } // end switch (mouse_mode)
             glutWarpPointer( x, y );
@@ -645,8 +648,8 @@ void guiMouseFunc(int button, int updown, int x, int y)
     // know what's going on.
     if (mouse_mode == MOUSE_POINTER) {
       if (!puMouse (button, updown, x,y)) {
-        if ( current_panel != NULL ) {
-          current_panel->doMouseAction(button, updown, x, y);
+        if ( globals->get_current_panel() != NULL ) {
+          globals->get_current_panel()->doMouseAction(button, updown, x, y);
         }
       }
     }