API:LogDisplayGetFilterState
From RoR Wiki
UI Lua API · LogDisplay functions
Version: WAR 1.4.8
Returns whether a LogDisplay window shows the lines of one filter type of one text log.
enabled = LogDisplayGetFilterState(displayName, logName, filterType)
Arguments
- displayName
string– Name of a LogDisplay window.- logName
string– Name of a text log.- filterType
number– Filter type ID. Cut to a whole number.
Returns
- enabled
boolean– The value set by LogDisplaySetFilterState.
Details
- If
logNameis not shown in the display, the result isfalse.
Errors
Error in function call 'TextLogGetFilterState': Window %s does not existError in function call 'TextLogGetFilterState': Window %s is not a TextLogDisplay
Example
Copying a chat tab's filters, from ea_chatwindow/source/chatwindow.lua:
for channelId, channelData in pairs(ChatSettings.Channels) do
local enabled = LogDisplayGetFilterState( tabLogDisplayName, channelData.logName, channelId )
EA_ChatWindowGroups[wndGroupId].Tabs[newTabId].Filters[ channelId ] = enabled
end
