1
0
Fork 0
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
This commit is contained in:
Vivian Meazza 2012-07-04 20:44:25 +01:00
parent 2a505cd29e
commit 85d64deb04

View file

@ -10,13 +10,17 @@
<group> <group>
<layout>hbox</layout> <layout>hbox</layout>
<empty><stretch>1</stretch></empty> <empty>
<stretch>1</stretch>
</empty>
<text> <text>
<label>AI Carrier Controls</label> <label>AI Carrier Controls</label>
</text> </text>
<empty><stretch>1</stretch></empty> <empty>
<stretch>1</stretch>
</empty>
<button> <button>
<pref-width>16</pref-width> <pref-width>16</pref-width>
@ -166,12 +170,19 @@
<width>75</width> <width>75</width>
<height>25</height> <height>25</height>
<property>/ai/models/carrier/controls/lighting/flood-lights-red-norm</property> <property>/ai/models/carrier/controls/lighting/flood-lights-red-norm</property>
<binding>
<command>dialog-apply</command>
</binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
print("get red light");
var v = getprop("/ai/models/carrier/controls/lighting/flood-lights-red-norm"); var v = getprop("/ai/models/carrier/controls/lighting/flood-lights-red-norm");
foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")) foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier"))
{
c.getNode("controls/lighting/flood-lights-red-norm",1).setDoubleValue(v); c.getNode("controls/lighting/flood-lights-red-norm",1).setDoubleValue(v);
print("set red light", v);
}
</script> </script>
</binding> </binding>
</slider> </slider>