]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel.cxx
Continued FGViewer cleanups. FGViewer is now a base class so that we can
[flightgear.git] / src / Cockpit / panel.cxx
index 74d897d40669e4a8dced475c125fed2c158c62f1..95de80c6ce5f61d976364a23cdded723f09a3342 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"
@@ -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.