Nasal/multiplayer.nas: in Pilot List, append +/- to altitude if ascending or descending.
This commit is contained in:
parent
4e94cdc906
commit
ff503c1093
1 changed files with 15 additions and 2 deletions
|
@ -188,18 +188,19 @@ var dialog = {
|
|||
slant: getprop("/sim/gui/selected-style/fonts/mp-list/slant") or 0,
|
||||
};
|
||||
|
||||
me.header = ["view", " callsign", " model", func dialog.dist_hdr, func dialog.alt_hdr ~ " ", " brg", "chat", "ignore" ~ " ", " code", "ver", "airport", " set"];
|
||||
me.header = ["view", " callsign", " model", func dialog.dist_hdr, func dialog.alt_hdr ~ " ", "", " brg", "chat", "ignore" ~ " ", " code", "ver", "airport", " set"];
|
||||
me.columns = [
|
||||
{ type: "checkbox", legend: "", property: "view", halign: "right", "pref-height": 14, "pref-width": 14, callback: "multiplayer.view_select", argprop: "callsign", },
|
||||
{ type: "text", property: "callsign", format: " %s", label: "-----------", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: "model-short", format: " %s", label: "--------------", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: func dialog.dist_node, format:" %8.2f", label: "---------", halign: "right", font: me.font },
|
||||
{ type: "text", property: func dialog.alt_node, format:" %7.0f", label: "---------", halign: "right", font: me.font },
|
||||
{ type: "text", property: "ascent_descent", format: "%s", label: "-", halign: "right", font: me.font },
|
||||
{ type: "text", property: "bearing-to", format: " %3.0f", label: "----", halign: "right", font: me.font },
|
||||
{ type: "button", legend: "", halign: "right", callback: "multiplayer.compose_message", "pref-height": 14, "pref-width": 14 },
|
||||
{ type: "checkbox", property: "controls/invisible", callback: "multiplayer.dialog.toggle_ignore",
|
||||
argprop: "callsign", label: "---------", halign: "right", font: me.font },
|
||||
{ type: "text", property: "id-code", format: " %s", label: "-----", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: "id-code", format: " %s", label: "-", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: "sim/multiplay/protocol-version", format: " %s", label: "--", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: "airport-id", format: "%s", label: "----", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: "set-loaded", format: "%s", label: "----", halign: "fill" , font: me.font },
|
||||
|
@ -384,6 +385,17 @@ var dialog = {
|
|||
airport_id = airport_id.getValue();
|
||||
}
|
||||
|
||||
var ascent_descent = n.getNode("velocities/vertical-speed-fps");
|
||||
if (ascent_descent == nil) {
|
||||
ascent_descent = '';
|
||||
}
|
||||
else {
|
||||
ascent_descent = ascent_descent.getValue();
|
||||
if (ascent_descent > 1) ascent_descent = '+';
|
||||
else if (ascent_descent < -1) ascent_descent = '-';
|
||||
else ascent_descent = '';
|
||||
}
|
||||
|
||||
n.setValues({
|
||||
"model-short": n.getNode("model-installed").getValue() ? mp.model : "[" ~ mp.model ~ "]",
|
||||
"set-loaded": set_loaded ? " *" : " ",
|
||||
|
@ -391,6 +403,7 @@ var dialog = {
|
|||
"distance-to-km": distance / 1000.0,
|
||||
"distance-to-nm": distance * M2NM,
|
||||
"position/altitude-m": n.getNode("position/altitude-ft").getValue() * FT2M,
|
||||
"ascent_descent": ascent_descent,
|
||||
"controls/invisible": contains(ignore, mp.callsign),
|
||||
"id-code": idcode,
|
||||
"airport-id": airport_id,
|
||||
|
|
Loading…
Add table
Reference in a new issue