LibFilter - Filtering for you!
Current Author: instant (instant0@gmail.com)
Version: Release 1.0 beta (2008-11-21)
Website: http://www.bod-guild.com
-------------------------------------------------------------------------
What is LibFilter:
LibFilter is a library that addon authors can utilize to create custom
filters to use for sending chat messages to the client.
By using a custom filter, you have the option to pick the colour and
what tab to display the text in, and you also give the user customization
options(*) to decide him/herself where they want the text to be displayed,
and how it should look.
-------------------
How does it work:
-------------------
LibFilters adds the supplied information (supplied by developer using the library) to the ingame chat filtering database.
This is done through the following code:
LibFilter.AddCustomFilter(UNIQUEID, FRIENDLYNAME, TAB, R, G, B)
Example:
LibFilter.AddCustomFilter(1234, "Addons", 1, 255, 190, 0)
The formatting is as follows:
- UNIQUE ID, FRIENDLY NAME, CHAT TAB, RED, GREEN, BLUE
- UNIQUE ID for the chat text. This is the "ID" you will send text to using for example:
local outp = "Hello World, Hei og Hopp";
TextLogAddEntry("Chat", 1234 , StringToWString(outp));
As you see we use the value '1234' in TextLogAddEntry, the same as our UNIQUE ID above. This can easily be replaced with a variable you define at the start of your project.
The "Chat" text needs to be supplied. StringToWString is optionable, depending on the text/values you are printing out.
- FRIENDLY NAME is the name the user will see in his filtering/colouring options
- CHAT TAB is the chat tab the text is to be output to. Currently the Library removes filtering for all other chat tabs for the specified ID. By Default, Chat is 1, Combat is 2, etc.
- RED, GREEN, BLUE are the RGB values from 0-255 for each colour value. The source code for LibFilter contains a small list of some of the most used colours.
------------------
KNOWN LIMITATIONS
------------------
* This library does not remember the user settings between each session
(nor does the game for that matter)
* This library will only add the chat text to 1 channel, unless the user selects more (which of course, the settings will be reset upon CTD/Logou/Reloadui)
------------------
THANK YOUS
------------------
- WAR Addon Community
- WARDIFF at http://code.google.com/p/wardiff/
- 1 comment
- 1 comment
Facts
- Date created
- 21 Nov 2008
- Categories
- Last update
- 21 Nov 2008
- Development stage
- Inactive
- Language
- enUS
- License
- Public Domain
- Curse link
- LibFilter
- Recent file
- R: LibFilter v1.0 beta for Beta 3.0 on 21 Nov 2008
- #1
instant Fri, 21 Nov 2008 04:08:34Next version will HOPEFULLY save the user settings and reload these upon launch. Just need to figure out how to do it -- + have time to do it.