- we prefer hyphens in property names to underscores
- save /sim/multiplayer/chat-display to autosave.xml - remove trailing spaces
This commit is contained in:
parent
0561fc2e1f
commit
e092ee9abc
5 changed files with 26 additions and 25 deletions
|
@ -46,7 +46,7 @@ echo_message = func(msg, callsign)
|
||||||
msg = callsign ~ ": " ~ msg;
|
msg = callsign ~ ": " ~ msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
var ldisplay = getprop("/sim/multiplay/chat_display");
|
var ldisplay = getprop("/sim/multiplay/chat-display");
|
||||||
|
|
||||||
if ((ldisplay != nil) and (ldisplay == "1"))
|
if ((ldisplay != nil) and (ldisplay == "1"))
|
||||||
{
|
{
|
||||||
|
@ -55,11 +55,11 @@ echo_message = func(msg, callsign)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add the chat to the chat history.
|
# Add the chat to the chat history.
|
||||||
var lchat = getprop("/sim/multiplay/chat_history");
|
var lchat = getprop("/sim/multiplay/chat-history");
|
||||||
|
|
||||||
if (lchat == nil)
|
if (lchat == nil)
|
||||||
{
|
{
|
||||||
setprop("/sim/multiplay/chat_history", msg);
|
setprop("/sim/multiplay/chat-history", msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -68,7 +68,7 @@ echo_message = func(msg, callsign)
|
||||||
lchat = lchat ~ "\n";
|
lchat = lchat ~ "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
setprop("/sim/multiplay/chat_history", lchat ~ msg);
|
setprop("/sim/multiplay/chat-history", lchat ~ msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<stretch>true</stretch>
|
<stretch>true</stretch>
|
||||||
<halign>fill</halign>
|
<halign>fill</halign>
|
||||||
<length>50</length>
|
<length>50</length>
|
||||||
<property>/sim/multiplay/chat_compose</property>
|
<property>/sim/multiplay/chat-compose</property>
|
||||||
</input>
|
</input>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
|
@ -27,11 +27,11 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var lchat = getprop("/sim/multiplay/chat_compose");
|
var lchat = getprop("/sim/multiplay/chat-compose");
|
||||||
if (lchat != "")
|
if (lchat != "")
|
||||||
{
|
{
|
||||||
setprop("/sim/multiplay/chat", lchat);
|
setprop("/sim/multiplay/chat", lchat);
|
||||||
setprop("/sim/multiplay/chat_compose", "");
|
setprop("/sim/multiplay/chat-compose", "");
|
||||||
fgcommand("dialog-update", props.Node.new({"object-name": "compose",
|
fgcommand("dialog-update", props.Node.new({"object-name": "compose",
|
||||||
"dialog-name": "chat"}));
|
"dialog-name": "chat"}));
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-show</command>
|
<command>dialog-show</command>
|
||||||
<dialog-name>chat_full</dialog-name>
|
<dialog-name>chat-full</dialog-name>
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-close</command>
|
<command>dialog-close</command>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>chat_full</name>
|
<name>chat-full</name>
|
||||||
<modal>false</modal>
|
<modal>false</modal>
|
||||||
<layout>vbox</layout>
|
<layout>vbox</layout>
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
<wrap>true</wrap>
|
<wrap>true</wrap>
|
||||||
<editable>false</editable>
|
<editable>false</editable>
|
||||||
<property>/sim/multiplay/chat_history</property>
|
<property>/sim/multiplay/chat-history</property>
|
||||||
</textbox>
|
</textbox>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<halign>fill</halign>
|
<halign>fill</halign>
|
||||||
<length>50</length>
|
<length>50</length>
|
||||||
<pref-width>500</pref-width>
|
<pref-width>500</pref-width>
|
||||||
<property>/sim/multiplay/chat_compose</property>
|
<property>/sim/multiplay/chat-compose</property>
|
||||||
</input>
|
</input>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
|
@ -48,13 +48,13 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var lchat = getprop("/sim/multiplay/chat_compose");
|
var lchat = getprop("/sim/multiplay/chat-compose");
|
||||||
if (lchat != "")
|
if (lchat != "")
|
||||||
{
|
{
|
||||||
setprop("/sim/multiplay/chat", lchat);
|
setprop("/sim/multiplay/chat", lchat);
|
||||||
setprop("/sim/multiplay/chat_compose", "");
|
setprop("/sim/multiplay/chat-compose", "");
|
||||||
fgcommand("dialog-update", props.Node.new({"object-name": "compose",
|
fgcommand("dialog-update", props.Node.new({"object-name": "compose",
|
||||||
"dialog-name": "chat_full"}));
|
"dialog-name": "chat-full"}));
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<checkbox>
|
<checkbox>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
<label>Show chat messages</label>
|
<label>Show chat messages</label>
|
||||||
<property>/sim/multiplay/chat_display</property>
|
<property>/sim/multiplay/chat-display</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
|
@ -464,6 +464,7 @@ Started September 2000 by David Megginson, david@megginson.com
|
||||||
<multiplay>
|
<multiplay>
|
||||||
<chat type="string">Hello</chat>
|
<chat type="string">Hello</chat>
|
||||||
<transmission-freq-hz type="string">118500000</transmission-freq-hz>
|
<transmission-freq-hz type="string">118500000</transmission-freq-hz>
|
||||||
|
<chat-display type="bool" userarchive="y">true</chat-display>
|
||||||
</multiplay>
|
</multiplay>
|
||||||
|
|
||||||
<user>
|
<user>
|
||||||
|
|
Loading…
Add table
Reference in a new issue