API:LogDisplaySetFilterState
From RoR Wiki
UI Lua API · LogDisplay functions
Version: WAR 1.4.8
Shows or hides the lines of one filter type of one text log in a LogDisplay window.
LogDisplaySetFilterState(displayName, logName, filterType, enabled)
Arguments
- displayName
string– Name of a LogDisplay window.- logName
string– Name of a text log shown in the display.- filterType
number– Filter type ID. Cut to a whole number.- enabled
boolean–trueto show lines of this filter type,falseto hide them.
Returns
Nothing.
Details
- This is how chat tabs choose which channels they show. The setting belongs to the display; the text log keeps all its entries.
- If
logNameis not shown in the display, the call does nothing. - If the state changes, the display rebuilds its lines.
enabledmust be a real boolean.- The is not a TextLogDisplay message names
TextLogGetFilterState.
Errors
Error in function call 'TextLogSetFilterState': Window %s does not existError in function call 'TextLogGetFilterState': Window %s is not a TextLogDisplay
Example
From ea_guildwindow/source/guildwindowtabprofile.lua:
LogDisplayAddLog( "GWProfileNewsText", "GuildNews", true ) LogDisplaySetFilterState( "GWProfileNewsText", "GuildNews", SystemData.GuildNewsLogFilters.GENERAL, true ) LogDisplaySetFilterState( "GWProfileNewsText", "GuildNews", SystemData.GuildNewsLogFilters.ADVANCEMENTS, true )
