]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_funcs.cxx
Modified Files:
[flightgear.git] / src / GUI / gui_funcs.cxx
index 8e94939f3941694c3205e3527a54eaf4360069f7..b87c5c0fe7d084ff30c54ac656aa5d0d37d5445d 100644 (file)
@@ -60,8 +60,6 @@
 # endif
 #endif
 
-#include <plib/ssg.h>
-
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
@@ -71,7 +69,6 @@
 #include <Aircraft/aircraft.hxx>
 #include <Aircraft/controls.hxx>
 #include <Airports/simple.hxx>
-#include <Autopilot/auto_gui.hxx>
 #include <Cockpit/panel.hxx>
 #include <FDM/flight.hxx>
 #include <Main/main.hxx>
 
 #include "gui.h"
 #include "gui_local.hxx"
-#include "preset_dlg.hxx"
-#include "prop_picker.hxx"
 #include "sgVec3Slider.hxx"
 
 SG_USING_STD(string);
 SG_USING_STD(cout);
 
-// from cockpit.cxx
-extern void fgLatLonFormatToggle( puObject *);
 
 #if defined( TR_HIRES_SNAP)
 #include <simgear/screen/tr.h>
@@ -126,28 +119,6 @@ const __fg_gui_fn_t __fg_gui_fn[] = {
 #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
         {"printScreen", printScreen},
 #endif
-
-        //View
-        {"guiTogglePanel", guiTogglePanel},
-        {"prop_pickerView", prop_pickerView},
-
-        // Environment
-        {"fgPresetAirport", fgPresetAirport},
-        {"fgPresetRunway", fgPresetRunway},
-        {"fgPresetOffsetDistance", fgPresetOffsetDistance},
-        {"fgPresetAltitude", fgPresetAltitude},
-        {"fgPresetGlideslope", fgPresetGlideslope},
-        {"fgPresetAirspeed", fgPresetAirspeed},
-        {"fgPresetCommit", fgPresetCommit},
-
-        // Autopilot
-        {"NewAltitude", NewAltitude},
-       {"NewHeading", NewHeading},
-        {"AddWayPoint", AddWayPoint},
-        {"PopWayPoint", PopWayPoint},
-        {"ClearRoute", ClearRoute},
-        {"fgLatLonFormatToggle", fgLatLonFormatToggle},
-
         // Help
         {"helpCb", helpCb},
 
@@ -164,7 +135,7 @@ void mkDialog (const char *txt)
     NewGUI *gui = (NewGUI *)globals->get_subsystem("gui");
     if (!gui)
         return;
-    SGPropertyNode_ptr dlg = gui->getDialog("message");
+    SGPropertyNode_ptr dlg = gui->getDialogProperties("message");
     if (!dlg)
         return;
 
@@ -207,18 +178,6 @@ ____________________________________________________________________*/
 // on Sunday 3rd of December
 
 
-// This is the accessor function
-void guiTogglePanel(puObject *cb)
-{
-  if (fgGetBool("/sim/panel/visibility"))
-    fgSetBool("/sim/panel/visibility", false);
-  else
-    fgSetBool("/sim/panel/visibility", true);
-
-  globals->get_renderer()->resize(fgGetInt("/sim/startup/xsize"),
-                                  fgGetInt("/sim/startup/ysize"));
-}
-
 void helpCb (puObject *)
 {
     string command;
@@ -294,7 +253,7 @@ void fgHiResDump()
     }
 
     FGRenderer *renderer = globals->get_renderer();
-    renderer->init();
+//     renderer->init();
     renderer->resize( fgGetInt("/sim/startup/xsize"),
                       fgGetInt("/sim/startup/ysize") );
 
@@ -336,11 +295,12 @@ void fgHiResDump()
     trTileBuffer(tr, GL_RGB, GL_UNSIGNED_BYTE, tile);
     trImageSize(tr, imageWidth, imageHeight);
     trRowOrder(tr, TR_TOP_TO_BOTTOM);
-    sgFrustum *frustum = ssgGetFrustum();
-    trFrustum(tr,
-              frustum->getLeft(), frustum->getRight(),
-              frustum->getBot(),  frustum->getTop(), 
-              frustum->getNear(), frustum->getFar());
+    // OSGFIXME
+//     sgFrustum *frustum = ssgGetFrustum();
+//     trFrustum(tr,
+//               frustum->getLeft(), frustum->getRight(),
+//               frustum->getBot(),  frustum->getTop(), 
+//               frustum->getNear(), frustum->getFar());
        
     /* Prepare ppm output file */
     while (count < 1000) {
@@ -391,13 +351,15 @@ void fgHiResDump()
         int curRow =  trGet(tr, TR_CURRENT_ROW);
 
         renderer->update( false );
-        if ( do_hud )
-            fgUpdateHUD( curColumn*hud_col_step,      curRow*hud_row_step,
-                         (curColumn+1)*hud_col_step, (curRow+1)*hud_row_step );
-        if (do_panel)
-            globals->get_current_panel()->update(
-                                   curColumn*panel_col_step, panel_col_step,
-                                   curRow*panel_row_step,    panel_row_step );
+        // OSGFIXME
+//         if ( do_hud )
+//             fgUpdateHUD( curColumn*hud_col_step,      curRow*hud_row_step,
+//                          (curColumn+1)*hud_col_step, (curRow+1)*hud_row_step );
+        // OSGFIXME
+//         if (do_panel)
+//             globals->get_current_panel()->update(
+//                                    curColumn*panel_col_step, panel_col_step,
+//                                    curRow*panel_row_step,    panel_row_step );
         more = trEndTile(tr);
 
         /* save tile into tile row buffer*/
@@ -483,7 +445,7 @@ GLubyte *hiResScreenCapture( int multiplier )
     float fov = oldfov / multiplier;
     FGViewer *v = globals->get_current_view();
     fgSetDouble("/sim/current-view/field-of-view", fov);
-    globals->get_renderer()->init();
+//     globals->get_renderer()->init();
     int cur_width = fgGetInt("/sim/startup/xsize");
     int cur_height = fgGetInt("/sim/startup/ysize");
     delete( b1 );
@@ -515,7 +477,6 @@ void printScreen ( puObject *obj ) {
        show_pu_cursor = true;
        puHideCursor();
     }
-    // BusyCursor( 0 );
 
     CGlPrinter p( CGlPrinter::PRINT_BITMAP );
     int cur_width = fgGetInt("/sim/startup/xsize");
@@ -523,7 +484,6 @@ void printScreen ( puObject *obj ) {
     p.Begin( "FlightGear", cur_width*3, cur_height*3 );
     p.End( hiResScreenCapture(3) );
 
-    // BusyCursor(1);
     if ( show_pu_cursor ) {
        puShowCursor();
     }
@@ -562,9 +522,10 @@ void fgDumpSnapShot () {
        show_pu_cursor = true;
        puHideCursor();
     }
+    fgSetBool("/sim/signals/screenshot", true);
 
     FGRenderer *renderer = globals->get_renderer();
-    renderer->init();
+//     renderer->init();
     renderer->resize( fgGetInt("/sim/startup/xsize"),
                         fgGetInt("/sim/startup/ysize") );
 
@@ -594,6 +555,7 @@ void fgDumpSnapShot () {
        message += "\".";
     }
 
+    fgSetBool("/sim/signals/screenshot", false);
     mkDialog (message.c_str());
 
     delete [] filename;