Add Formation Selector
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
This commit is contained in:
parent
996a5a94ee
commit
b020b3e0d1
1 changed files with 42 additions and 29 deletions
|
@ -119,32 +119,32 @@
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
<label>-180</label>
|
<label>-180</label>
|
||||||
</text>
|
</text>
|
||||||
<slider>
|
<slider>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>25</height>
|
<height>25</height>
|
||||||
<min>-180</min>
|
<min>-180</min>
|
||||||
<max>180</max>
|
<max>180</max>
|
||||||
<property>/ai/models/wingman/controls/break-deg-rel</property>
|
<property>/ai/models/wingman/controls/break-deg-rel</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var v = getprop("/ai/models/wingman/controls/break-deg-rel");
|
var v = getprop("/ai/models/wingman/controls/break-deg-rel");
|
||||||
foreach (var c; props.globals.getNode("/ai/models").getChildren("wingman")){
|
foreach (var c; props.globals.getNode("/ai/models").getChildren("wingman")){
|
||||||
print("FFF ", v, " ", c.getNode("name").getValue());
|
print("FFF ", v, " ", c.getNode("name").getValue());
|
||||||
c.getNode("controls/break-deg-rel",1).setDoubleValue(v);
|
c.getNode("controls/break-deg-rel",1).setDoubleValue(v);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</slider>
|
</slider>
|
||||||
<text>
|
<text>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
|
|
||||||
<label>180</label>
|
<label>180</label>
|
||||||
|
|
||||||
</text>
|
</text>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
|
@ -156,15 +156,8 @@
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<layout>hbox</layout>
|
<layout>hbox</layout>
|
||||||
|
|
||||||
|
@ -182,6 +175,26 @@
|
||||||
</text>
|
</text>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<layout>hbox</layout>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>Set Formation</label>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<button>
|
||||||
|
<x>40</x>
|
||||||
|
<y>10</y>
|
||||||
|
<legend>Open/Close</legend>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>formation.formation_dialog.toggle()</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
|
||||||
<empty>
|
<empty>
|
||||||
<stretch>true</stretch>
|
<stretch>true</stretch>
|
||||||
</empty>
|
</empty>
|
||||||
|
|
Loading…
Add table
Reference in a new issue