diff --git a/Aircraft/Instruments-3d/alt/alt.xml b/Aircraft/Instruments-3d/alt/alt.xml index 73beb27c2..9d11cb51e 100644 --- a/Aircraft/Instruments-3d/alt/alt.xml +++ b/Aircraft/Instruments-3d/alt/alt.xml @@ -125,121 +125,36 @@ - - pick - click-L - false - - decrease calibrate fine - - true - - property-adjust - /instrumentation/altimeter/setting-inhg - -0.01 - 26.0 - 33.0 - false - - - - decrease calibrate coarse - - true - - property-adjust - /instrumentation/altimeter/setting-inhg - -0.1 - 26.0 - 33.0 - false - - - - decrease calibrate fine (scrollwheel) - - true - - property-adjust - /instrumentation/altimeter/setting-inhg - -0.01 - 26.0 - 33.0 - false - - - - increase calibrate fine (scrollwheel) - - true - - property-adjust - /instrumentation/altimeter/setting-inhg - 0.01 - 26.0 - 33.0 - false - - - + + knob + click-L + click-R + false + + - - pick - click-R - false - - increase calibrate fine - - true + + property-adjust + /instrumentation/altimeter/setting-inhg + 0.01 + 26.0 + 33.0 + false + + + + - property-adjust - /instrumentation/altimeter/setting-inhg - 0.01 - 26.0 - 33.0 - false - - - - increase calibrate coarse - - true - - property-adjust - /instrumentation/altimeter/setting-inhg - 0.1 - 26.0 - 33.0 - false - - - - decrease calibrate fine (scrollwheel) - - true - - property-adjust - /instrumentation/altimeter/setting-inhg - -0.01 - 26.0 - 33.0 - false - - - - increase calibrate fine (scrollwheel) - - true - - property-adjust - /instrumentation/altimeter/setting-inhg - 0.01 - 26.0 - 33.0 - false - - - + set-tooltip + alt-setting + + instrumentation/altimeter/setting-inhg + + + + + + diff --git a/Aircraft/Instruments-3d/mag-compass.xml b/Aircraft/Instruments-3d/mag-compass.xml index 9ac374a61..e7ba098e8 100644 --- a/Aircraft/Instruments-3d/mag-compass.xml +++ b/Aircraft/Instruments-3d/mag-compass.xml @@ -15,4 +15,18 @@ + + + pick + Ring + + + set-tooltip + airspeed + + instrumentation/magnetic-compass/indicated-heading-deg + heading + + + diff --git a/Aircraft/Instruments-3d/magneto-switch/mags.xml b/Aircraft/Instruments-3d/magneto-switch/mags.xml index d7086eb8d..17a88fe9c 100644 --- a/Aircraft/Instruments-3d/magneto-switch/mags.xml +++ b/Aircraft/Instruments-3d/magneto-switch/mags.xml @@ -19,37 +19,38 @@ - pick + knob click-L - false - - decrease mags - - - property-adjust - /controls/engines/engine/magnetos - -1 - 0 - 3 - - - - - pick click-R + false - increase mags - property-adjust /controls/engines/engine/magnetos - 1 + 1 0 3 + + + set-tooltip + magneto-switch + + controls/engines/engine/magnetos + nasal + + + + @@ -72,6 +73,15 @@ + + + + set-tooltip + starter-switch + + + + diff --git a/Aircraft/Instruments-3d/vor/vor.xml b/Aircraft/Instruments-3d/vor/vor.xml index b5c193265..7270f26f5 100644 --- a/Aircraft/Instruments-3d/vor/vor.xml +++ b/Aircraft/Instruments-3d/vor/vor.xml @@ -141,121 +141,39 @@ - - pick - click-L - false - - small decrease - - true - - property-adjust - /instrumentation/nav/radials/selected-deg - -1 - 0 - 360 - 1 - - - - large decrease - - true - - property-adjust - /instrumentation/nav/radials/selected-deg - -5 - 0 - 360 - 1 - - - - small decrease (scrollwheel) - - true - - property-adjust - /instrumentation/nav/radials/selected-deg - -1 - 0 - 360 - 1 - - - - small increase (scrollwheel) - - true - - property-adjust - /instrumentation/nav/radials/selected-deg - 1 - 0 - 360 - 1 - - - - - pick - click-R - false - - small increase - - true - - property-adjust - /instrumentation/nav/radials/selected-deg - 1 - 0 - 360 - 1 + + knob + pick + click-R + click-L + false + + 5 + + + + property-adjust + /instrumentation/nav/radials/selected-deg + 1 + 0 + 360 + 1 + + + + + + set-tooltip + nav1-obs + + heading + /instrumentation/nav/radials/selected-deg - - - large increase - - true - - property-adjust - /instrumentation/nav/radials/selected-deg - 5 - 0 - 360 - 1 - - - - small decrease (scrollwheel) - - true - - property-adjust - /instrumentation/nav/radials/selected-deg - -1 - 0 - 360 - 1 - - - - small increase (scrollwheel) - - true - - property-adjust - /instrumentation/nav/radials/selected-deg - 1 - 0 - 360 - 1 - - + + + Alpha Order Group diff --git a/Aircraft/Instruments-3d/vor/vor2.xml b/Aircraft/Instruments-3d/vor/vor2.xml index 7e3156f91..b1d39db0b 100644 --- a/Aircraft/Instruments-3d/vor/vor2.xml +++ b/Aircraft/Instruments-3d/vor/vor2.xml @@ -141,120 +141,36 @@ - - pick - click-L - false - - small decrease - - true - - property-adjust - /instrumentation/nav[1]/radials/selected-deg - -1 - 0 - 360 - 1 - - - - large decrease - - true - - property-adjust - /instrumentation/nav[1]/radials/selected-deg - -5 - 0 - 360 - 1 - - - - small decrease (scrollwheel) - - true - - property-adjust - /instrumentation/nav[1]/radials/selected-deg - -1 - 0 - 360 - 1 - - - - small increase (scrollwheel) - - true - - property-adjust - /instrumentation/nav[1]/radials/selected-deg - 1 - 0 - 360 - 1 - - - - - pick - click-R - false - - small increase - - true - - property-adjust - /instrumentation/nav[1]/radials/selected-deg - 1 - 0 - 360 - 1 + + knob + pick + click-R + click-L + false + + 5 + + + + property-adjust + /instrumentation/nav[1]/radials/selected-deg + 1 + 0 + 360 + 1 + + + + + + set-tooltip + nav2-obs + + heading + /instrumentation/nav[1]/radials/selected-deg - - - large increase - - true - - property-adjust - /instrumentation/nav[1]/radials/selected-deg - 5 - 0 - 360 - 1 - - - - small decrease (scrollwheel) - - true - - property-adjust - /instrumentation/nav[1]/radials/selected-deg - -1 - 0 - 360 - 1 - - - - small increase (scrollwheel) - - true - - property-adjust - /instrumentation/nav[1]/radials/selected-deg - 1 - 0 - 360 - 1 - - + diff --git a/Aircraft/c172p/Instruments/AI/AI.xml b/Aircraft/c172p/Instruments/AI/AI.xml index 11fd2316e..199b1e745 100644 --- a/Aircraft/c172p/Instruments/AI/AI.xml +++ b/Aircraft/c172p/Instruments/AI/AI.xml @@ -72,36 +72,52 @@ 0 - - - pick - false - AdjustCCW - - - true - - property-adjust - instrumentation/attitude-indicator/horizon-offset-deg - -0.5 - - - - + + pick false AdjustCW - - - true - - property-adjust - instrumentation/attitude-indicator/horizon-offset-deg - 0.5 - - + AdjustCCW + + + knob + AdjustKnob + + + true + + property-adjust + instrumentation/attitude-indicator/horizon-offset-deg + 0.5 + + + + 0.0 + + + 1 + 0 + 0 + + +
+ 0.0 + 0.0 + -0.0353 +
+ + + + set-tooltip + ai-horizon-offset + + instrumentation/attitude-indicator/horizon-offset-deg + + +
+ pick @@ -116,6 +132,16 @@ true + + + + set-tooltip + ai-caged + + on-off + instrumentation/attitude-indicator/caged-flag + + diff --git a/Aircraft/c172p/Instruments/asi/asi.xml b/Aircraft/c172p/Instruments/asi/asi.xml index 5461c326c..0894af94a 100644 --- a/Aircraft/c172p/Instruments/asi/asi.xml +++ b/Aircraft/c172p/Instruments/asi/asi.xml @@ -40,6 +40,20 @@ + + pick + Face + Needle + + + set-tooltip + airspeed + + instrumentation/airspeed-indicator/indicated-speed-kt + + + + diff --git a/Aircraft/c172p/Instruments/hi/hi.xml b/Aircraft/c172p/Instruments/hi/hi.xml index 00d593c96..0ce81c54f 100644 --- a/Aircraft/c172p/Instruments/hi/hi.xml +++ b/Aircraft/c172p/Instruments/hi/hi.xml @@ -65,237 +65,72 @@ - pick + knob click-bug-L - false - - small decrease - - true - - property-adjust - autopilot/settings/heading-bug-deg - -1 - 0 - 360 - 1 - - - - large decrease - - true - - property-adjust - autopilot/settings/heading-bug-deg - -5 - 0 - 360 - 1 - - - - small decrease (scrollwheel) - - true - - property-adjust - autopilot/settings/heading-bug-deg - -1 - 0 - 360 - 1 - - - - small increase (scrollwheel) - - true - - property-adjust - autopilot/settings/heading-bug-deg - 1 - 0 - 360 - 1 - - - - - - pick click-bug-R false + - small increase - - true property-adjust autopilot/settings/heading-bug-deg - 1 - 0 - 360 - 1 - - - - large increase - - true - - property-adjust - autopilot/settings/heading-bug-deg - 5 - 0 - 360 - 1 - - - - small decrease (scrollwheel) - - true - - property-adjust - autopilot/settings/heading-bug-deg - -1 - 0 - 360 - 1 - - - - small increase (scrollwheel) - - true - - property-adjust - autopilot/settings/heading-bug-deg - 1 + 1 0 360 1 + + + 4 + 5 + + + + set-tooltip + heading-bug + heading + + autopilot/settings/heading-bug-deg + + - - pick - click-offset-L - false - - small decrease - - true - - property-adjust - instrumentation/heading-indicator/offset-deg - -1 - 0 - 360 - 1 + + + knob + click-offset-L + click-offset-R + false + + + + property-adjust + instrumentation/heading-indicator/offset-deg + 1 + 0 + 360 + 1 + + + + + 4 + 5 + + + + set-tooltip + heading-offset + + heading + instrumentation/heading-indicator/offset-deg - - - large decrease - - true - - property-adjust - instrumentation/heading-indicator/offset-deg - -5 - 0 - 360 - 1 - - - - small decrease (scrollwheel) - - true - - property-adjust - instrumentation/heading-indicator/offset-deg - -1 - 0 - 360 - 1 - - - - small increase (scrollwheel) - - true - - property-adjust - instrumentation/heading-indicator/offset-deg - 1 - 0 - 360 - 1 - - - + + + - - pick - click-offset-R - false - - small increase - - true - - property-adjust - instrumentation/heading-indicator/offset-deg - 1 - 0 - 360 - 1 - - - - large increase - - true - - property-adjust - instrumentation/heading-indicator/offset-deg - 5 - 0 - 360 - 1 - - - - small decrease (scrollwheel) - - true - - property-adjust - instrumentation/heading-indicator/offset-deg - -1 - 0 - 360 - 1 - - - - small increase (scrollwheel) - - true - - property-adjust - instrumentation/heading-indicator/offset-deg - 1 - 0 - 360 - 1 - - - diff --git a/Aircraft/c172p/Instruments/kap140/KAP140TwoAxisAlt.xml b/Aircraft/c172p/Instruments/kap140/KAP140TwoAxisAlt.xml index 1f42c9efd..c51f9ecc6 100644 --- a/Aircraft/c172p/Instruments/kap140/KAP140TwoAxisAlt.xml +++ b/Aircraft/c172p/Instruments/kap140/KAP140TwoAxisAlt.xml @@ -652,6 +652,13 @@ properties' values. + + + set-tooltip + kap140-ap-btn + + + pick @@ -788,86 +795,39 @@ properties' values. + - pick - knob-inner - - Knob small down - - - nasal - - - - - Knob small up - - - nasal - - - - - - pick - knob-outer - - Knob large down - - - nasal - - - - - Knob large up - - - nasal - - - - + knob-inner + knob-outer + knob + + + nasal + + + + + + nasal + + + + + + + nasal + + + + + + nasal + + + + + - - pick - knob-left - - Knob small down - - - nasal - - - - - Knob large down - - - nasal - - - - - - pick - knob-right - - Knob small up - - - nasal - - - - - Knob large up - - - nasal - - - - + diff --git a/Aircraft/c172p/Instruments/kma20/kma20.xml b/Aircraft/c172p/Instruments/kma20/kma20.xml index 713645015..b8286daf7 100644 --- a/Aircraft/c172p/Instruments/kma20/kma20.xml +++ b/Aircraft/c172p/Instruments/kma20/kma20.xml @@ -113,8 +113,14 @@ - rotate + knob + vertical + 30 AUTO + + AUTOUp + AUTODown + 30 @@ -124,47 +130,39 @@ 0.0131629 0.00714385 - - - - pick - AUTOUp - false + - - false property-adjust - -1 + -1 -1 1 0 - - - - pick - AUTODown - false - - - false + + - property-adjust + set-tooltip + kma20-auto + + nasal + - 1 - -1 - 1 - 0 - + + - rotate + knob COM1 + COM1Up + COM1Down + + vertical + 30 30 @@ -174,47 +172,38 @@ 0.0131629 0.00714385 - - - - pick - COM1Up - false + - - false property-adjust - -1 + -1 -1 1 0 - - - - pick - COM1Down - false - - - false + + - property-adjust + set-tooltip + kma20-com1 - 1 - -1 - 1 - 0 + + nasal + - + + - rotate + knob COM2 + COM2Up + COM2Down + vertical + 30 30 @@ -224,47 +213,38 @@ 0.0131629 0.00714385 - - - - pick - COM2Up - false + - - false property-adjust - -1 + -1 -1 1 0 - - - - pick - COM2Down - false - - - false + + - property-adjust + set-tooltip + kma20-com2 + - 1 - -1 - 1 - 0 + nasal + - + - rotate + knob NAV1 + NAV1Up + NAV1Down + + vertical + 30 30 @@ -274,47 +254,39 @@ 0.0131629 0.00714385 - - - - pick - NAV1Up - false + - - false property-adjust - -1 + -1 -1 1 0 - - - - pick - NAV1Down - false - - - false + + - property-adjust + set-tooltip + kma20-nav1 + - 1 - -1 - 1 - 0 + nasal + - + + - rotate + knob NAV2 + NAV2Up + NAV2Down + + vertical + 30 30 @@ -324,47 +296,38 @@ 0.0131629 0.00714385 - - - - pick - NAV2Up - false + - - false property-adjust - -1 + -1 -1 1 0 - - - - pick - NAV2Down - false - - - false + + - property-adjust + set-tooltip + kma20-nav2 + - 1 - -1 - 1 - 0 + nasal + - + - rotate + knob ADF + ADFUp + ADFDown + + vertical + 30 30 @@ -374,47 +337,38 @@ 0.0131629 0.00714385 - - - - pick - ADFUp - false + - - false property-adjust - -1 + -1 -1 1 0 - - - - pick - ADFDown - false - - - false + + - property-adjust + set-tooltip + kma20-adf + - 1 - -1 - 1 - 0 + nasal + - + - rotate + knob DME + DMEUp + DMEDown + vertical + 30 + 30 @@ -424,47 +378,38 @@ 0.0131629 0.00714385 - - - - pick - DMEUp - false + - - false property-adjust - -1 + -1 -1 1 0 - - - - pick - DMEDown - false - - - false + + - property-adjust + set-tooltip + kma20-dme + - 1 - -1 - 1 - 0 + nasal + - + - rotate + knob MKR + MKRUp + MKRDown + vertical + 30 + 30 @@ -474,42 +419,28 @@ 0.0131629 0.00714385 - - - - pick - MKRUp - false + - - false property-adjust - -1 + -1 -1 1 0 - - - - pick - MKRDown - false - - - false + + - property-adjust + set-tooltip + kma20-mkr + - 1 - -1 - 1 - 0 + nasal + - + @@ -598,8 +529,11 @@ - rotate + knob Knob + MICLeft + MICRight + -30 @@ -609,42 +543,29 @@ -0.0605381 0.00559147 - - - - pick - MICLeft - false + - - false property-adjust - -1 -1 1 0 + + + + set-tooltip + kma20-mic + + + nasal + + + + - - pick - MICRight - false - - - false - - property-adjust - - 1 - -1 - 1 - 0 - - - diff --git a/Aircraft/c172p/Instruments/kr87-adf/ki227_228.xml b/Aircraft/c172p/Instruments/kr87-adf/ki227_228.xml index f95862810..4cdf0ae67 100644 --- a/Aircraft/c172p/Instruments/kr87-adf/ki227_228.xml +++ b/Aircraft/c172p/Instruments/kr87-adf/ki227_228.xml @@ -115,8 +115,17 @@ - rotate + pick + HDGSelectorPick.L + HDGSelectorPick.R + false + + + + + knob HDGSelector + 8.0 @@ -129,96 +138,27 @@ -0.0318072 -0.0327009 + + + + property-adjust + + 1 + 0 + 360 + 1 + + + + + + set-tooltip + adf-hdg + + + + - - pick - HDGSelectorPick.L - false - - - true - - property-adjust - - -1 - 0 - 360 - 1 - - - - - true - - property-adjust - - -10 - 0 - 360 - 1 - - - - - - pick - HDGSelectorPick.R - false - - - true - - property-adjust - - 1 - 0 - 360 - 1 - - - - - true - - property-adjust - - 10 - 0 - 360 - 1 - - - - - - pick - HDGSelector - true - - - true - - property-adjust - - -1 - 0 - 360 - 1 - - - - - true - - property-adjust - - 1 - 0 - 360 - 1 - - - diff --git a/Aircraft/c172p/Instruments/kr87-adf/kr87.xml b/Aircraft/c172p/Instruments/kr87-adf/kr87.xml index 811eb9229..d1abd77fe 100644 --- a/Aircraft/c172p/Instruments/kr87-adf/kr87.xml +++ b/Aircraft/c172p/Instruments/kr87-adf/kr87.xml @@ -443,8 +443,16 @@ - rotate + pick + VolumePickLeft + VolumePickRight + false + + + + knob Volume + /instrumentation/adf[0]/volume-norm -270 @@ -457,21 +465,17 @@ 0.03362955 -0.00472295 - - - - pick - false - VolumePickRight + - property-adjust /instrumentation/adf[0]/volume-norm - 0.1 + 0.1 0 1.0 + + @@ -483,22 +487,8 @@ /instrumentation/adf[0]/power-btn 1 - - - - - pick - false - VolumePickLeft - - - - property-adjust - /instrumentation/adf[0]/volume-norm - -0.1 - 0 - 1.0 - + + @@ -510,186 +500,43 @@ /instrumentation/adf[0]/power-btn 0 + - - - pick - true - Volume - - - - property-adjust - /instrumentation/adf[0]/volume-norm - 0.1 - 0 - 1.0 - - - - - /instrumentation/adf[0]/volume-norm - 0.0 - - - property-assign - /instrumentation/adf[0]/power-btn - 1 - - - - - - property-adjust - /instrumentation/adf[0]/volume-norm - -0.1 - 0 - 1.0 - - - - - /instrumentation/adf[0]/volume-norm - 0.1 - - - property-assign - /instrumentation/adf[0]/power-btn - 0 - - - - + + pick FreqPickLeft - false - - - false - - property-adjust - /instrumentation/adf[0]/frequencies/standby-khz - -1 - 200 - 1800 - 1 - true - - - - - false - - property-adjust - /instrumentation/adf[0]/frequencies/standby-khz - -100 - 200 - 1800 - true - integer - - - - - - pick FreqPickRight false - - - false - - property-adjust - /instrumentation/adf[0]/frequencies/standby-khz - 1 - 200 - 1800 - 1 - true - - - - - false - - property-adjust - /instrumentation/adf[0]/frequencies/standby-khz - 100 - 200 - 1800 - true - integer - - - + - pick + knob FRQOuter FRQInner - true - - false - - devices/status/keyboard/shift - property-adjust /instrumentation/adf[0]/frequencies/standby-khz - -100 - 200 - 1800 - 1 - true - - - - - devices/status/keyboard/shift - - - property-adjust - /instrumentation/adf[0]/frequencies/standby-khz - -1 + 1 200 1800 1 true - - - false + - - - devices/status/keyboard/shift - - property-adjust /instrumentation/adf[0]/frequencies/standby-khz - 1 + 100 200 1800 + 1 true - integer - - - devices/status/keyboard/shift - - property-adjust - /instrumentation/adf[0]/frequencies/standby-khz - 100 - 200 - 1800 - true - integer - - + - diff --git a/Aircraft/c172p/Instruments/light/light_control.xml b/Aircraft/c172p/Instruments/light/light_control.xml index 3a6e8ab1d..c7979c82d 100644 --- a/Aircraft/c172p/Instruments/light/light_control.xml +++ b/Aircraft/c172p/Instruments/light/light_control.xml @@ -6,75 +6,33 @@ - pick - LightHotspotLeft + knob + LightKnob + LightHotspotLeft + LightHotspotRight + true - Decrease - true property-adjust controls/lighting/instruments-norm - -0.1 + 0.1 0 1.0 0 - - - - pick - LightHotspotRight - true - - Increase - - true - - property-adjust - controls/lighting/instruments-norm - 0.1 - 0 - 1.0 - 0 - - - - - - pick - LightHotspotLeft - LightHotspotRight - LightKnob - true - - Decrease - scrollwheel - - true - - property-adjust - controls/lighting/instruments-norm - -0.1 - 0 - 1.0 - 0 - - - - Increase - scrollwheel - - true - - property-adjust - controls/lighting/instruments-norm - 0.1 - 0 - 1.0 - 0 - - + + + + set-tooltip + lighting-brightness + + controls/lighting/instruments-norm + percent + + diff --git a/Aircraft/c172p/Models/c172p.xml b/Aircraft/c172p/Models/c172p.xml index 397962461..d0b774edc 100644 --- a/Aircraft/c172p/Models/c172p.xml +++ b/Aircraft/c172p/Models/c172p.xml @@ -1274,6 +1274,7 @@ pick doorhandleext_right + doorhandleint_right true @@ -1283,11 +1284,20 @@ + + + + set-tooltip + door-handle-r + + + pick doorhandleext_left + doorhandle_intle true @@ -1297,6 +1307,14 @@ + + + + set-tooltip + door-handle-l + + + @@ -1311,34 +1329,14 @@ - - - - pick - doorhandleint_right - true - - - false - - nasal - - - - - - - pick - doorhandle_intle - true - - - false - - nasal - - - + + + + set-tooltip + door-handle-baggage + + + @@ -1500,6 +1498,15 @@ controls/lighting/landing-lights + + + set-tooltip + landing-light-switch + + on-off + controls/lighting/landing-lights + + @@ -1514,6 +1521,15 @@ controls/lighting/taxi-light + + + set-tooltip + taxi-light-switch + + on-off + controls/lighting/taxi-light + + @@ -1528,6 +1544,15 @@ controls/lighting/strobe + + + set-tooltip + strobe-switch + + on-off + controls/lighting/strobe + + @@ -1542,6 +1567,15 @@ controls/lighting/beacon + + + set-tooltip + beacon-switch + + on-off + controls/lighting/beacon + + @@ -1556,6 +1590,15 @@ controls/lighting/nav-lights + + + set-tooltip + nav-light-switch + + on-off + controls/lighting/nav-lights + + @@ -1570,6 +1613,15 @@ controls/anti-ice/pitot-heat + + + set-tooltip + pitot-heat + + on-off + controls/anti-ice/pitot-heat + + @@ -1614,6 +1666,15 @@ /controls/gear/brake-parking + + + set-tooltip + + /controls/gear/brake-parking + parking-brake + on-off + + @@ -1656,36 +1717,36 @@ - pick + slider Throttle ThrottleMount true + + vertical + + - small increase (scrollwheel) - - true property-adjust controls/engines/engine[0]/throttle - 0.05 + 0.05 0 1 0 - - small decrease (scrollwheel) - - true - - property-adjust - controls/engines/engine[0]/throttle - -0.05 - 0 - 1 - 0 + + + + set-tooltip + + Throttle: 100% + throttle + percent + controls/engines/engine[0]/throttle - + + @@ -1701,44 +1762,46 @@ - pick + slider Mixture MixtureMount true + + + vertical + - small increase (scrollwheel) - - true property-adjust controls/engines/engine[0]/mixture - 0.05 + 0.05 0 1 0 - - small decrease (scrollwheel) - - true - - property-adjust - controls/engines/engine[0]/mixture - -0.05 - 0 - 1 - 0 + + + + set-tooltip + + Mixture: 100% + mixture + percent + controls/engines/engine[0]/mixture - + + - rotate + knob TrimWheel controls/flight/elevator-trim -360 + vertical + 0.0 1.0 @@ -1749,38 +1812,28 @@ -0.20 -0.48 + + + + property-adjust + controls/flight/elevator-trim + 0.01 + -1 + 1 + 0 + + + + + + set-tooltip + + pitch-trim + controls/flight/elevator-trim + + - - pick - TrimWheel - true - - Increase (scrollwheel) - - true - - property-adjust - controls/flight/elevator-trim - 0.01 - -1 - 1 - 0 - - - - Decrease (scrollwheel) - - - property-adjust - controls/flight/elevator-trim - -0.01 - -1 - 1 - 0 - - - rotate diff --git a/Nasal/canvas/tooltip.nas b/Nasal/canvas/tooltip.nas index f24c7ee75..f4d814b93 100644 --- a/Nasal/canvas/tooltip.nas +++ b/Nasal/canvas/tooltip.nas @@ -9,13 +9,15 @@ var Tooltip = { _listener: nil, _property: nil, _mapping: "", + _mappingFunc: nil, _width: 0, _height: 0, _tipId: nil, _slice: 17, _measureText: nil, _measureBB: nil, - _hideTimer: nil + _hideTimer: nil, + _hiding: nil }; m.setInt("size[0]", size[0]); @@ -151,26 +153,37 @@ var Tooltip = { { if (me._mapping == "") return val; if (me._mapping == "percent") return int(val * 100); + # TODO - translate me! if (me._mapping == "on-off") return (val == 1) ? "ON" : "OFF"; if (me._mapping == "arm-disarm") return (val == 1) ? "ARMED" : "DISARMED"; + # provide both 'senses' of the flag here if (me._mapping == "up-down") return (val == 1) ? "UP" : "DOWN"; - if (me._mapping == "down-up") return (val == 1) ? "DOWN" : "UP"; + if (me._mapping == "down-up") return (val == 1) ? "DOWN" : "UP"; + if (me._mapping == "open-close") return (val == 1) ? "OPEN" : "CLOSED"; + if (me._mapping == "close-open") return (val == 1) ? "CLOSED" : "OPEN"; + if (me._mapping == "heading") return geo.normdeg(val); + if (me._mapping == "nasal") return me._mappingFunc(val); return val; }, - setMapping: func(mapping) + setMapping: func(mapping, f = nil) { me._mapping = mapping; + me._mappingFunc = f; me._updateText(); }, setTooltipId: func(tipId) { me._tipId = tipId; + if ((tipId != nil) and me._hiding) { + me._hideTimer.stop(); + me._hiding = 0; + } }, getTooltipId: func { me._tipId; }, @@ -191,7 +204,15 @@ var Tooltip = { { # don't show if undefined if (me._tipId == nil) return; - me.setBool("visible", 1); + + if (me._hiding) { + me._hideTimer.stop(); + me._hiding = 0; + } + + if (!me.isVisible()) { + me.setBool("visible", 1); + } }, showMessage: func() @@ -205,7 +226,11 @@ var Tooltip = { hide: func() { - me._hideTimer.restart(1.0); + # this gets run repeatedly during mouse-moves + if (me._hiding) return; + me._hiding = 1; + + me._hideTimer.restart(0.5); }, hideNow: func() @@ -233,6 +258,7 @@ var Tooltip = { _hideTimeout: func() { me.setBool("visible", 0); + me._hiding = 0; } }; @@ -249,17 +275,24 @@ var innerSetTooltip = func(node) tooltip.setWidthText(nil); } - var nodePath = cmdarg().getNode('property'); - if (nodePath != nil) { - var n = props.globals.getNode(nodePath.getValue()); + var propPath = cmdarg().getNode('property'); + if (propPath != nil) { + var n = props.globals.getNode(propPath.getValue()); tooltip.setProperty(n); - - # mapping modes allow some standard conversion of the property - # value to a human readable form. - var mapping = cmdarg().getNode('mapping'); - tooltip.setMapping(mapping == nil ? "" : mapping.getValue()); } else { - tooltip.setProperty(nil); + tooltip.setProperty(nil); + } + + var mapping = cmdarg().getNode('mapping'); + if (mapping != nil) { + var m = mapping.getValue(); + var f = nil; + if (m == 'nasal') { + f = compile(cmdarg().getNode('script').getValue()); + } + + tooltip.setMapping(m, f); + } else { tooltip.setMapping(nil); } } @@ -274,11 +307,10 @@ var setTooltip = func(node) var x = cmdarg().getNode('x').getValue(); var y = cmdarg().getNode('y').getValue(); - var screenHeight = getprop('/sim/startup/ysize'); - tooltip.setPosition(x, screenHeight - y); - tooltip.setTooltipId(tipId); - - innerSetTooltip(node); + var screenHeight = getprop('/sim/startup/ysize'); + tooltip.setPosition(x, screenHeight - y); + tooltip.setTooltipId(tipId); + innerSetTooltip(node); # don't actually show here, we do that response to tooltip-timeout # so this is just getting ready @@ -326,4 +358,4 @@ addcommand("update-hover", updateHover); addcommand("set-tooltip", setTooltip); addcommand("tooltip-timeout", showTooltip); addcommand("show-message", showMessage); -addcommand("clear-message", clearMessage); \ No newline at end of file +addcommand("clear-message", clearMessage);