]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel.cxx
Tweaks.
[flightgear.git] / src / Cockpit / panel.cxx
index 74d897d40669e4a8dced475c125fed2c158c62f1..11370d7452ea70c783d1d68f5cbc1997844679de 100644 (file)
@@ -34,8 +34,8 @@
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/fgpath.hxx>
 #include <Main/globals.hxx>
-#include <Main/options.hxx>
 #include <Objects/texload.h>
+#include <Time/light.hxx>
 
 #include "hud.hxx"
 #include "panel.hxx"
@@ -45,7 +45,7 @@ bool
 fgPanelVisible ()
 {
   return ((globals->get_options()->get_panel_status()) &&
-         (globals->get_options()->get_view_mode() == FGOptions::FG_VIEW_PILOT) &&
+         (globals->get_viewmgr()->get_current() == 0) &&
          (globals->get_current_view()->get_view_offset() == 0.0));
 }
 
@@ -305,8 +305,8 @@ FGPanel::doMouseAction (int button, int updown, int x, int y)
   }
 
                                // Scale for the real window size.
-  x = int(((float)x / globals->get_current_view()->get_winWidth()) * _winw);
-  y = int(_winh - (((float)y / globals->get_current_view()->get_winHeight())
+  x = int(((float)x / globals->get_options()->get_xsize()) * _winw);
+  y = int(_winh - (((float)y / globals->get_options()->get_ysize())
                   * _winh));
 
                                // Adjust for offsets.