]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_funcs.cxx
Don't scale elevator by 0.5.
[flightgear.git] / src / GUI / gui_funcs.cxx
index 4d72f2434696fc9c8724bf47656230c5f50ba6a0..5f56ac7c75bee687a4e3084740055855e63df140 100644 (file)
@@ -40,7 +40,7 @@
 #  include <windows.h>
 #endif
 
-#include GLUT_H
+#include <GL/gl.h>
 
 #if defined(FX) && defined(XMESA)
 #  include <GL/xmesa.h>
@@ -73,6 +73,7 @@
 #include <Cockpit/panel.hxx>
 #include <Controls/controls.hxx>
 #include <FDM/flight.hxx>
+#include <Main/main.hxx>
 #include <Main/fg_init.hxx>
 #include <Main/fg_io.hxx>
 #include <Main/globals.hxx>
 SG_USING_STD(string);
 SG_USING_STD(cout);
 
-// main.cxx hack, should come from an include someplace
-extern void fgInitVisuals( void );
-extern void fgRenderFrame( void );
-
 extern void fgHUDalphaAdjust( puObject * );
 
 // from cockpit.cxx
@@ -118,10 +115,6 @@ extern void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
                          GLfloat x_end, GLfloat y_end );
 #endif
 
-#if defined(FG_OLD_MENUBAR)
-extern puMenuBar    *mainMenuBar;
-#endif
-
 puDialogBox  *dialogBox = 0;
 puFrame      *dialogFrame = 0;
 puText       *dialogBoxMessage = 0;
@@ -246,28 +239,6 @@ void guiErrorMessage (const char *txt, const sg_throwable &throwable)
       mkDialog(msg.c_str());
 }
 
-#if defined(FG_OLD_MENUBAR)
-// Toggle the Menu and Mouse display state
-void guiToggleMenu(void)
-{
-    if( gui_menu_on ) {
-        // printf("Hiding Menu\n");
-        mainMenuBar->hide  ();
-#if defined(WIN32_CURSOR_TWEAKS_OFF)
-        if( mouse_mode == MOUSE_POINTER )
-            TurnCursorOff();
-#endif // WIN32_CURSOR_TWEAKS_OFF
-    } else {
-        // printf("Showing Menu\n");
-        mainMenuBar->reveal();
-#ifdef WIN32
-        TurnCursorOn();
-#endif // WIN32
-    }
-    gui_menu_on = ~gui_menu_on;
-}
-#endif // FG_OLD_MENUBAR
-
 // Intercept the Escape Key
 void ConfirmExitDialog(void)
 {
@@ -427,14 +398,6 @@ void guiTogglePanel(puObject *cb)
            fgGetInt("/sim/startup/ysize"));
 }
 
-#if defined(FG_OLD_MENUBAR)    
-//void MenuHideMenuCb(puObject *cb)
-void hideMenuCb (puObject *cb)
-{
-    guiToggleMenu();
-}
-#endif
-
 void goodBye(puObject *)
 {
     // SG_LOG( SG_INPUT, SG_ALERT,
@@ -590,13 +553,6 @@ void fgHiResDump()
         fgSetBool("/sim/freeze/master", true);
     }
 
-#if defined(FG_OLD_MENUBAR)
-    if(gui_menu_on) {
-        show_menu = true;
-        guiToggleMenu();
-    }
-#endif
-       
     if ( !puCursorIsHidden() ) {
         show_pu_cursor = true;
         puHideCursor();
@@ -757,11 +713,6 @@ void fgHiResDump()
 
     delete [] filename;
 
-#if defined(FG_OLD_MENUBAR)
-    if( show_menu )
-        guiToggleMenu();
-#endif
-
     if ( show_pu_cursor ) {
         puShowCursor();
     }
@@ -820,9 +771,6 @@ void printScreen ( puObject *obj ) {
        puHideCursor();
     }
     // BusyCursor( 0 );
-#if defined(FG_OLD_MENUBAR)
-    mainMenuBar->hide();
-#endif
 
     CGlPrinter p( CGlPrinter::PRINT_BITMAP );
     int cur_width = fgGetInt("/sim/startup/xsize");
@@ -830,11 +778,6 @@ void printScreen ( puObject *obj ) {
     p.Begin( "FlightGear", cur_width*3, cur_height*3 );
        p.End( hiResScreenCapture(3) );
 
-#if defined(FG_OLD_MENUBAR)
-    if( gui_menu_on ) {
-       mainMenuBar->reveal();
-    }
-#endif
     // BusyCursor(1);
     if ( show_pu_cursor ) {
        puShowCursor();
@@ -869,9 +812,6 @@ void fgDumpSnapShot () {
         fgSetBool("/sim/freeze/master", true);
     }
 
-#if defined(FG_OLD_MENUBAR)
-    mainMenuBar->hide();
-#endif
     TurnCursorOff();
     if ( !puCursorIsHidden() ) {
        show_pu_cursor = true;
@@ -915,11 +855,6 @@ void fgDumpSnapShot () {
     }
 
     TurnCursorOn();
-#if defined(FG_OLD_MENUBAR)
-    if( gui_menu_on ) {
-       mainMenuBar->reveal();
-    }
-#endif
 
     if ( !freeze ) {
         fgSetBool("/sim/freeze/master", false);