| 1 |
<?xml version="1.0"?> |
| 2 |
|
| 3 |
|
| 4 |
<PropertyList> |
| 5 |
<name>formation</name> |
| 6 |
<modal>false</modal> |
| 7 |
<layout>vbox</layout> |
| 8 |
|
| 9 |
|
| 10 |
<group> |
| 11 |
<layout>hbox</layout> |
| 12 |
|
| 13 |
<text> |
| 14 |
<label>AI Wingman Controls</label> |
| 15 |
</text> |
| 16 |
|
| 17 |
<empty><stretch>1</stretch></empty> |
| 18 |
|
| 19 |
<button> |
| 20 |
<legend>X</legend> |
| 21 |
<key>Esc</key> |
| 22 |
<pref-width>20</pref-width> |
| 23 |
<pref-height>20</pref-height> |
| 24 |
<binding> |
| 25 |
<command>dialog-close</command> |
| 26 |
</binding> |
| 27 |
</button> |
| 28 |
</group> |
| 29 |
|
| 30 |
<hrule/> |
| 31 |
|
| 32 |
<group> |
| 33 |
<layout>hbox</layout> |
| 34 |
<empty> |
| 35 |
<pref-width>10</pref-width> |
| 36 |
</empty> |
| 37 |
|
| 38 |
<group> |
| 39 |
<layout>vbox</layout> |
| 40 |
|
| 41 |
<radio> |
| 42 |
<halign>left</halign> |
| 43 |
<label>Formate</label> |
| 44 |
<property>/sim/ai/models/wingman/controls/formate-to-ac</property> |
| 45 |
<live>true</live> |
| 46 |
<binding> |
| 47 |
<command>dialog-apply</command> |
| 48 |
</binding> |
| 49 |
<binding> |
| 50 |
<command>nasal</command> |
| 51 |
<script> |
| 52 |
var v = getprop("/sim/ai/models/wingman/controls/formate-to-ac"); |
| 53 |
setprop("/sim/ai/models/wingman/controls/break",0); |
| 54 |
setprop("/sim/ai/models/wingman/controls/join",0); |
| 55 |
foreach (var c; props.globals.getNode("/ai/models").getChildren("wingman")){ |
| 56 |
c.getNode("controls/formate-to-ac").setBoolValue(v); |
| 57 |
c.getNode("controls/break").setBoolValue(0); |
| 58 |
c.getNode("controls/join").setBoolValue(0); |
| 59 |
} |
| 60 |
</script> |
| 61 |
</binding> |
| 62 |
</radio> |
| 63 |
|
| 64 |
<radio> |
| 65 |
<halign>left</halign> |
| 66 |
<label>Break Formation</label> |
| 67 |
<property>/sim/ai/models/wingman/controls/break</property> |
| 68 |
<live>true</live> |
| 69 |
<binding> |
| 70 |
<command>dialog-apply</command> |
| 71 |
</binding> |
| 72 |
<binding> |
| 73 |
<command>nasal</command> |
| 74 |
<script> |
| 75 |
var v = getprop("/sim/ai/models/wingman/controls/break"); |
| 76 |
setprop("/sim/ai/models/wingman/controls/formate-to-ac",0); |
| 77 |
setprop("/sim/ai/models/wingman/controls/join",0); |
| 78 |
|
| 79 |
foreach (var c; props.globals.getNode("/ai/models").getChildren("wingman")){ |
| 80 |
c.getNode("controls/break").setBoolValue(v); |
| 81 |
c.getNode("controls/formate-to-ac").setBoolValue(0); |
| 82 |
c.getNode("controls/join").setBoolValue(0); |
| 83 |
} |
| 84 |
</script> |
| 85 |
</binding> |
| 86 |
</radio> |
| 87 |
|
| 88 |
<radio> |
| 89 |
<halign>left</halign> |
| 90 |
<label>Join</label> |
| 91 |
<property>/sim/ai/models/wingman/controls/join</property> |
| 92 |
<live>true</live> |
| 93 |
<binding> |
| 94 |
<command>dialog-apply</command> |
| 95 |
</binding> |
| 96 |
<binding> |
| 97 |
<command>nasal</command> |
| 98 |
<script> |
| 99 |
var v = getprop("/sim/ai/models/wingman/controls/join"); |
| 100 |
setprop("/sim/ai/models/wingman/controls/formate-to-ac",0); |
| 101 |
setprop("/sim/ai/models/wingman/controls/break",0); |
| 102 |
|
| 103 |
foreach (var c; props.globals.getNode("/ai/models").getChildren("wingman")){ |
| 104 |
c.getNode("controls/join").setBoolValue(v); |
| 105 |
c.getNode("controls/break").setBoolValue(0); |
| 106 |
c.getNode("controls/formate-to-ac").setBoolValue(0); |
| 107 |
} |
| 108 |
</script> |
| 109 |
</binding> |
| 110 |
</radio> |
| 111 |
|
| 112 |
</group> |
| 113 |
|
| 114 |
<group> |
| 115 |
<layout>vbox</layout> |
| 116 |
|
| 117 |
<text> |
| 118 |
<halign>left</halign> |
| 119 |
<label>Break Heading Degrees Relative</label> |
| 120 |
</text> |
| 121 |
|
| 122 |
<text> |
| 123 |
<label>Left/Right</label> |
| 124 |
</text> |
| 125 |
|
| 126 |
<group> |
| 127 |
<layout>hbox</layout> |
| 128 |
<text> |
| 129 |
<halign>left</halign> |
| 130 |
<label>-180</label> |
| 131 |
</text> |
| 132 |
<slider> |
| 133 |
<width>75</width> |
| 134 |
<height>25</height> |
| 135 |
<min>-180</min> |
| 136 |
<max>180</max> |
| 137 |
<property>/ai/models/wingman/controls/break-deg-rel</property> |
| 138 |
<binding> |
| 139 |
<command>dialog-apply</command> |
| 140 |
</binding> |
| 141 |
<binding> |
| 142 |
<command>nasal</command> |
| 143 |
<script> |
| 144 |
var v = getprop("/ai/models/wingman/controls/break-deg-rel"); |
| 145 |
foreach (var c; props.globals.getNode("/ai/models").getChildren("wingman")){ |
| 146 |
print("FFF ", v, " ", c.getNode("name").getValue()); |
| 147 |
c.getNode("controls/break-deg-rel",1).setDoubleValue(v); |
| 148 |
} |
| 149 |
</script> |
| 150 |
</binding> |
| 151 |
</slider> |
| 152 |
<text> |
| 153 |
<halign>left</halign> |
| 154 |
|
| 155 |
<label>180</label> |
| 156 |
|
| 157 |
</text> |
| 158 |
</group> |
| 159 |
|
| 160 |
<text> |
| 161 |
<label>-100.00</label> |
| 162 |
<format>%-0.1f deg</format> |
| 163 |
<live>true</live> |
| 164 |
<property>/ai/models/wingman/controls/break-deg-rel</property> |
| 165 |
</text> |
| 166 |
|
| 167 |
</group> |
| 168 |
|
| 169 |
</group> |
| 170 |
|
| 171 |
<group> |
| 172 |
<layout>hbox</layout> |
| 173 |
|
| 174 |
<text> |
| 175 |
<halign>left</halign> |
| 176 |
<label>Target Heading Degrees True</label> |
| 177 |
</text> |
| 178 |
|
| 179 |
<text> |
| 180 |
<halign>left</halign> |
| 181 |
<label>-100.00</label> |
| 182 |
<format>%-0.1f deg</format> |
| 183 |
<live>true</live> |
| 184 |
<property>/ai/models/wingman/controls/tgt-heading-deg</property> |
| 185 |
</text> |
| 186 |
</group> |
| 187 |
|
| 188 |
<group> |
| 189 |
<layout>hbox</layout> |
| 190 |
|
| 191 |
<text> |
| 192 |
<halign>left</halign> |
| 193 |
<label>Set Formation</label> |
| 194 |
</text> |
| 195 |
|
| 196 |
<button> |
| 197 |
<x>40</x> |
| 198 |
<y>10</y> |
| 199 |
<legend>Open/Close</legend> |
| 200 |
<binding> |
| 201 |
<command>nasal</command> |
| 202 |
<script>formation.formation_dialog.toggle()</script> |
| 203 |
</binding> |
| 204 |
</button> |
| 205 |
|
| 206 |
</group> |
| 207 |
|
| 208 |
<hrule/> |
| 209 |
|
| 210 |
<group> |
| 211 |
<layout>hbox</layout> |
| 212 |
<default-padding>6</default-padding> |
| 213 |
<empty> |
| 214 |
<stretch>true</stretch> |
| 215 |
</empty> |
| 216 |
|
| 217 |
<button> |
| 218 |
<legend>OK</legend> |
| 219 |
<default>true</default> |
| 220 |
<equal>true</equal> |
| 221 |
<binding> |
| 222 |
<command>dialog-apply</command> |
| 223 |
</binding> |
| 224 |
<binding> |
| 225 |
<command>dialog-close</command> |
| 226 |
</binding> |
| 227 |
</button> |
| 228 |
|
| 229 |
<button> |
| 230 |
<legend>Apply</legend> |
| 231 |
<equal>true</equal> |
| 232 |
<binding> |
| 233 |
<command>dialog-apply</command> |
| 234 |
</binding> |
| 235 |
</button> |
| 236 |
|
| 237 |
<button> |
| 238 |
<legend>Reset</legend> |
| 239 |
<equal>true</equal> |
| 240 |
<binding> |
| 241 |
<command>dialog-update</command> |
| 242 |
</binding> |
| 243 |
</button> |
| 244 |
|
| 245 |
<button> |
| 246 |
<legend>Cancel</legend> |
| 247 |
<equal>true</equal> |
| 248 |
<key>Esc</key> |
| 249 |
<binding> |
| 250 |
<command>dialog-close</command> |
| 251 |
</binding> |
| 252 |
</button> |
| 253 |
|
| 254 |
<empty> |
| 255 |
<stretch>true</stretch> |
| 256 |
</empty> |
| 257 |
</group> |
| 258 |
</PropertyList> |