API:TextLogGetFilterEnabled
From RoR Wiki
UI Lua API · TextLog functions
Version: WAR 1.4.8
Returns whether one filter type of a text log is turned on.
enabled = TextLogGetFilterEnabled(logName, filterType)
Arguments
- logName
string– Name of the text log.- filterType
number– A filter type registered with TextLogAddFilterType. Fractions are dropped.
Returns
- enabled
boolean– The flag set by TextLogSetFilterEnabled.
Details
- If the log does not exist, the error is logged and nothing is returned.
- The function needs at least two arguments and only reads the last two.
Errors
This is written to the UI log; the call returns normally.
Error in function call 'TextLogGetFilterEnabled': Text Log %s does not exist
Example
From ea_uidebugtools/source/debugwindow.lua:
-- Filters for filterType, filterData in pairs( DebugWindow.Settings.LogFilters ) do filterData.enabled = TextLogGetFilterEnabled( "UiLog", filterType) end
