Hi All, I now have a working chat menu system, which will generate canned chat messages by using a simple menu system, access by the numbers on your keyboard. The canned messages are somewhat dynamic, in that they pick up the current airport, and your own callsign and altitude.
You will need to pick up the tarball from http://www.nanjika.co.uk/flightgear/chatmenu.tar.gz. This contains the following files: - multiplayer.nas to put in your Nasal directory (this is updated from my previous patch) - chat-menu.xml to put in your gui/dialogs directory. - chat-menu-entries.xml to put in your ATC directory. In addition, you will need to do the following: - Apply the keyboard.xml patch below. This maps "-" to open the chat menu and "_" to open free-form chat using the simply chat widget I created earlier. - Edit your preferences.xml file to pick up the chat-menu-entries.xml file under /sim/multiplay. As we all have much modified preferences, this is probably best shown by example rather than patch: <multiplay> <chat type="string">Hello</chat> <transmission-freq-hz type="string">118500000</transmission-freq-hz> <chat-display type="bool" userarchive="y">true</chat-display> <chat-menu include="ATC/chat-menu-entries.xml"/> </multiplay> I.e. you need to add a line <chat-menu include="ATC/chat-menu-entries.xml"/> within the <multiplay> section. To use, simply press "-" to open the menu - you will see a set of numbered options. They can be accessed using the obvious numeric key assignments. Some of the options open sub-menus, and you can navigate backwards using "0", or press "1" to immediately open the chat widget with the current message. As always, you can modify the menu tree to include your favourite messages, simply by editing the ATC/chat-menu-entries.xml file. The one I've created is very much a starting point, and submissions/improvements are most welcome. We may need to standardize on an FG phraseology, due to the differences in ATC phraseology across the globe. The number of subsitutions available within the messages is very limited, and the message parser also very simple. There is quite a bit of room for improvement in this regard. For example, it would be nice to substitute in a guess of the current runway in use. Assuming this passes muster, if someone could commit it, I'd be grateful. Comments as always are welcome. -Stuart Index: keyboard.xml =================================================================== RCS file: /var/cvs/FlightGear-0.9/data/keyboard.xml,v retrieving revision 1.101 diff -u -r1.101 keyboard.xml --- keyboard.xml 13 Nov 2007 14:42:44 -0000 1.101 +++ keyboard.xml 23 Nov 2007 00:58:21 -0000 @@ -354,7 +354,17 @@ </mod-up> </key> - <key n="46"> + <key n="45"> + <name>-</name> + <repeatable type="bool">false</repeatable> + <desc>Compose Chat</desc> + <binding> + <command>dialog-show</command> + <dialog-name>chat-menu</dialog-name> + </binding> + </key> + + <key n="46"> <name>.</name> <desc>Right brake</desc> <binding> @@ -754,6 +764,16 @@ </mod-up> </key> + <key n="95"> + <name>_</name> + <repeatable type="bool">false</repeatable> + <desc>Compose Chat</desc> + <binding> + <command>nasal</command> + <script>multiplayer.compose_message()</script> + </binding> + </key> + <key n="97"> <name>a</name> <desc>Increase speed-up.</desc> ___________________________________________________________ Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel