API:LogDisplayAddLog
From RoR Wiki
UI Lua API · LogDisplay functions
Version: WAR 1.4.8
Makes a LogDisplay window show the entries of a text log.
LogDisplayAddLog(displayName, logName, showExisting)
Arguments
- displayName
string– Name of a LogDisplay window.- logName
string– Name of the text log, for example"Chat".- showExisting
boolean–trueto also show the entries already in the log. Withfalseonly entries added afterwards appear.
Returns
Nothing.
Details
- A LogDisplay can show several logs at once; the chat tabs show
"Chat","Combat"and"System"together. - The display copies the log's filter types (see TextLogAddFilterType) when the log is added. Each starts enabled and white. Set them with LogDisplaySetFilterState and LogDisplaySetFilterColor.
- When the display shows log names (LogDisplaySetShowLogName), the name appears as
[logName]. - The display keeps itself up to date: new entries in the log appear without further calls.
- If the log is already shown in this display, or the log does not exist, the call does nothing. The matching errors below are only raised while the client's
"UiLog"text log exists and is enabled; otherwise the call fails silently.
Errors
Error in function call 'TextLogDisplayAddLog': Window %s does not existError in function call 'TextLogDisplayAddLog': Window %s is not a TextLogDisplayError in function call 'TextLogDisplayAddLog': Log %s is already being displayed in %sError in function call 'TextLogDisplayAddLog': Log %s does not exist
- The last two only when
"UiLog"is enabled, see Details.
Example
From ea_chatwindow/source/chatwindow.lua:
-- add the Chat and Combat Log to the display LogDisplayAddLog( tabLogDisplayName, "Chat", true ) LogDisplayAddLog( tabLogDisplayName, "Combat", true ) LogDisplayAddLog( tabLogDisplayName, "System", true )
