]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui.cxx
Sync with latest JSBSim CVS
[flightgear.git] / src / GUI / gui.cxx
index 58db573ce9845e3f6eada5a98ac851b44b36ab0c..74078a6e2bee1b6c988878ca5a7101e3ba59bcbf 100644 (file)
@@ -167,7 +167,7 @@ void guiErrorMessage (const char *txt, const sg_throwable &throwable)
     string msg = txt;
     msg += '\n';
     msg += throwable.getFormattedMessage();
-    if (throwable.getOrigin() != "") {
+    if (throwable.getOrigin() != (string)"") {
       msg += "\n (reported by ";
       msg += throwable.getOrigin();
       msg += ')';
@@ -249,8 +249,8 @@ static void saveFlight(puObject *cv) {
     SaveDialog = new puDialogBox (150, 50);
     {
         SaveDialogFrame   = new puFrame           (0,0,350, 150);
-        SaveDialogMessage = new puText            (
-                       (150 - puGetStringWidth( puGetDefaultLabelFont(), "File Name:" ) / 2), 110);
+        SaveDialogMessage
+            = new puText( (150 - puGetDefaultLabelFont().getStringWidth( "File Name:" ) / 2), 110 );
         SaveDialogMessage ->    setLabel          ("File Name:");
 
         SaveDialogInput   = new puInput           (50, 70, 300, 100);
@@ -314,8 +314,8 @@ static void loadFlight(puObject *cb)
     LoadDialog = new puDialogBox (150, 50);
     {
         LoadDialogFrame   = new puFrame           (0,0,350, 150);
-        LoadDialogMessage = new puText            (
-                       (150 - puGetStringWidth( puGetDefaultLabelFont(), "File Name:" ) / 2), 110);
+        LoadDialogMessage
+            = new puText( (150 - puGetDefaultLabelFont().getStringWidth( "File Name:" ) / 2), 110 );
         LoadDialogMessage ->    setLabel          ("File Name:");
 
         LoadDialogInput   = new puInput           (50, 70, 300, 100);
@@ -412,7 +412,7 @@ void ConfirmExitDialogInit(void)
     char *s;
 
     //  printf("ConfirmExitDialogInit\n");
-    int len = 200 - puGetStringWidth( puGetDefaultLabelFont(), msg )/2;
+    int len = 200 - puGetDefaultLabelFont().getStringWidth ( msg ) / 2;
 
     int x = (fgGetInt("/sim/startup/xsize")/2 - 400/2);
     int y = (fgGetInt("/sim/startup/ysize")/2 - 100/2);
@@ -520,7 +520,7 @@ void fgHiResDump()
     glLoadIdentity();
     ssgSetCamera( (sgVec4 *)globals->get_current_view()->get_VIEW() );
     float fov = globals->get_current_view()->get_fov();
-    ssgSetFOV(fov, fov * globals->get_current_view()->get_win_ratio());
+    ssgSetFOV(fov, fov * globals->get_current_view()->get_fov_ratio());
     // ssgSetNearFar( 10.0f, 120000.0f );
     ssgSetNearFar( 0.5f, 1200000.0f );
 
@@ -1044,5 +1044,9 @@ void guiInit()
     mainMenuBar-> close ();
     // Set up menu bar toggle
     gui_menu_on = ~0;
+
+    if (fgGetString("/sim/flight-model") == "ada") {
+        guiToggleMenu(); // Menu off by default
+    }
 }