Go to Page... |
## DependsOn: LibChatMessage
local chat = LibChatMessage("MyAddon", "MA") -- long and short tag to identify who is printing the message chat:Print("Simple message") -- instead of d() chat:Printf("Formatted %s", "message") -- instead of df() chat:SetTagColor("ff0000"):Print("Message with a different tag color") -- To change the tag color for e.g. warnings. The message itself can be colored with a color tag, although I can't really recommend doing that chat:SetEnabled(false) -- in case the output of this ChatProxy should be enabled. Could be used when a settings is supposed to disable chat messages for an addon chat:Print("Ignored message") -- won't show up
/chatmessage <command> [argument] <time> [on/off] Enables or disables the time prefix <chat> [on/off] Controls the time prefix on regular chat <format> [auto/12h/24h] Changes the used time format <tag> [off/short/long] Changes the length of the used tag <history> [on/off] Restore old chat after login <age> [seconds] The maximum age of restored chat Example: /chatmessage tag short
local chat = LibChatMessage.Create(longTag, shortTag)
local chat = LibChatMessage(longTag, shortTag)
local chat = chat:SetTagColor(color)
chat:Print(message)
chat:Printf(formatString, ...)
chat:SetEnabled(enabled)
LibChatMessage:ClearChat()
LibChatMessage:ClearHistory()
LibChatMessage:GetHistory()
LibChatMessage:SetTimePrefixEnabled(enabled)
local enabled = LibChatMessage:IsTimePrefixEnabled()
LibChatMessage:SetTimePrefixEnabled(enabled)
local enabled = LibChatMessage:IsTimePrefixEnabled()
LibChatMessage:SetTimePrefixFormat(format)
local format = LibChatMessage:GetTimePrefixFormat()
LibChatMessage:SetTagPrefixMode(mode)
local mode = LibChatMessage:GetTagPrefixMode()
LibChatMessage:SetChatHistoryEnabled(enabled)
local enabled = LibChatMessage:IsChatHistoryEnabled()
local enabled = LibChatMessage:IsChatHistoryActive()
LibChatMessage:SetChatHistoryMaxAge(maxAge)
local maxAge = LibChatMessage:GetChatHistoryMaxAge()
LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE) LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE, reformatLinkFunc)
local function reformatLink(linkStyle, linkType, data, displayText) return ZO_LinkHandler_CreateLinkWithFormat(displayText, nil, linkType, linkStyle, data) end LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE, reformatLink)
function addon:OnLinkClicked(link, button, text, color, linkType, ...) if linkType ~= YOUR_LINK_TYPE then return end if button == MOUSE_BUTTON_INDEX_LEFT then -- Do your stuff elseif button == MOUSE_BUTTON_INDEX_MIDDLE then -- Do your stuff end return true -- link has been handled end function addon:InitLinkHandler() LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_CLICKED_EVENT, self.OnLinkClicked, self) LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_MOUSE_UP_EVENT, self.OnLinkClicked, self) end
File Name |
Version |
Size |
Uploader |
Date |
1.2.0 |
10kB |
sirinsidiator |
04/22/21 01:33 PM |
|
1.1.3 |
5kB |
sirinsidiator |
03/02/20 01:26 PM |
|
1.1.2 |
5kB |
sirinsidiator |
03/02/20 12:10 PM |
|
1.1.1 |
6kB |
sirinsidiator |
02/25/20 01:55 PM |
|
1.1.0 |
6kB |
sirinsidiator |
02/24/20 02:43 AM |
|
1.0.1 |
5kB |
sirinsidiator |
06/01/19 05:15 AM |
|
1.0.0 |
5kB |
sirinsidiator |
05/28/19 09:18 AM |
Comment Options |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
01/26/22, 02:01 PM | |
|
Version variable
Hey, it would be nice if there was a variable that returns the version of the lib.
Im using it for custom links in Wizard's Wardrobe and people with a old version of this lib get UI errors (obviously). This way I could check if its 1.2.0 or newer and tell them to update. Edit: Nvm, a simple way would be to check function RegisterCustomChatLink() exists. lul
Last edited by ownedbynico : 01/26/22 at 02:09 PM.
|
|
ownedbynico |
View Public Profile |
Send a private message to ownedbynico |
Find More Posts by ownedbynico |
Add ownedbynico to Your Buddy List |
01/26/22, 03:17 PM | ||
Re: Version variable
Code:
## DependsOn: LibChatMessage>=105 |
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
01/26/22, 03:26 PM | |||
|
Re: Re: Version variable
Edit: I was once too fast typing. Just saw there are two different version "types". Version and AddOnVersion. Thanks for your help!
Last edited by ownedbynico : 01/26/22 at 03:29 PM.
|
||
|
ownedbynico |
View Public Profile |
Send a private message to ownedbynico |
Find More Posts by ownedbynico |
Add ownedbynico to Your Buddy List |
10/29/22, 12:51 PM | |
Forum posts: 0
File comments: 1
Uploads: 0
|
Option to block all chat output
Hi, would it be possible to add an option for the player to block all chat messages passed through this lib?
The reason why I am asking for this is as follows: I would like my UI to be as immersive as possible and seeing how there is no way to completely hide the chat window, I usually just let it fade into transparency. However, as you might guess, everytime one of my addon posts a new chat message, the chat window becomes visible again. |
|
stifu |
View Public Profile |
Send a private message to stifu |
Find More Posts by stifu |
Add stifu to Your Buddy List |
03/22/24, 06:12 PM | |
Forum posts: 5
File comments: 25
Uploads: 0
|
v1.2.1 release, change log references it as v1.2.0.
|
|
Jysoul |
View Public Profile |
Send a private message to Jysoul |
Find More Posts by Jysoul |
Add Jysoul to Your Buddy List |
03/22/24, 06:28 PM | ||
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.