Basic carrier support for the reposition dialog
This commit is contained in:
parent
3cf50aec3e
commit
b30a5b1d01
1 changed files with 52 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
||||||
vor: p.getNode("vor", 1),
|
vor: p.getNode("vor", 1),
|
||||||
ndb: p.getNode("ndb", 1),
|
ndb: p.getNode("ndb", 1),
|
||||||
fix: p.getNode("fix", 1),
|
fix: p.getNode("fix", 1),
|
||||||
|
carrier: p.getNode("carrier-active", 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
var set_radio = func(m) {
|
var set_radio = func(m) {
|
||||||
|
@ -239,6 +240,48 @@
|
||||||
<script>set_radio("fix")</script>
|
<script>set_radio("fix")</script>
|
||||||
</binding>
|
</binding>
|
||||||
</input>
|
</input>
|
||||||
|
|
||||||
|
|
||||||
|
<radio>
|
||||||
|
<row>5</row><col>0</col>
|
||||||
|
<live>true</live>
|
||||||
|
<property>/sim/gui/dialogs/location-in-air/carrier-active</property>
|
||||||
|
<halign>left</halign>
|
||||||
|
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>set_radio("carrier")</script>
|
||||||
|
</binding>
|
||||||
|
</radio>
|
||||||
|
<text>
|
||||||
|
<row>5</row><col>1</col>
|
||||||
|
<halign>right</halign>
|
||||||
|
<label>Carrier:</label>
|
||||||
|
</text>
|
||||||
|
<input>
|
||||||
|
<row>5</row><col>2</col>
|
||||||
|
<property>/sim/presets/carrier</property>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>set_radio("carrier")</script>
|
||||||
|
</binding>
|
||||||
|
</input>
|
||||||
|
<text>
|
||||||
|
<row>5</row><col>3</col>
|
||||||
|
<halign>right</halign>
|
||||||
|
<label> Parking:</label>
|
||||||
|
</text>
|
||||||
|
<input>
|
||||||
|
<row>5</row><col>4</col>
|
||||||
|
<property>/sim/presets/parkpos</property>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>set_radio("carrier")</script>
|
||||||
|
</binding>
|
||||||
|
</input>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<hrule/>
|
<hrule/>
|
||||||
|
@ -346,13 +389,20 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/sim/presets/parkpos", "");
|
|
||||||
|
|
||||||
if (!mode.airport.getBoolValue()) {
|
if (mode.carrier.getBoolValue()) {
|
||||||
|
setprop("/sim/presets/airport-id", "");
|
||||||
|
setprop("/sim/presets/runway", "");
|
||||||
|
setprop("/sim/presets/runway-requested", 0);
|
||||||
|
}
|
||||||
|
else if (!mode.airport.getBoolValue()) {
|
||||||
|
setprop("/sim/presets/carrier", "");
|
||||||
|
setprop("/sim/presets/parkpos", "");
|
||||||
setprop("/sim/presets/airport-id", "");
|
setprop("/sim/presets/airport-id", "");
|
||||||
setprop("/sim/presets/runway", "");
|
setprop("/sim/presets/runway", "");
|
||||||
setprop("/sim/presets/runway-requested", 0);
|
setprop("/sim/presets/runway-requested", 0);
|
||||||
} else {
|
} else {
|
||||||
|
setprop("/sim/presets/carrier", "");
|
||||||
var runway = getprop("/sim/presets/runway");
|
var runway = getprop("/sim/presets/runway");
|
||||||
if (runway != "") {
|
if (runway != "") {
|
||||||
setprop("/sim/presets/runway-requested", 1);
|
setprop("/sim/presets/runway-requested", 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue