LibFilteredChatPanel is a library mostly intended for addon authors. It provides a movable/resizable/toggleable chat panel to display whatever (potentially spammy) messages from addons. Useful if you're like me and enjoy having a verbose log of many in-game events from but don't want your actual chat box to fill up with spam or your HUD to fill up with a bunch of different boxes.
Each created filter can be toggled on and off by the user, similar to logging levels. Users can right click on the timestamp to duplicate the line to the text field for copying. Typing in the text field and hitting ENTER will send messages to the "Player" filter, perhaps for taking notes without bothering other people?
Library Usage
It is recommended to use this library as an optional dependency and still fall back to regular chat output if the library is not enabled.
Creating a filter:
Code:
-- name - a unique name for the filter, probably your addon name
-- icon - path of the icon to use as a button in the header of the panel
-- color - default color of the text
-- showIcon - whether to prefix each line of text with your icon
local myFilter = LibFilteredChatPanel:CreateFilter("MyAddonName", "/esoui/art/champion/champion_icon.dds", {0.5, 0.8, 0.8}, false)
Printing to the filter:
Code:
-- text - the message to print
myFilter:AddMessage("Hello world!")
The "System" filter by default does not print anything on its own, but you may find it useful to put some categories of output there instead of your own filter. For example, for my own debugging purposes, I hook into CENTER_SCREEN_ANNOUNCE.QueueMessage and output the text from there to my System filter.
Code:
local systemFilter = LibFilteredChatPanel:GetSystemFilter()
Depends on: LibAddonMenu-2.0
Possibly planned features:
- Left click to copy text only (currently right click copies formatting too)
- Parameter for icon scaling