1
0
Fork 0

Merge branch 'master' of gitorious.org:fg/fgdata

This commit is contained in:
Frederic Bouvier 2012-01-04 12:59:07 +01:00
commit 31c20892ab
3 changed files with 92 additions and 16 deletions

View file

@ -8,6 +8,15 @@
<z-m> -0.065 </z-m> <z-m> -0.065 </z-m>
</offsets> </offsets>
<nasal>
<load>
var rplayer = cmdarg();
rplayer.getNode("sim/model/door-positions/rightDoor/position-norm", 1).alias(rplayer.getNode("sim/multiplay/generic/float[0]"));
rplayer.getNode("sim/model/door-positions/leftDoor/position-norm", 1).alias(rplayer.getNode("sim/multiplay/generic/float[1]"));
rplayer.getNode("sim/model/door-positions/baggageDoor/position-norm", 1).alias(rplayer.getNode("sim/multiplay/generic/float[2]"));
</load>
</nasal>
<!-- Normal shader effect. Separate effects required for each normal map texture --> <!-- Normal shader effect. Separate effects required for each normal map texture -->
<effect> <effect>

View file

@ -100,6 +100,9 @@ Started October 23 2001 by John Check, fgpanels@rockfish.net
<multiplay> <multiplay>
<chat_display>1</chat_display> <chat_display>1</chat_display>
<generic> <generic>
<float n="0" alias="/sim/model/door-positions/rightDoor/position-norm"/>
<float n="1" alias="/sim/model/door-positions/leftDoor/position-norm"/>
<float n="2" alias="/sim/model/door-positions/baggageDoor/position-norm"/>
<int type="int">0</int> <int type="int">0</int>
<int type="int">0</int> <int type="int">0</int>
<int type="int">0</int> <int type="int">0</int>

View file

@ -4,10 +4,23 @@
<PropertyList> <PropertyList>
<name>multiplayer</name> <name>multiplayer</name>
<layout>vbox</layout> <layout>vbox</layout>
<resizable>true</resizable> <resizable>false</resizable>
<nasal> <nasal>
<open> <open>
if ((getprop("/sim/multiplay/selected-server") == nil) or
(getprop("/sim/multiplay/selected-server") == "" ) ){
var tx = getprop("/sim/multiplay/txhost");
var dlg = cmdarg();
var servers = cmdarg().getChildren("group")[1].getChildren("combo")[0].getChildren("value");
foreach (var s; servers) {
var server = s.getValue();
var host = split(" ", server)[0];
if (host == tx) {
setprop("/sim/multiplay/selected-server", server);
}
}
}
</open> </open>
<close> <close>
@ -50,6 +63,7 @@
</text> </text>
<input> <input>
<row>0</row><col>1</col> <row>0</row><col>1</col>
<halign>left</halign>
<property>/sim/multiplay/callsign</property> <property>/sim/multiplay/callsign</property>
</input> </input>
<text> <text>
@ -60,23 +74,31 @@
<combo> <combo>
<name>host</name> <name>host</name>
<row>1</row><col>1</col> <row>1</row><col>1</col>
<pref-width>120</pref-width> <pref-width>350</pref-width>
<property>/sim/multiplay/txhost</property> <property>/sim/multiplay/selected-server</property>
<editable>true</editable> <editable>false</editable>
<properties>/sim/multiplay/servers</properties> <value>mpserver01.flightgear.org (Frankfurt, Germany)</value>
<value>mpserver02.flightgear.org (Kansas, USA)</value>
<value>mpserver03.flightgear.org (Germany)</value>
<value>mpserver04.flightgear.org (United Kingdom)</value>
<value>mpserver05.flightgear.org (Chicago, USA)</value>
<value>mpserver07.flightgear.org (Wisconsin, USA)</value>
<value>mpserver08.flightgear.org (Frankfurt am Main, Germany)</value>
<value>mpserver09.flightgear.org (Koln, Germany)</value>
<value>mpserver10.flightgear.org (Montpellier, France)</value>
<value>mpserver11.flightgear.org (Vilnius, Lithuania)</value>
<value>mpserver12.flightgear.org (Amsterdam, Netherlands)</value>
<value>mpserver13.flightgear.org (Grenoble, France)</value>
</combo> </combo>
<input>
<row>1</row><col>2</col>
<property>/sim/multiplay/txport</property>
</input>
<!-- status area --> <!-- status area -->
<text> <text>
<visible> <visible>
<not><property>/sim/multiplay/online</property></not> <not><property>/sim/multiplay/online</property></not>
</visible> </visible>
<row>2</row> <row>3</row>
<col>1</col> <col>1</col>
<halign>left</halign>
<label>Not connected</label> <label>Not connected</label>
</text> </text>
@ -84,9 +106,9 @@
<visible> <visible>
<property>/sim/multiplay/online</property> <property>/sim/multiplay/online</property>
</visible> </visible>
<row>2</row> <row>3</row>
<col>1</col> <col>1</col>
<halign>left</halign>
<label>MMMMMMMMMMMMMMMMM</label> <label>MMMMMMMMMMMMMMMMM</label>
<format>Connected to %s</format> <format>Connected to %s</format>
<property>/sim/multiplay/txhost</property> <property>/sim/multiplay/txhost</property>
@ -94,23 +116,65 @@
</text> </text>
</group> </group>
<hrule/>
<group> <group>
<layout>hbox</layout> <layout>hbox</layout>
<default-padding>10</default-padding> <default-padding>10</default-padding>
<empty><stretch>true</stretch></empty> <empty><stretch>true</stretch></empty>
<button> <button>
<legend>Apply</legend> <legend>Connect</legend>
<default>true</default> <enable>
<equal>true</equal> <not>
<property>/sim/multiplay/online</property>
</not>
</enable>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding>
<command>nasal</command>
<script>
var server = getprop("/sim/multiplay/selected-server");
# Get the server name by splitting on the space between
# the hostname and the comment.
server = split(" ", server)[0];
setprop("/sim/multiplay/txhost", server);
</script>
</binding>
<binding> <binding>
<command>reinit</command> <command>reinit</command>
<subsystem>mp</subsystem> <subsystem>mp</subsystem>
</binding> </binding>
</button> </button>
<button>
<legend>Disconnect</legend>
<enable>
<property>/sim/multiplay/online</property>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("/sim/multiplay/txhost", "0.0.0.0");
</script>
</binding>
<binding>
<command>reinit</command>
<subsystem>mp</subsystem>
</binding>
</button>
<button>
<legend>Close</legend>
<equal>true</equal>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
</group> </group>
</PropertyList> </PropertyList>