| 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <PropertyList> |
| 4 | |
| 5 | <name>c172p-fuel-both-tanks-dialog</name> |
| 6 | <layout>vbox</layout> |
| 7 | <resizable>false</resizable> |
| 8 | <modal>false</modal> |
| 9 | <draggable>true</draggable> |
| 10 | |
| 11 | <nasal> |
| 12 | <open> |
| 13 | # Fuel tanks being used |
| 14 | var integral_tanks = getprop("/fdm/jsbsim/fuel/tank"); |
| 15 | if (integral_tanks) { |
| 16 | setprop("/consumables/fuel/left/level-norm", getprop("/consumables/fuel/tank[2]/level-norm")); |
| 17 | setprop("/consumables/fuel/right/level-norm", getprop("/consumables/fuel/tank[3]/level-norm")); |
| 18 | setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[2]/level-gal_us")); |
| 19 | setprop("/consumables/fuel/right/level-gal_us", getprop("/consumables/fuel/tank[3]/level-gal_us")); |
| 20 | setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[2]/level-lbs")); |
| 21 | setprop("/consumables/fuel/right/level-lbs", getprop("/consumables/fuel/tank[3]/level-lbs")); |
| 22 | setprop("/consumables/fuel/left/level-litres", getprop("/consumables/fuel/tank[2]/level-litres")); |
| 23 | setprop("/consumables/fuel/right/level-litres", getprop("/consumables/fuel/tank[3]/level-litres")); |
| 24 | } else { |
| 25 | setprop("/consumables/fuel/left/level-norm", getprop("/consumables/fuel/tank[0]/level-norm")); |
| 26 | setprop("/consumables/fuel/right/level-norm", getprop("/consumables/fuel/tank[1]/level-norm")); |
| 27 | setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[0]/level-gal_us")); |
| 28 | setprop("/consumables/fuel/right/level-gal_us", getprop("/consumables/fuel/tank[1]/level-gal_us")); |
| 29 | setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[0]/level-lbs")); |
| 30 | setprop("/consumables/fuel/right/level-lbs", getprop("/consumables/fuel/tank[1]/level-lbs")); |
| 31 | setprop("/consumables/fuel/left/level-litres", getprop("/consumables/fuel/tank[0]/level-litres")); |
| 32 | setprop("/consumables/fuel/right/level-litres", getprop("/consumables/fuel/tank[1]/level-litres")); |
| 33 | } |
| 34 | </open> |
| 35 | </nasal> |
| 36 | |
| 37 | <group> |
| 38 | <layout>hbox</layout> |
| 39 | |
| 40 | <empty><stretch>true</stretch></empty> |
| 41 | <text> |
| 42 | <label>Fuel Tanks</label> |
| 43 | </text> |
| 44 | <empty><stretch>true</stretch></empty> |
| 45 | |
| 46 | <button> |
| 47 | <legend>X</legend> |
| 48 | <key>Esc</key> |
| 49 | <halign>right</halign> |
| 50 | <pref-width>20</pref-width> |
| 51 | <pref-height>20</pref-height> |
| 52 | <binding> |
| 53 | <command>dialog-close</command> |
| 54 | </binding> |
| 55 | </button> |
| 56 | </group> |
| 57 | |
| 58 | <hrule/> |
| 59 | |
| 60 | <group> |
| 61 | <layout>hbox</layout> |
| 62 | <padding>6</padding> |
| 63 | |
| 64 | <group> |
| 65 | <layout>vbox</layout> |
| 66 | <text> |
| 67 | <label>Tank</label> |
| 68 | <halign>center</halign> |
| 69 | </text> |
| 70 | <text> |
| 71 | <label>Left Tank:</label> |
| 72 | <halign>left</halign> |
| 73 | </text> |
| 74 | <text> |
| 75 | <label>Right Tank:</label> |
| 76 | <halign>left</halign> |
| 77 | </text> |
| 78 | <text> |
| 79 | <label></label> |
| 80 | </text> |
| 81 | </group> |
| 82 | |
| 83 | <group> |
| 84 | <layout>vbox</layout> |
| 85 | <text> |
| 86 | <label></label> |
| 87 | <halign>left</halign> |
| 88 | </text> |
| 89 | <slider> |
| 90 | <name>c172p-left-fuel-slider2</name> |
| 91 | <min>0</min> |
| 92 | <max>1</max> |
| 93 | <live>true</live> |
| 94 | <enable> |
| 95 | <and> |
| 96 | <or> |
| 97 | <property>/fdm/jsbsim/gear/unit[1]/WOW</property> |
| 98 | <property>/fdm/jsbsim/gear/unit[19]/WOW</property> |
| 99 | <property>/fdm/jsbsim/gear/unit[23]/WOW</property> |
| 100 | <property>/fdm/jsbsim/hydro/active-norm</property> |
| 101 | </or> |
| 102 | <not> |
| 103 | <property>/engines/active-engine/running</property> |
| 104 | </not> |
| 105 | </and> |
| 106 | </enable> |
| 107 | <property>/consumables/fuel/left/level-norm</property> |
| 108 | <binding> |
| 109 | <command>dialog-apply</command> |
| 110 | </binding> |
| 111 | <binding> |
| 112 | <command>nasal</command> |
| 113 | <script> |
| 114 | # Fuel tanks being used |
| 115 | var integral_tanks = getprop("/fdm/jsbsim/fuel/tank"); |
| 116 | if (integral_tanks) { |
| 117 | setprop("/consumables/fuel/tank[2]/level-norm", getprop("/consumables/fuel/left/level-norm")); |
| 118 | setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[2]/level-gal_us")); |
| 119 | setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[2]/level-lbs")); |
| 120 | } else { |
| 121 | setprop("/consumables/fuel/tank[0]/level-norm", getprop("/consumables/fuel/left/level-norm")); |
| 122 | setprop("/consumables/fuel/left/level-gal_us", getprop("/consumables/fuel/tank[0]/level-gal_us")); |
| 123 | setprop("/consumables/fuel/left/level-lbs", getprop("/consumables/fuel/tank[0]/level-lbs")); |
| 124 | } |
| 125 | </script> |
| 126 | </binding> |
| 127 | </slider> |
| 128 | <slider> |
| 129 | <name>c172p-right-fuel-slider2</name> |
| 130 | <min>0</min> |
| 131 | <max>1</max> |
| 132 | <live>true</live> |
| 133 | <enable> |
| 134 | <and> |
| 135 | <or> |
| 136 | <property>/fdm/jsbsim/gear/unit[1]/WOW</property> |
| 137 | <property>/fdm/jsbsim/gear/unit[19]/WOW</property> |
| 138 | <property>/fdm/jsbsim/gear/unit[23]/WOW</property> |
| 139 | <property>/fdm/jsbsim/hydro/active-norm</property> |
| 140 | </or> |
| 141 | <not> |
| 142 | <property>/engines/active-engine/running</property> |
| 143 | </not> |
| 144 | </and> |
| 145 | </enable> |
| 146 | <property>/consumables/fuel/right/level-norm</property> |
| 147 | <binding> |
| 148 | <command>dialog-apply</command> |
| 149 | </binding> |
| 150 | <binding> |
| 151 | <command>nasal</command> |
| 152 | <script> |
| 153 | # Fuel tanks being used |
| 154 | var integral_tanks = getprop("/fdm/jsbsim/fuel/tank"); |
| 155 | if (integral_tanks) { |
| 156 | setprop("/consumables/fuel/tank[3]/level-norm", getprop("/consumables/fuel/right/level-norm")); |
| 157 | setprop("/consumables/fuel/right/level-gal_us", getprop("/consumables/fuel/tank[3]/level-gal_us")); |
| 158 | setprop("/consumables/fuel/right/level-lbs", getprop("/consumables/fuel/tank[3]/level-lbs")); |
| 159 | } else { |
| 160 | setprop("/consumables/fuel/tank[1]/level-norm", getprop("/consumables/fuel/right/level-norm")); |
| 161 | setprop("/consumables/fuel/right/level-gal_us", getprop("/consumables/fuel/tank[1]/level-gal_us")); |
| 162 | setprop("/consumables/fuel/right/level-lbs", getprop("/consumables/fuel/tank[1]/level-lbs")); |
| 163 | } |
| 164 | </script> |
| 165 | </binding> |
| 166 | </slider> |
| 167 | <text> |
| 168 | <label>Total: </label> |
| 169 | <halign>right</halign> |
| 170 | </text> |
| 171 | </group> |
| 172 | |
| 173 | <group> |
| 174 | <layout>vbox</layout> |
| 175 | <text> |
| 176 | <label>Pounds</label> |
| 177 | <halign>left</halign> |
| 178 | </text> |
| 179 | <text> |
| 180 | <label>12345</label> |
| 181 | <halign>left</halign> |
| 182 | <format>%.1f</format> |
| 183 | <live>true</live> |
| 184 | <property>/consumables/fuel/left/level-lbs</property> |
| 185 | </text> |
| 186 | <text> |
| 187 | <label>12345</label> |
| 188 | <halign>left</halign> |
| 189 | <format>%.1f</format> |
| 190 | <live>true</live> |
| 191 | <property>/consumables/fuel/right/level-lbs</property> |
| 192 | </text> |
| 193 | <text> |
| 194 | <label>12345</label> |
| 195 | <halign>left</halign> |
| 196 | <format>%.1f</format> |
| 197 | <live>true</live> |
| 198 | <property>/consumables/fuel/total-fuel-lbs</property> |
| 199 | </text> |
| 200 | </group> |
| 201 | |
| 202 | <group> |
| 203 | <layout>vbox</layout> |
| 204 | <text> |
| 205 | <label>Gallons</label> |
| 206 | <halign>left</halign> |
| 207 | </text> |
| 208 | <text> |
| 209 | <label>12345</label> |
| 210 | <halign>left</halign> |
| 211 | <format>%.2f</format> |
| 212 | <live>true</live> |
| 213 | <property>/consumables/fuel/left/level-gal_us</property> |
| 214 | </text> |
| 215 | <text> |
| 216 | <label>12345</label> |
| 217 | <halign>left</halign> |
| 218 | <format>%.2f</format> |
| 219 | <live>true</live> |
| 220 | <property>/consumables/fuel/right/level-gal_us</property> |
| 221 | </text> |
| 222 | <text> |
| 223 | <label>12345</label> |
| 224 | <halign>left</halign> |
| 225 | <format>%.2f</format> |
| 226 | <live>true</live> |
| 227 | <property>/consumables/fuel/total-fuel-gal_us</property> |
| 228 | </text> |
| 229 | </group> |
| 230 | |
| 231 | </group> |
| 232 | |
| 233 | <group> |
| 234 | <layout>table</layout> |
| 235 | <text> |
| 236 | <row>0</row> |
| 237 | <col>0</col> |
| 238 | <visible> |
| 239 | <and> |
| 240 | <or> |
| 241 | <property>/fdm/jsbsim/gear/unit[1]/WOW</property> |
| 242 | <property>/fdm/jsbsim/gear/unit[19]/WOW</property> |
| 243 | <property>/fdm/jsbsim/gear/unit[23]/WOW</property> |
| 244 | <property>/fdm/jsbsim/hydro/active-norm</property> |
| 245 | </or> |
| 246 | <property>/engines/active-engine/running</property> |
| 247 | </and> |
| 248 | </visible> |
| 249 | <color> |
| 250 | <red>0.9</red> |
| 251 | <green>0.1</green> |
| 252 | <blue>0.1</blue> |
| 253 | </color> |
| 254 | <label>Sliders disabled while engine is running!</label> |
| 255 | </text> |
| 256 | <text> |
| 257 | <row>0</row> |
| 258 | <col>0</col> |
| 259 | <visible> |
| 260 | <not> |
| 261 | <or> |
| 262 | <property>/fdm/jsbsim/gear/unit[1]/WOW</property> |
| 263 | <property>/fdm/jsbsim/gear/unit[19]/WOW</property> |
| 264 | <property>/fdm/jsbsim/gear/unit[23]/WOW</property> |
| 265 | <property>/fdm/jsbsim/hydro/active-norm</property> |
| 266 | </or> |
| 267 | </not> |
| 268 | </visible> |
| 269 | <color> |
| 270 | <red>0.9</red> |
| 271 | <green>0.1</green> |
| 272 | <blue>0.1</blue> |
| 273 | </color> |
| 274 | <label>Sliders disabled while in the air!</label> |
| 275 | </text> |
| 276 | </group> |
| 277 | |
| 278 | <hrule/> |
| 279 | |
| 280 | <group> |
| 281 | <layout>hbox</layout> |
| 282 | <default-padding>6</default-padding> |
| 283 | <empty><stretch>true</stretch></empty> |
| 284 | <button> |
| 285 | <legend>Close</legend> |
| 286 | <equal>true</equal> |
| 287 | <key>Esc</key> |
| 288 | <default>true</default> |
| 289 | <binding> |
| 290 | <command>dialog-close</command> |
| 291 | </binding> |
| 292 | </button> |
| 293 | </group> |
| 294 | |
| 295 | </PropertyList> |