]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel.cxx
Move current_panel to globals
[flightgear.git] / src / Cockpit / panel.cxx
index 6889751302d63506dfafc14098a33ffe86dbd857..1be381486bb961b4d0b3d8dd16e3b97f7b65f673 100644 (file)
@@ -80,9 +80,9 @@ get_aspect_adjust (int xsize, int ysize)
 bool
 fgPanelVisible ()
 {
-     if(current_panel == 0)
+     if(globals->get_current_panel() == 0)
        return false;
-     if(current_panel->getVisibility() == 0)
+     if(globals->get_current_panel()->getVisibility() == 0)
        return false;
      if(globals->get_viewmgr()->get_current() != 0)
        return false;
@@ -163,7 +163,6 @@ FGCroppedTexture::getTexture ()
 // Implementation of FGPanel.
 ////////////////////////////////////////////////////////////////////////
 
-FGPanel * current_panel = NULL;
 static fntRenderer text_renderer;
 static fntTexFont *default_font = 0;
 static fntTexFont *led_font = 0;
@@ -582,7 +581,7 @@ FGPanel::doMouseAction (int button, int updown, int x, int y)
 
   // Having fixed up the coordinates, fall through to the local
   // coordinate handler.
-  doLocalMouseAction(button, updown, x, y);
+  return doLocalMouseAction(button, updown, x, y);
 }