]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel.cxx
Moved winWidth and winHeight out of FGViewer since these are set on a
[flightgear.git] / src / Cockpit / panel.cxx
index 74d897d40669e4a8dced475c125fed2c158c62f1..3e371f43e6392b84d98e6163ada299ab51829d78 100644 (file)
@@ -34,7 +34,6 @@
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/fgpath.hxx>
 #include <Main/globals.hxx>
-#include <Main/options.hxx>
 #include <Objects/texload.h>
 
 #include "hud.hxx"
@@ -305,8 +304,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.