#include "panel.hxx"
+bool
+fgPanelVisible ()
+{
+ return ((current_options.get_panel_status()) &&
+ (current_options.get_view_mode() == fgOPTIONS::FG_VIEW_PILOT) &&
+ (current_view.get_view_offset() == 0.0));
+}
+
+
\f
////////////////////////////////////////////////////////////////////////
// Implementation of FGTextureManager.
_width(_winw), _height(int(_winh * 0.5768 + 1)),
_x_offset(0), _y_offset(0), _view_height(int(_winh * 0.4232))
{
- setVisibility(current_options.get_panel_status());
+ setVisibility(fgPanelVisible());
}
FGPanel::update () const
{
// Do nothing if the panel isn't visible.
- if (!_visibility)
+ if (!fgPanelVisible())
return;
// If the mouse is down, do something
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBegin(GL_POLYGON);
glTexCoord2f(0.0, 0.0); glVertex3f(_winx, _winy, 0);
- glTexCoord2f(10.0, 0.0); glVertex3f(_winx + _width, _winy, 0);
- glTexCoord2f(10.0, 5.0); glVertex3f(_winx + _width, _winy + _height, 0);
- glTexCoord2f(0.0, 5.0); glVertex3f(_winx, _winy + _height, 0);
+ glTexCoord2f(1.0, 0.0); glVertex3f(_winx + _width, _winy, 0);
+ glTexCoord2f(1.0, 1.0); glVertex3f(_winx + _width, _winy + _height, 0);
+ glTexCoord2f(0.0, 1.0); glVertex3f(_winx, _winy + _height, 0);
glEnd();
// Draw the instruments.