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 |
03/03/20, 06:24 AM | |
Forum posts: 1
File comments: 3
Uploads: 0
|
Big thanks for your quick fix on this lib.
|
|
Caniblast |
View Public Profile |
Send a private message to Caniblast |
Find More Posts by Caniblast |
Add Caniblast to Your Buddy List |
03/03/20, 02:16 PM | |
|
Error when library independently loaded.
I have just started with LibChatMessage, at present it is independent (No addon having need for the library)
Caught a bug, not sure what to make of it (My lua knowledge is very basic at present): Code:
user:/AddOns/LibChatMessage/LibChatMessage.lua:528: function expected instead of nil stack traceback: user:/AddOns/LibChatMessage/LibChatMessage.lua:528: in function 'ReinitializeChatFormatters' <Locals> noop = user:/AddOns/LibChatMessage/LibChatMessage.lua:518, originalRegisterForEvent = [C]:-1, eventId = 131200, eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:96 </Locals> user:/AddOns/LibChatMessage/LibChatMessage.lua:586: in function 'func' EsoUI/Libraries/Globals/globalapi.lua:207: in function '(anonymous)' |
|
BornDownUnder |
View Public Profile |
Send a private message to BornDownUnder |
Find More Posts by BornDownUnder |
Add BornDownUnder to Your Buddy List |
03/03/20, 02:29 PM | ||
Re: Error when library independently loaded.
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
03/05/20, 12:45 AM | |||
|
Re: Re: Error when library independently loaded.
|
||
|
BornDownUnder |
View Public Profile |
Send a private message to BornDownUnder |
Find More Posts by BornDownUnder |
Add BornDownUnder to Your Buddy List |
04/24/20, 08:18 PM | |
Forum posts: 15
File comments: 29
Uploads: 0
|
Last edited by Lenox : 04/24/20 at 08:30 PM.
|
|
Lenox |
View Public Profile |
Send a private message to Lenox |
Send email to Lenox |
Find More Posts by Lenox |
Add Lenox to Your Buddy List |
04/25/20, 05:24 AM | ||
ad 2) This is currently not possible, but something I have planned for version 2. |
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
04/25/20, 11:03 AM | |||
Forum posts: 15
File comments: 29
Uploads: 0
|
|
||
|
Lenox |
View Public Profile |
Send a private message to Lenox |
Send email to Lenox |
Find More Posts by Lenox |
Add Lenox to Your Buddy List |
04/27/20, 12:28 PM | |
Forum posts: 0
File comments: 1
Uploads: 0
|
bug?
I get the chat error every time I enter the chat
EsoUI/Ingame/ChatSystem/Keyboard/KeyboardChatSystem.lua:370: operator - is not supported for nil - number stack traceback: EsoUI/Ingame/ChatSystem/Keyboard/KeyboardChatSystem.lua:370: in function 'ZO_ChatSystem:Maximize' (tail call): ? EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:2001: in function 'SharedChatSystem:StartTextEntry' EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:2365: in function 'StartChatInput' :1: in function '(main chunk)' |
|
tankslayer21 |
View Public Profile |
Send a private message to tankslayer21 |
Send email to tankslayer21 |
Find More Posts by tankslayer21 |
Add tankslayer21 to Your Buddy List |
04/27/20, 06:47 PM | ||
Re: bug?
What I mean by that is say you have 104 mods installed. One of them caused an error. You do not know which one, and when the game tries to tell you it is not telling you all the errors one by one so you could start with the first issue and go down the list. What you are seeing is the last error on the stack, not what is causing the issue. You are experiencing an error for sure but that's not the initial error. I have really really taken a lot of time to eliminate LibStub from all my mods and I even removed embedded libraries because authors have not removed them themselves yet. I make what I consider minor modifications. I am using LibChatMessage and I have not altered it because I didn't feel it was needed. The mods that I have will be different from yours. However, the ones I have that seem to require LibChatMessage are; Awesome Guild Store, Craft Store, and LibGPS. Out of those three I have altered only two of them. Awesome Guild Store and Craft Store. I don't know what other mods you might be using that require LibChatMessage. However, updating the mods I listed to the current versions would be a start. And update LibGPS also if you have not already. I don't know if there is an easy way to spit out a exact list of your mods. I could say get me some screen shots but I have 104 mods so it would be multiple screen shots for me and I don't want to have you spam this forum with them. I can't really give instructions on how to do this, but if you open a command prompt in your .\Documents\Elder Scrolls Online\live\AddOns folder and typed what I have listed below it would make a list of folders and that should indicate the mods you have installed fairly easily. Code:
dir /A:D /B > modlist.txt
Last edited by Sharlikran : 04/27/20 at 09:55 PM.
|
||
|
Sharlikran |
View Public Profile |
Send a private message to Sharlikran |
Send email to Sharlikran |
Find More Posts by Sharlikran |
Add Sharlikran to Your Buddy List |
04/28/20, 05:38 AM | ||
Re: bug?
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
05/26/20, 06:13 PM | |
|
Code:
user:/AddOns/LibChatMessage/LibChatMessage.lua:528: function expected instead of nil stack traceback: user:/AddOns/LibChatMessage/LibChatMessage.lua:528: in function 'ReinitializeChatFormatters' user:/AddOns/LibChatMessage/LibChatMessage.lua:586: in function 'func' EsoUI/Libraries/Globals/globalapi.lua:216: in function '(anonymous)' |
|
Casterial |
View Public Profile |
Send a private message to Casterial |
Send email to Casterial |
Find More Posts by Casterial |
Add Casterial to Your Buddy List |
05/27/20, 02:42 AM | ||
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
06/06/20, 07:24 AM | |
Forum posts: 0
File comments: 2
Uploads: 0
|
problem
i installed the lastest version of this library. 1.1.3.
But in no one modes is not working. Please help. What i doing wrong? Sorry for russian language in gui.
Last edited by drsneg : 06/06/20 at 07:25 AM.
|
|
drsneg |
View Public Profile |
Send a private message to drsneg |
Send email to drsneg |
Find More Posts by drsneg |
Add drsneg to Your Buddy List |
06/06/20, 09:48 AM | ||
Re: problem
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email 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.