Packages
 Input
 Module
 User
 DB
 Interface

Objects
 bitmapwidget
 databasenode
 dragdata
 textwidget
 tokeninstance
 widget
 widgetcontainer

Elements
 buttoncontrol
 categoryselectioncontrol
 chatentry
 chatwindow
 databasecontrol
 diecontrol
 diefield
 genericcontrol
 imagecontrol
 numbercontrol
 numberfield
 portraitselectioncontrol
 script
 scrollercontrol
 stringcontrol
 stringfield
 subwindow
 textbasecontrol
 tokenbag
 tokencontrol
 tokenfield
 windowclass
 windowcontrol
 windowinstance
 windowlist
 windowreferencecontrol
 windowreferencefield

Components
 categoryselectionsettings
 customdie
 die
 font
 framedef
 desktopframe
 hotkeybar
 icon
 imageupdatefolder
 importinfo
 includefile
 panel
 portraitset
 template
 tokenroot
 tooltip
onDeliverMessage
onSlashCommand



Inherits windowcontrol
Context windowinstance

This control defines the main chat entry control. The recommended location for it is in a desktop panel. Only one instance of the control can exist, attempts to create more than one will fail.

Slash commands, i.e. chat entries that start with the "/" character and a single command word immediately following, can be registered for special handling. Slash command handlers will receive one parameter, a string containing the remainder of the chat line following the command that can be used to issue parameters. Built in slash commands will precede any handlers defined.

Information about events is passed to and from the script event handlers (described below) in a table. The fields in this table are:

text: The text content of the message

sender: The string identifying the sender of the message

mood: Set only if a mood is specified, containing the contents of the mood string

font: Set only if the message uses a font different from the default setting, containing the font resource name

icon: Set only if the message contains an icon drawn at the beginning of the message, containing the icon resource name for the desired icon



Definition

<chatentry >
<chatwindow > ... </chatwindow> The name of the chatwindow receiving messages from this element
<state > Details for the chat state indicator
<position > ... </position> The position of the indicator relative to the application window
<speak > ... </speak> The icon used for speak messages
<story > ... </story> The icon used for story messages
<action > ... </action> The icon used for action messages
<emote > ... </emote> The icon used for emote messages
<ooc > ... </ooc> The icon used for ooc messages
</state>
</chatentry>


Interface

onDeliverMessage

event function onDeliverMessage( messagedata, mode )

If present, this function is called whenever the user sends a chat message (other than a slash command) using the control.

The function is given data about the chat entry. The entry may be modified and returned as such, or the function may override the processing of the entry.

Parameters

messagedata   (table)   
A table containing information about the message. See the chatentry description for details.
mode   (string)   
Specifies the mode used to send the message. One of the values "chat", "ooc", "act", "emote" or "story".

Return values

(...)
A boolean value of true indicates that the framework should process the message as is, false that the message should not be processed. A table value will be treated as the message data substituted in place of the data given as a parameter.

onSlashCommand

handler function onSlashCommand( command, parameterstring )

Called when the user submits chat messages starting with a slash ("/") character. Built in slash commands will precede any specified using this function.

Parameters

command   (string)   
The string containing the slash command, including the leading slash character.
parameterstring   (string)   
The unparsed string following the slash command, as present in the user input


'Fantasy Grounds' is a trademark of SmiteWorks Ltd.
'd20 System' and the d20 System logo are trademarks of Wizards of the Coast, Inc. in the United States and other countries and are used with permission.
© 2004-2008 SmiteWorks Ltd. ALL RIGHTS RESERVED.
Privacy policy