From 693b963bfbd4438fa01b2fd4ed3cd15b62de3f3f Mon Sep 17 00:00:00 2001 From: jimw Date: Sun, 21 Apr 2002 15:06:22 +0000 Subject: [PATCH] Added flag "allow-toggle-cockpit" so that 3d/2d toggle is not attempted for aircraft that do not have 3d cockpit configured. Toggling is done with the "c" key. Note also that for now, since the 3d models don't have a "small" panel defined, the "s" key is disabled if "allow-toggle-cockpit" is true. --- Aircraft/c172-3d-set.xml | 2 ++ Aircraft/c310u3a-3d-set.xml | 3 +++ keyboard.xml | 39 ++++++++++++++++++++++++++++++++----- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/Aircraft/c172-3d-set.xml b/Aircraft/c172-3d-set.xml index 6c28e3e2d..cd26ebd41 100644 --- a/Aircraft/c172-3d-set.xml +++ b/Aircraft/c172-3d-set.xml @@ -15,6 +15,7 @@ October 23 2001 John Check, fgpanels@rockfish.net true + true jsb c172 @@ -88,3 +89,4 @@ October 23 2001 John Check, fgpanels@rockfish.net + diff --git a/Aircraft/c310u3a-3d-set.xml b/Aircraft/c310u3a-3d-set.xml index 06d893e5b..27e04b336 100644 --- a/Aircraft/c310u3a-3d-set.xml +++ b/Aircraft/c310u3a-3d-set.xml @@ -15,6 +15,8 @@ March 2002 Jim Wilson, jimw@kelcomaine.com true + true + jsb c310u3a @@ -116,3 +118,4 @@ March 2002 Jim Wilson, jimw@kelcomaine.com + diff --git a/keyboard.xml b/keyboard.xml index 13bcea00d..7d88fd7c7 100644 --- a/keyboard.xml +++ b/keyboard.xml @@ -635,29 +635,47 @@ calculated by adding 256 to the GLUT key value in glut.h. c Toggle 3D/2D cockpit + + /sim/allow-toggle-cockpit + property-swap /sim/panel[0]/path /sim/panel[1]/path + + /sim/allow-toggle-cockpit + property-assign /sim/current-view/heading-offset-deg 0 + + /sim/allow-toggle-cockpit + property-assign /sim/current-view/pitch-offset-deg 0 + + /sim/allow-toggle-cockpit + Load panel. panel-load + + /sim/allow-toggle-cockpit + property-toggle /sim/view/internal + + /sim/allow-toggle-cockpit + property-toggle /sim/virtual-cockpit @@ -699,13 +717,23 @@ calculated by adding 256 to the GLUT key value in glut.h. s Swap panels. - property-swap - /sim/panel/path - /sim/panel_2/path + + + /sim/allow-toggle-cockpit + + + property-swap + /sim/panel/path + /sim/panel_2/path - Load panel. - panel-load + + + /sim/allow-toggle-cockpit + + + Load panel. + panel-load @@ -1150,3 +1178,4 @@ calculated by adding 256 to the GLUT key value in glut.h. +