- allow selection and manipulation of multiple objects
- replace lon/lat adjustment with more predictable nearer/farther/left/right adjustment (i.e. movements relative to the UFO position) - add key bindings to move objects
This commit is contained in:
parent
ad8048627d
commit
490ed46d89
5 changed files with 1060 additions and 644 deletions
|
@ -36,8 +36,65 @@
|
|||
<nasal>
|
||||
<open>
|
||||
var self = cmdarg();
|
||||
ufo.adjust.center_sliders();
|
||||
var dlgname = self.getNode("name").getValue();
|
||||
|
||||
var Value = {
|
||||
new : func(name) {
|
||||
var m = { parents: [Value] };
|
||||
m.name = name;
|
||||
var n = props.globals.getNode("/models/adjust/" ~ m.name, 1);
|
||||
m.sliderN = n.getNode("slider", 1);
|
||||
m.offsetN = n.getNode("offset", 1);
|
||||
m.offsetN.setDoubleValue(0);
|
||||
m.sliderN.setDoubleValue(0);
|
||||
m.last_slider = 0;
|
||||
m.center();
|
||||
m.sliderL = setlistener(m.sliderN, func { m.update() });
|
||||
return m;
|
||||
},
|
||||
del : func {
|
||||
removelistener(me.sliderL);
|
||||
},
|
||||
update : func {
|
||||
var offs = me.sliderN.getValue();
|
||||
ufo.modelmgr.adjust(me.name, me.offsetN.getValue() + me.sliderN.getValue()
|
||||
- me.last_slider, 1); # 1 -> scale with distance
|
||||
me.offsetN.setDoubleValue(0);
|
||||
me.last_slider = offs;
|
||||
},
|
||||
center : func {
|
||||
me.offsetN.setValue(me.offsetN.getValue() + me.sliderN.getValue());
|
||||
me.sliderN.setDoubleValue(0);
|
||||
},
|
||||
};
|
||||
|
||||
var values = [
|
||||
Value.new("longitudinal"),
|
||||
Value.new("transversal"),
|
||||
Value.new("altitude"),
|
||||
Value.new("heading"),
|
||||
Value.new("pitch"),
|
||||
Value.new("roll"),
|
||||
];
|
||||
|
||||
var center = func {
|
||||
foreach (var v; values) {
|
||||
v.center();
|
||||
}
|
||||
}
|
||||
|
||||
var update = func(w) {
|
||||
self.setValues({"dialog-name": dlgname, "object-name": w});
|
||||
fgcommand("dialog-update", self);
|
||||
center();
|
||||
}
|
||||
</open>
|
||||
|
||||
<close>
|
||||
foreach (var v; values) {
|
||||
v.del();
|
||||
}
|
||||
</close>
|
||||
</nasal>
|
||||
|
||||
<group>
|
||||
|
@ -49,9 +106,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/longitudinal/offset</property>
|
||||
<step>-10</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("lon", -0.0004)</script>
|
||||
<script>update("longitudinal")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -60,19 +122,25 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/longitudinal/offset</property>
|
||||
<step>-1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("lon", -0.00004)</script>
|
||||
<script>update("longitudinal")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<slider>
|
||||
<property>/data/offsets/longitude-deg</property>
|
||||
<legend>lon</legend>
|
||||
<name>longitudinal</name>
|
||||
<property>/models/adjust/longitudinal/slider</property>
|
||||
<legend>near/far</legend>
|
||||
<pref-width>250</pref-width>
|
||||
<live>1</live>
|
||||
<min>-0.00004</min>
|
||||
<max>0.00004</max>
|
||||
<min>-1</min>
|
||||
<max>1</max>
|
||||
|
||||
<color>
|
||||
<red>1.0</red>
|
||||
|
@ -83,6 +151,7 @@
|
|||
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>longitudinal</object-name>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
|
@ -91,9 +160,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/longitudinal/offset</property>
|
||||
<step>1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("lon", 0.00004)</script>
|
||||
<script>update("longitudinal")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -102,9 +176,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/longitudinal/offset</property>
|
||||
<step>10</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("lon", 0.0004)</script>
|
||||
<script>update("longitudinal")</script>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
@ -118,9 +197,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/transversal/offset</property>
|
||||
<step>-10</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("lat", -0.0002)</script>
|
||||
<script>update("transversal")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -129,19 +213,25 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/transversal/offset</property>
|
||||
<step>-1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("lat", -0.00002)</script>
|
||||
<script>update("transversal")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<slider>
|
||||
<property>/data/offsets/latitude-deg</property>
|
||||
<legend>lat</legend>
|
||||
<name>transversal</name>
|
||||
<property>/models/adjust/transversal/slider</property>
|
||||
<legend>left/right</legend>
|
||||
<pref-width>250</pref-width>
|
||||
<live>1</live>
|
||||
<min>-0.00002</min>
|
||||
<max>0.00002</max>
|
||||
<min>-1</min>
|
||||
<max>1</max>
|
||||
|
||||
<color>
|
||||
<red>0.6</red>
|
||||
|
@ -152,6 +242,7 @@
|
|||
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>transversal</object-name>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
|
@ -160,9 +251,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/transversal/offset</property>
|
||||
<step>1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("lat", 0.00002)</script>
|
||||
<script>update("transversal")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -171,9 +267,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/transversal/offset</property>
|
||||
<step>10</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("lat", 0.0002)</script>
|
||||
<script>update("transversal")</script>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
@ -187,9 +288,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/altitude/offset</property>
|
||||
<step>-10</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("elev", -10)</script>
|
||||
<script>update("altitude")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -198,19 +304,25 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/altitude/offset</property>
|
||||
<step>-1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("elev", -2)</script>
|
||||
<script>update("altitude")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<slider>
|
||||
<property>/data/offsets/elevation-ft</property>
|
||||
<legend>elev</legend>
|
||||
<name>altitude</name>
|
||||
<property>/models/adjust/altitude/slider</property>
|
||||
<legend>altitude</legend>
|
||||
<pref-width>250</pref-width>
|
||||
<live>1</live>
|
||||
<min>-2</min>
|
||||
<max>2</max>
|
||||
<min>-1</min>
|
||||
<max>1</max>
|
||||
|
||||
<color>
|
||||
<red>0.6</red>
|
||||
|
@ -221,6 +333,7 @@
|
|||
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>altitude</object-name>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
|
@ -229,9 +342,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/altitude/offset</property>
|
||||
<step>1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("elev", 2)</script>
|
||||
<script>update("altitude")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -240,9 +358,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/altitude/offset</property>
|
||||
<step>10</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("elev", 10)</script>
|
||||
<script>update("altitude")</script>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
@ -256,9 +379,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/heading/offset</property>
|
||||
<step>-6</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("hdg", -36)</script>
|
||||
<script>update("heading")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -267,19 +395,25 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/heading/offset</property>
|
||||
<step>-1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("hdg", -6)</script>
|
||||
<script>update("heading")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<slider>
|
||||
<property>/data/offsets/heading-deg</property>
|
||||
<legend>hdg</legend>
|
||||
<name>heading</name>
|
||||
<property>/models/adjust/heading/slider</property>
|
||||
<legend>heading</legend>
|
||||
<pref-width>250</pref-width>
|
||||
<live>1</live>
|
||||
<min>-6</min>
|
||||
<max>6</max>
|
||||
<min>-1</min>
|
||||
<max>1</max>
|
||||
|
||||
<color>
|
||||
<red>1.0</red>
|
||||
|
@ -290,6 +424,7 @@
|
|||
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>heading</object-name>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
|
@ -298,9 +433,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/heading/offset</property>
|
||||
<step>1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("hdg", 6)</script>
|
||||
<script>update("heading")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -309,9 +449,14 @@
|
|||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/heading/offset</property>
|
||||
<step>6</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("hdg", 36)</script>
|
||||
<script>update("heading")</script>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
@ -326,9 +471,14 @@
|
|||
<pref-height>22</pref-height>
|
||||
<live>1</live>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/pitch/offset</property>
|
||||
<step>-6</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("pitch", -36)</script>
|
||||
<script>update("pitch")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -338,19 +488,25 @@
|
|||
<pref-height>22</pref-height>
|
||||
<live>1</live>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/pitch/offset</property>
|
||||
<step>-1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("pitch", -6)</script>
|
||||
<script>update("pitch")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<slider>
|
||||
<property>/data/offsets/pitch-deg</property>
|
||||
<name>pitch</name>
|
||||
<property>/models/adjust/pitch/slider</property>
|
||||
<legend>pitch</legend>
|
||||
<pref-width>250</pref-width>
|
||||
<live>1</live>
|
||||
<min>-6</min>
|
||||
<max>6</max>
|
||||
<min>-1</min>
|
||||
<max>1</max>
|
||||
|
||||
<color>
|
||||
<red>1.0</red>
|
||||
|
@ -361,6 +517,7 @@
|
|||
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>pitch</object-name>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
|
@ -370,9 +527,14 @@
|
|||
<pref-height>22</pref-height>
|
||||
<live>1</live>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/pitch/offset</property>
|
||||
<step>1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("pitch", 6)</script>
|
||||
<script>update("pitch")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -382,9 +544,14 @@
|
|||
<pref-height>22</pref-height>
|
||||
<live>1</live>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/pitch/offset</property>
|
||||
<step>6</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("pitch", 36)</script>
|
||||
<script>update("pitch")</script>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
@ -399,9 +566,14 @@
|
|||
<pref-height>22</pref-height>
|
||||
<live>1</live>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/roll/offset</property>
|
||||
<step>-6</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("roll", -36)</script>
|
||||
<script>update("roll")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -411,19 +583,25 @@
|
|||
<pref-height>22</pref-height>
|
||||
<live>1</live>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/roll/offset</property>
|
||||
<step>-1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("roll", -6)</script>
|
||||
<script>update("roll")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<slider>
|
||||
<property>/data/offsets/roll-deg</property>
|
||||
<name>roll</name>
|
||||
<property>/models/adjust/roll/slider</property>
|
||||
<legend>roll</legend>
|
||||
<pref-width>250</pref-width>
|
||||
<live>1</live>
|
||||
<min>-6</min>
|
||||
<max>6</max>
|
||||
<min>-1</min>
|
||||
<max>1</max>
|
||||
|
||||
<color>
|
||||
<red>0.6</red>
|
||||
|
@ -434,6 +612,7 @@
|
|||
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>roll</object-name>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
|
@ -443,9 +622,14 @@
|
|||
<pref-height>22</pref-height>
|
||||
<live>1</live>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/roll/offset</property>
|
||||
<step>1</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("roll", 6)</script>
|
||||
<script>update("roll")</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -455,9 +639,14 @@
|
|||
<pref-height>22</pref-height>
|
||||
<live>1</live>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/models/adjust/roll/offset</property>
|
||||
<step>6</step>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.step("roll", 36)</script>
|
||||
<script>update("roll")</script>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
@ -492,19 +681,21 @@
|
|||
<pref-width>60</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.orient()</script>
|
||||
<script>ufo.modelmgr.reset_heading()</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
<name>sticky-heading</name>
|
||||
<legend>Sticky</legend>
|
||||
<one-shot>0</one-shot>
|
||||
<pref-height>22</pref-height>
|
||||
<pref-width>55</pref-width>
|
||||
<live>1</live>
|
||||
<property>/data/sticky-heading</property>
|
||||
<property>/models/adjust/sticky-heading</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>sticky-heading</object-name>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -517,21 +708,23 @@
|
|||
<pref-width>60</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.center_sliders()</script>
|
||||
<script>center()</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<empty><stretch>1</stretch></empty>
|
||||
|
||||
<button>
|
||||
<name>sticky-orientation</name>
|
||||
<legend>Sticky</legend>
|
||||
<one-shot>0</one-shot>
|
||||
<pref-height>22</pref-height>
|
||||
<pref-width>55</pref-width>
|
||||
<live>1</live>
|
||||
<property>/data/sticky-orientation</property>
|
||||
<property>/models/adjust/sticky-orientation</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>sticky-orientation</object-name>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
@ -542,7 +735,7 @@
|
|||
<pref-width>60</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust.upright()</script>
|
||||
<script>ufo.modelmgr.reset_orientation()</script>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.modelmgr.setmodelpath(getprop('/cursor'))</script>
|
||||
<script>ufo.modelmgr.set_modelpath(getprop("/cursor"))</script>
|
||||
</binding>
|
||||
</list>
|
||||
</PropertyList>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
</font>
|
||||
|
||||
<input>
|
||||
<name>input</name>
|
||||
<halign>left</halign>
|
||||
<pref-width>300</pref-width>
|
||||
<live>1</live>
|
||||
|
@ -56,6 +57,11 @@
|
|||
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>input</object-name>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.modelmgr.update_legend()</script>
|
||||
</binding>
|
||||
</input>
|
||||
|
||||
|
|
|
@ -1,171 +1,351 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
<sim>
|
||||
<description>UFO from the 'White Project' of the UNESCO</description>
|
||||
<author>ET</author>
|
||||
<sim>
|
||||
<description>UFO from the 'White Project' of the UNESCO</description>
|
||||
<author>ET</author>
|
||||
|
||||
<flight-model>ufo</flight-model>
|
||||
<flight-model>ufo</flight-model>
|
||||
|
||||
<sound>
|
||||
<path>Aircraft/ufo/ufo-sound.xml</path>
|
||||
</sound>
|
||||
<sound>
|
||||
<path>Aircraft/ufo/ufo-sound.xml</path>
|
||||
</sound>
|
||||
|
||||
<panel>
|
||||
<visibility>false</visibility>
|
||||
</panel>
|
||||
<panel>
|
||||
<visibility>false</visibility>
|
||||
</panel>
|
||||
|
||||
<model>
|
||||
<path>Aircraft/ufo/Models/ufo.xml</path>
|
||||
<always-show-in-MP type="bool">false</always-show-in-MP>
|
||||
</model>
|
||||
<model>
|
||||
<path>Aircraft/ufo/Models/ufo.xml</path>
|
||||
<always-show-in-MP type="bool">false</always-show-in-MP>
|
||||
</model>
|
||||
|
||||
<help>
|
||||
<title>UFO</title>
|
||||
<key>
|
||||
<name>joystick fire button</name>
|
||||
<desc>fly backwards</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>b</name>
|
||||
<desc>fly backwards</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>[ ]</name>
|
||||
<desc>decrease/increase maximum speed</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>mouse click</name>
|
||||
<desc>add model to scenery</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Ctrl + mouse click</name>
|
||||
<desc>select nearest model (flashes)</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Shift + mouse click</name>
|
||||
<desc>move selected model to new place</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Ctrl + cursor up/down</name>
|
||||
<desc>cycle through model list</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>backspace</name>
|
||||
<desc>remove selected model</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>tab</name>
|
||||
<desc>open/close cursor dialog</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>d</name>
|
||||
<desc>dump model data to terminal</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>e</name>
|
||||
<desc>export model data</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>m</name>
|
||||
<desc>open/close model select dialog</desc>
|
||||
</key>
|
||||
<help>
|
||||
<title>UFO</title>
|
||||
<key>
|
||||
<name>joystick fire button</name>
|
||||
<desc>fly backwards</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>b</name>
|
||||
<desc>fly backwards</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>[ ]</name>
|
||||
<desc>decrease/increase maximum speed</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>mouse click</name>
|
||||
<desc>add model to scenery</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Ctrl + mouse click</name>
|
||||
<desc>select nearest model</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Shift + mouse click</name>
|
||||
<desc>add new model to selection</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Shift + Ctrl + mouse click</name>
|
||||
<desc>add nearest model to selection</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Alt + mouse click</name>
|
||||
<desc>move selected model(s) to new place</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Ctrl + PgUp/PgDn</name>
|
||||
<desc>cycle through model list</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>Ctrl + CurUp/Down/Left/Right</name>
|
||||
<desc>move selected model(s) away/nearer/left/right</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>backspace</name>
|
||||
<desc>remove selected model(s)</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>tab</name>
|
||||
<desc>open/close cursor dialog</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>d</name>
|
||||
<desc>dump model data to terminal</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>e</name>
|
||||
<desc>export model data</desc>
|
||||
</key>
|
||||
<key>
|
||||
<name>m</name>
|
||||
<desc>open/close model select dialog</desc>
|
||||
</key>
|
||||
|
||||
<line>Pre-select initial model (path relative to $FG_ROOT):</line>
|
||||
<line>  --prop:cursor=Model/path.xml</line>
|
||||
<line></line>
|
||||
<line>Set directories that are scanned for models (comma separated and</line>
|
||||
<line>relative to $FG_ROOT; default: Models):</line>
|
||||
<line>  --prop:source=Models,Scenery/Objects</line>
|
||||
<line></line>
|
||||
<line>Exported data are written to:</line>
|
||||
<line>  ~/.fgfs/ufo-model-export.xml (Unix)</line>
|
||||
<line>  %APPDATA%\flightgear.org\ufo-model-export.xml (Microsoft Windows)</line>
|
||||
</help>
|
||||
</sim>
|
||||
<line>Pre-select initial model (path relative to $FG_ROOT):</line>
|
||||
<line>  --prop:cursor=Model/path.xml</line>
|
||||
<line></line>
|
||||
<line>Set directories that are scanned for models (comma separated and</line>
|
||||
<line>relative to $FG_ROOT; default: Models):</line>
|
||||
<line>  --prop:source=Models,Scenery/Objects</line>
|
||||
<line></line>
|
||||
<line>Exported data are written to:</line>
|
||||
<line>  ~/.fgfs/ufo-model-export.xml (Unix)</line>
|
||||
<line>  %APPDATA%\flightgear.org\ufo-model-export.xml (Microsoft Windows)</line>
|
||||
</help>
|
||||
</sim>
|
||||
|
||||
<gear>
|
||||
<gear>
|
||||
<!-- hint for the route manager -->
|
||||
<wow type="bool">false</wow>
|
||||
</gear>
|
||||
</gear>
|
||||
<input>
|
||||
<keyboard>
|
||||
<key n="8">
|
||||
<name>Backspace</name>
|
||||
<desc>Remove selected model</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.modelmgr.remove_selected()</script>
|
||||
</binding>
|
||||
</key>
|
||||
|
||||
<autopilot>
|
||||
<route-manager>
|
||||
<min-lock-altitude-agl-ft type="double">-10000</min-lock-altitude-agl-ft>
|
||||
</route-manager>
|
||||
</autopilot>
|
||||
<key n="9">
|
||||
<name>Ctrl-I</name>
|
||||
<desc>Show model adjustment dialog</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust_dialog.toggle()</script>
|
||||
</binding>
|
||||
</key>
|
||||
|
||||
<input>
|
||||
<keyboard>
|
||||
<key n="8">
|
||||
<name>Backspace</name>
|
||||
<desc>Remove selected model</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.removeSelectedModel()</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="100">
|
||||
<name>d</name>
|
||||
<desc>Dump coordinates</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.print_data()</script>
|
||||
</binding>
|
||||
</key>
|
||||
|
||||
<key n="9">
|
||||
<name>Ctrl-I</name>
|
||||
<desc>Show model adjustment dialog</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.adjust_dialog.toggle()</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="101">
|
||||
<name>e</name>
|
||||
<desc>Export model data XML file</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.export_data()</script>
|
||||
</binding>
|
||||
</key>
|
||||
|
||||
<key n="100">
|
||||
<name>d</name>
|
||||
<desc>Dump coordinates</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.printData()</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="109">
|
||||
<name>m</name>
|
||||
<desc>Show model select dialog</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.select_dialog.toggle()</script>
|
||||
</binding>
|
||||
</key>
|
||||
|
||||
<key n="101">
|
||||
<name>e</name>
|
||||
<desc>Export model data XML file</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.exportData()</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="360">
|
||||
<name>PageUp</name>
|
||||
<desc>Increase throttle or autopilot autothrottle.</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.cycle(1);
|
||||
} else {
|
||||
controls.incThrottle(0.01, 1.0)
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-shift>
|
||||
<desc>Look front right.</desc>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/goal-heading-offset-deg</property>
|
||||
<property>/sim/view/config/front-right-direction-deg</property>
|
||||
</binding>
|
||||
</mod-shift>
|
||||
</key>
|
||||
|
||||
<key n="109">
|
||||
<name>m</name>
|
||||
<desc>Show model select dialog</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>ufo.select_dialog.toggle()</script>
|
||||
</binding>
|
||||
</key>
|
||||
</keyboard>
|
||||
</input>
|
||||
<key n="361">
|
||||
<name>PageDown</name>
|
||||
<desc>Decrease throttle or autopilot autothrottle.</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.cycle(-1);
|
||||
} else {
|
||||
controls.incThrottle(-0.01, -1.0)
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-shift>
|
||||
<desc>Look back right.</desc>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/goal-heading-offset-deg</property>
|
||||
<property>/sim/view/config/back-right-direction-deg</property>
|
||||
</binding>
|
||||
</mod-shift>
|
||||
</key>
|
||||
|
||||
<!-- default model -->
|
||||
<cursor type="string">Aircraft/ufo/Models/cursor.ac</cursor>
|
||||
<key n="356">
|
||||
<name>Left</name>
|
||||
<desc>Move aileron left (or adjust AP heading.)</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.adjust("transversal", -1);
|
||||
} else {
|
||||
controls.incAileron(-0.05, -1.0);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-shift>
|
||||
<desc>Look left.</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.adjust("transversal", -10);
|
||||
} else {
|
||||
setprop("/sim/current-view/goal-heading-offset-deg",
|
||||
getprop("/sim/view/config/left-direction-deg"));
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-shift>
|
||||
</key>
|
||||
|
||||
<!-- subdirs of $FG_ROOT to search models in.
|
||||
Comma separated, e.g. "Models,Scenery/Objects/w130n30" -->
|
||||
<source type="string">Models</source>
|
||||
<key n="357">
|
||||
<name>Up</name>
|
||||
<desc>Increase elevator or autopilot altitude.</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.adjust("longitudinal", 1);
|
||||
} else {
|
||||
controls.incElevator(0.05, -100);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-shift>
|
||||
<desc>Look forward.</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.adjust("longitudinal", 10);
|
||||
} else {
|
||||
setprop("/sim/current-view/goal-heading-offset-deg",
|
||||
getprop("/sim/view/config/front-direction-deg"));
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-shift>
|
||||
</key>
|
||||
|
||||
<nasal>
|
||||
<ufo>
|
||||
<file>Aircraft/ufo/ufo.nas</file>
|
||||
</ufo>
|
||||
<key n="358">
|
||||
<name>Right</name>
|
||||
<desc>Move aileron right (or adjust AP heading.)</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.adjust("transversal", 1);
|
||||
} else {
|
||||
controls.incAileron(0.05, 1.0);
|
||||
}
|
||||
</script>
|
||||
<step type="double">0.05</step>
|
||||
</binding>
|
||||
<mod-shift>
|
||||
<desc>Look right.</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.adjust("transversal", 10);
|
||||
} else {
|
||||
setprop("/sim/current-view/goal-heading-offset-deg",
|
||||
getprop("/sim/view/config/right-direction-deg"));
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-shift>
|
||||
</key>
|
||||
|
||||
<aar>
|
||||
<file>Aircraft/Generic/aar.nas</file>
|
||||
</aar>
|
||||
</nasal>
|
||||
<key n="359">
|
||||
<name>Down</name>
|
||||
<desc>Decrease elevator or autopilot altitude.</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.adjust("longitudinal", -1);
|
||||
} else {
|
||||
controls.incElevator(-0.05, 100);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<mod-shift>
|
||||
<desc>Look backwards.</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("/devices/status/keyboard/ctrl")) {
|
||||
ufo.modelmgr.adjust("longitudinal", -10);
|
||||
} else {
|
||||
setprop("/sim/current-view/goal-heading-offset-deg",
|
||||
getprop("/sim/view/config/back-direction-deg"));
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</mod-shift>
|
||||
</key>
|
||||
</keyboard>
|
||||
</input>
|
||||
|
||||
<instrumentation>
|
||||
<radar>
|
||||
<debug-mode type="bool">true</debug-mode>
|
||||
</radar>
|
||||
</instrumentation>
|
||||
<!-- default model -->
|
||||
<cursor type="string">Aircraft/ufo/Models/cursor.ac</cursor>
|
||||
|
||||
<!-- subdirs of $FG_ROOT to search models in. Comma separated, e.g. "Models,Scenery/Objects/w130n30" -->
|
||||
<source type="string">Models</source>
|
||||
|
||||
<nasal>
|
||||
<ufo>
|
||||
<file>Aircraft/ufo/ufo.nas</file>
|
||||
</ufo>
|
||||
|
||||
<aar>
|
||||
<file>Aircraft/Generic/aar.nas</file>
|
||||
</aar>
|
||||
</nasal>
|
||||
|
||||
<instrumentation>
|
||||
<radar>
|
||||
<debug-mode type="bool">true</debug-mode>
|
||||
</radar>
|
||||
</instrumentation>
|
||||
|
||||
<gear>
|
||||
<gear>
|
||||
<!-- hint for the route manager -->
|
||||
<wow type="bool">false</wow>
|
||||
</gear>
|
||||
</gear>
|
||||
|
||||
<autopilot>
|
||||
<route-manager>
|
||||
<min-lock-altitude-agl-ft type="double">-10000</min-lock-altitude-agl-ft>
|
||||
</route-manager>
|
||||
</autopilot>
|
||||
</PropertyList>
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue