1
0
Fork 0

Merge gitorious.org:fg/fgdata

This commit is contained in:
Hyde Yamakawa 2013-04-02 19:17:09 -04:00
commit 8bb70f0326
3 changed files with 18 additions and 51 deletions

View file

@ -677,8 +677,8 @@
<command>property-adjust</command> <command>property-adjust</command>
<property alias="../../../../params/nav-frq-standby"/> <property alias="../../../../params/nav-frq-standby"/>
<factor>1</factor> <factor>1</factor>
<min>118.0</min> <min>108.0</min>
<max>137.0</max> <max>118.0</max>
<wrap>true</wrap> <wrap>true</wrap>
</binding> </binding>
</action> </action>

View file

@ -676,8 +676,8 @@
<command>property-adjust</command> <command>property-adjust</command>
<property alias="../../../../params/nav-frq-standby"/> <property alias="../../../../params/nav-frq-standby"/>
<factor>1</factor> <factor>1</factor>
<min>118.0</min> <min>108.0</min>
<max>137.0</max> <max>118.0</max>
<wrap>true</wrap> <wrap>true</wrap>
</binding> </binding>
</action> </action>

View file

@ -61,24 +61,10 @@
</binding> </binding>
</checkbox> </checkbox>
<checkbox>
<halign>left</halign>
<label>Enable AI scenarios (requires restart)</label>
<name>enable-ai-scenarios</name>
<property>/sim/ai/scenarios-enabled</property>
<binding>
<command>dialog-apply</command>
<object-name>enable-ai-scenarios</object-name>
</binding>
</checkbox>
<text><label/></text> <text><label/></text>
<text> <text>
<label>Choose active scenario(s) for the next program start</label> <label>Choose active scenario(s) </label>
<enable>
<property>/sim/ai/scenarios-enabled</property>
</enable>
</text> </text>
<hrule/> <hrule/>
@ -105,23 +91,7 @@
<halign>center</halign> <halign>center</halign>
<button> <button>
<legend>OK</legend> <legend>Close</legend>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>apply()</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<legend>Cancel</legend>
<equal>true</equal>
<key>Esc</key> <key>Esc</key>
<binding> <binding>
<command>dialog-close</command> <command>dialog-close</command>
@ -165,24 +135,21 @@
var label = string.replace(file, "_", " "); var label = string.replace(file, "_", " ");
if (nameN != nil) if (nameN != nil)
label = nameN.getValue(); label = nameN.getValue();
cb.getNode("label",1).setValue(label); cb.getNode("label",1).setValue(label);
cb.getNode("name",1).setValue(file); cb.getNode("name",1).setValue(file);
cb.getNode("enable/property",1).setValue("/sim/ai/scenarios-enabled");
group.getNode("empty",1).getNode("stretch",1).setValue("true");
}
var apply = func { var applyBind = cb.addChild("binding", 0);
var targetRoot = props.globals.getNode("sim/ai",1); applyBind.getNode("command", 1).setValue("dialog-apply");
targetRoot.removeChildren("scenario");
var i = 0; var bind = cb.addChild("binding", 1);
foreach( var src; props.globals.getNode("sim/gui/dialogs/scenario",1).getChildren( "scenario" ) ) { bind.getNode("command", 1).setValue("load-scenario");
if( src.getNode("selected",1).getValue() ) { bind.getNode("name", 1).setValue(file);
var scnNode = targetRoot.getChild("scenario", i, 1 ); bind.getNode("load-property", 1).setValue(propertyRoot.getNode("selected").getPath());
scnNode.setAttribute("userarchive",1);
scnNode.setValue( src.getNode("name",1).getValue() ); #cb.getNode("enable/property",1).setValue("/sim/ai/scenarios-enabled");
i+=1;
} group.getNode("empty",1).getNode("stretch",1).setValue("true");
}
} }
var path = getprop("/sim/fg-root") ~ "/AI"; var path = getprop("/sim/fg-root") ~ "/AI";