1
0
Fork 0

Add support for flipping the instrument panel vertically on screen (if

we want to do a full screen panel on a device that is mounted upside
down.)
This commit is contained in:
curt 2002-08-19 02:07:39 +00:00
parent d2ba5b1883
commit 9238050068
4 changed files with 9 additions and 4 deletions

View file

@ -254,7 +254,7 @@ void FGKR_87::update( double dt ) {
// Radio
////////////////////////////////////////////////////////////////////////
if ( on_off_vol_btn >= 0.01 ) {
if ( on_off_vol_btn >= 0.05 ) {
// buttons
if ( adf_btn == 0 ) {
ant_mode = 1;

View file

@ -272,6 +272,7 @@ FGPanel::update (double dt)
_x_offset = fgGetInt("/sim/panel/x-offset");
_y_offset = fgGetInt("/sim/panel/y-offset");
_jitter = fgGetFloat("/sim/panel/jitter");
_flipx = fgGetBool("/sim/panel/flip-x");
// Do nothing if the panel isn't visible.
if ( !fgPanelVisible() ) {
@ -330,8 +331,11 @@ FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
if ( _flipx ) {
gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
} else {
gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */
// gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
}
glMatrixMode(GL_MODELVIEW);
glPushMatrix();

View file

@ -197,6 +197,7 @@ private:
int _y_offset;
int _view_height;
float _jitter;
bool _flipx;
const SGPropertyNode * _xsize_node;
const SGPropertyNode * _ysize_node;