Go to Page... |
Compatibility: | Greymoor (6.0.5) |
Updated: | 05/28/20 03:14 PM |
Created: | 10/31/14 02:56 PM |
Monthly downloads: | 2,616 |
Total downloads: | 501,207 |
Favorites: | 369 |
MD5: |
-- Requires a unique control name for your chat window -- (optional) Text for the heading label - if left nil the label control will not be created -- (optional) FadeDelay & FadeTime - if left nil text will not fade -- Returns a TopLevelControl (which contains your chat window) libmw:CreateMsgWindow(string UniqueName, string LabelText, integer FadeDelay, integer FadeTime)
-- Add a message to your chat window, with colors: myMsgWindow:AddText("Heres a chat message", Red, Green, Blue) -- Change the text fadeDelay & fadeDuration: myMsgWindow:ChangeTextFade(integer FadeDelay, integer FadeDuration) -- Change the window fadeDelay & fadeDuration: myMsgWindow:ChangeWinFade(_FadeDelay, _FadeTime) -- Clear all of the text from the textBuffer (clears the text in the window) myMsgWindow:ClearText()
## DependsOn: LibMsgWin-1.0
local LIBMW = LibMsgWin
-- Don't forget to grab the library at the top of every code file your trying to use this in: local LIBMW = LibMsgWin -- After a 25 second delay the text will start to fade. -- Once it starts fading it will take 4 seconds to completely fade local myMsgWindow = LIBMW:CreateMsgWindow("UberAddonChatWindow", "Window Header Label", 25, 4) -- To prevent the text from fading Use 0, 0 for the fade delay & duration local myMsgWindow = LIBMW:CreateMsgWindow("UberAddonChatWindow", "Window Header Label", 0, 0) -- Or just leave them nil local myMsgWindow = LIBMW:CreateMsgWindow("UberAddonChatWindow", "Window Header Label") -- Then call one of the controls built in functions: myMsgWindow:AddText("Heres a chat message in red", 1, 0, 0) myMsgWindow:ChangeTextFade(0, 0) myMsgWindow:ChangeWinFade(2000, 3000) myMsgWindow:ClearText()
Version 1.0_R7 -- Oops
Window Fade Added the ability to fade the window. It defaults to the same FadeDelay & FadeTime you were passing in for the text fade (so their the same) and will also default to 0 (no fade) if no values are passed in. But if you want them to have different fadeDelay/fadeTime's you can change it by using:
Accessible from the control returned to you when you create the window. All times are in milliseconds.Lua Code:
function tlw:ChangeWinFade(_FadeDelay, _FadeTime)
Text Fade Change Due to the addition of the window fading option/function I thought it would be best to clarify the function used to change the text fade so I changed its name, it is now called:
All times are in milliseconds.Lua Code:
function tlw:ChangeTextFade(_FadeDelay, _FadeTime)
Fade In Not an animation, but the window & text will both automatically reset to an alpha value of 1:
When text is added to the window using
or OnMouseEnter for the text buffer control (the window)Lua Code:
function tlw:AddText(_Message, _Red, _Green, _Blue)
The window & text will both begin their fadeDelay then fadeTime as soon as the text has been entered or OnMouseExit of the text buffer control (window).
Time Storage In case you need to access the fadeDelay/fadeTime for the window or text I stored it in the control that is returned to you when you create the window for easy access:
Lua Code:
local myDebugWin = LIBMW:CreateMsgWindow("JunkItDebugWindow", "JunkIt Debug Window", 4000, 3000) --[[ So they are stored here: myDebugWin.fadeDelayWindow myDebugWin.fadeTimeWindow myDebugWin.fadeDelayTextLines myDebugWin.fadeTimeTextLines --]]
Version 1.0_R6 -- Requested Change
A Default Color Would Be Nice: I forgot to set a default color if one was not passed in, caught it as soon as I uploaded R6.
Version 1.0_R5 -- Requested Feature
Code Change: Small code change for how the slider starts to move when the buffer is full & text is added to the window. Changed it from a hard coded 200 (the default number of MaxHistoryLines) to grabbing the current maxHistoryLines which will allow users to change the default number of MaxHistoryLines if they wish.
Lua Code:
-- changed this: elseif numHistoryLines == 200 then -- to this: elseif numHistoryLines == self:GetNamedChild("Buffer"):GetMaxHistoryLines() then
Text In Color: Added parameters to the AddText function to allow you to pass through colors for the text:
Lua Code:
function tlw:AddText(Message, Red, Green, Blue)
Reverse Scroll: Apparently the window scrolled in the wrong direction. It scrolled the opposite direction of the original chat window. It has been fixed.Version 1.0_R3 --
Scroll Visiblity: Fixed the slider so it now only becomes visible when there are enough lines of text to scroll off of the screen.
Known Issue: If you resize the window and there becomes enough space for all lines of text the slider does not hide itself until the user scrolls the window or another line of text is added to the window (instead of hiding itself immediately upon resizing). I can not get the OnResizeStop handler to work, will fix as soon as I figure it out, or find a way around using OnResizeStop.
Window Heading Label: I Added a label control to the window that can be used to add text to the top of the window.
WARNING: Due to adding the window heading label I needed to add an extra parameter to the function. It is the second parameter and the fade parameters are now third & fourth.
libmw:CreateMsgWindow(_UniqueName, _LabelText, _FadeDelay, _FadeTime)
Added LibStub: I forgot to include LibStub in the previous update zip file. It is now included, no other changes.Version 1.0_R2 --
cntrl:ClearText(): Added an easily accessible ClearText() function to clear the text from the buffer, so you don't have to mess with getting the buffer control. You can just call it on the main control returned by CreateMsgWindow(..), Yeah I'm that lazy.
File Name |
Version |
Size |
Uploader |
Date |
1.0 r10 |
3kB |
sirinsidiator |
04/24/20 02:56 PM |
|
1.0 r9 |
4kB |
sirinsidiator |
05/20/19 11:18 AM |
|
1.0_R8 |
3kB |
circonian |
12/29/14 06:24 AM |
|
1.0_R7 |
4kB |
circonian |
11/23/14 08:14 PM |
|
1.0_R6 |
4kB |
circonian |
11/23/14 08:05 PM |
|
1.0_R4 |
4kB |
circonian |
11/22/14 11:40 PM |
|
1.0_R3 |
3kB |
circonian |
11/22/14 12:36 AM |
|
1.0_R2B |
3kB |
circonian |
11/03/14 10:30 PM |
|
1.0_R2 |
2kB |
circonian |
11/03/14 07:18 AM |
|
1.0_R1 |
2kB |
10/31/14 02:56 PM |
![]() |
Comment Options |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
Forum posts: 0
File comments: 3
Uploads: 0
|
soo...
The Error is FTC? because it's the only addon i have that uses LibMsgWin. If I have it enabled i can no longer do anything with my chat window, error dialog pops up if i try to touch the chat window at all while it's on.
|
![]() |
![]() |
Aneova |
View Public Profile |
Send a private message to Aneova |
Find More Posts by Aneova |
Add Aneova to Your Buddy List |
![]() |
|
Forum posts: 0
File comments: 19
Uploads: 0
|
makes sense that it would be FTC b/c it does create chat windows for like combat log stuff.
|
![]() |
![]() |
Sedare |
View Public Profile |
Send a private message to Sedare |
Find More Posts by Sedare |
Add Sedare to Your Buddy List |
![]() |
||||
|
||||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|||
Forum posts: 0
File comments: 19
Uploads: 0
|
All i know is that if i deactivate it, it deactivates FTC and the bug goes away. |
||
![]() |
![]() |
Sedare |
View Public Profile |
Send a private message to Sedare |
Find More Posts by Sedare |
Add Sedare to Your Buddy List |
![]() |
||
|
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
Forum posts: 0
File comments: 19
Uploads: 0
|
Really need this updated. I think FTC is causing the issue, but here's the error:
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' |caaaaaa<Locals> self = [table:1]{isAgentChatActive = F, currentChannel = 2, ignoreTextEntryChangedEvent = F, numUnreadMails = 44, lastValidChannel = 0, minContainerWidth = 300, suppressSave = F, maxContainerWidth = 550, allowMultipleContainers = F, minContainerHeight = 170, currentNumNotifications = 1, isMinimized = T, currentTarget = "@Jack.Savage", loaded = T, maxContainerHeight = 380}, i = 1, container = [table:2]{fadeInReferences = 0, primary = T, hiddenTabStartIndex = 2, minAlpha = 0, allowSettingsSave = T, id = 1, maxAlpha = 1} </Locals>|r (tail call): ? EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:2001: in function 'SharedChatSystem:StartTextEntry' |caaaaaa<Locals> self = [table:1], currentSceneName = "worldMap" </Locals>|r EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:2365: in function 'StartChatInput' ZO_ChatWindowTextEntryEditBox_MouseDown:4: in function '(main chunk)' |caaaaaa<Locals> self = ud, button = 1, ctrl = F, alt = F, shift = F, command = F </Locals>|r |
![]() |
![]() |
Sedare |
View Public Profile |
Send a private message to Sedare |
Find More Posts by Sedare |
Add Sedare to Your Buddy List |
![]() |
|
|
I don't know why I never saw this before, because I thought I'd gone through all the libraries. I'll probably start using this in my addon to standardize my output...
|
![]() |
![]() |
eventHandler |
View Public Profile |
Send a private message to eventHandler |
Find More Posts by eventHandler |
Add eventHandler to Your Buddy List |
![]() |
||
![]() |
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
|
![]() you need fix typo bcz minion going crazy xD |
![]() |
![]() |
Marazota |
View Public Profile |
Send a private message to Marazota |
Find More Posts by Marazota |
Add Marazota to Your Buddy List |
![]() |
|
|
|
![]() |
![]() |
merlight |
View Public Profile |
Send a private message to merlight |
Find More Posts by merlight |
Add merlight to Your Buddy List |
![]() |
||
|
Re: Hello
|
|
![]() |
![]() |
circonian |
View Public Profile |
Send a private message to circonian |
Send email to circonian |
Find More Posts by circonian |
Add circonian to Your Buddy List |
![]() |
|
|
Hello
You've done a great job with this addon.
I'm looking to replace Unicorn & List in a few of my addons. Would you mind if I follow your code as an example? I need to re-write a few pieces to fit my needs.. but I wanted to check if it's ok with you? Thanks, AB |
![]() |
![]() |
awesomebilly |
View Public Profile |
Send a private message to awesomebilly |
Send email to awesomebilly |
Find More Posts by awesomebilly |
Add awesomebilly to Your Buddy List |
![]() |
||
|
h3. TextBufferControl * SetColorById(*integer* _colorId_, *number* _r_, *number* _g_, *number* _b_) When you change chat category color in game settings, two things happen: - CHAT_SYSTEM:SetChannelCategoryColor calls SetColorById on each buffer to change the color of existing messages - SetChatCategoryColor sets the color for future messages (r, g, b passed to AddMessage) |
|
![]() |
![]() |
merlight |
View Public Profile |
Send a private message to merlight |
Send email to merlight |
Find More Posts by merlight |
Add merlight to Your Buddy List |
![]() |
|
|
Out of Town
I am signing off & will be out of town for about a week for thanksgiving. I will try to check in when I can to see if there are any problems or questions.
|
![]() |
![]() |
circonian |
View Public Profile |
Send a private message to circonian |
Send email to circonian |
Find More Posts by circonian |
Add circonian to Your Buddy List |
![]() |