Go to Page... |
Thread Tools | Display Modes |
11-19-13, 01:44 PM | #1 |
Question About countdown (Kgpanels)
Hi again!.
I don´t found the way to do that, I hope that anyone of us know how to do it.... Here I go: Exist a way to, after x amount of seconds, a panel (self for example), do a self:Hide(). I need combine with a chat event. When the active chat frame, (chat frame1 for example), don´t recieve any mensage on 120 secs, the panel do a self: Hide(), and when the active chat frame recieve a msg the panel do a self:Show(). And another question more (thanks). Exist way / addon to save / restore the config of the chat? (ingame, if can be posible), when I toggle characer, the chat have a diferent size / position / config, and is very annoying. Thanks for all !!!. |
|
11-19-13, 03:57 PM | #2 |
11-19-13, 08:49 PM | #3 | |
When I dont recieve a msg in "x" time (for example 120 secs), on the active chatframe, self hide (the panel), not the chat. And I appreciate too, if anyone know a solution for the config of the chat ingame. Thanks!! |
||
11-19-13, 09:38 PM | #4 | ||
If that's not an option: OnLoad Code:
hooksecurefunc(ChatFrame1, "AddMessage", function() self.countdown = 10 self:Show() end) Code:
self.countdown = self.countdown - elapsed if elapsed <= 0 then self:Hide() end
> WoW > WTF > 123456#1 > Account > Servername > CharnameA to: > WoW > WTF > 123456#1 > Account > Servername > CharnameB In your case, you want to copy these files: - chat-cache.txt (which channels are in which frames/tabs, which color for which channel, etc.) - layout-cache.txt (where the frames are, what size, etc.) You could theoretically copy these settings in-game with an addon, but since creating a new character doesn't happen that often, and you're generally not changing your chat settings radically every day, it's not really worth the effort IMO.
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. |
|||
11-20-13, 05:18 AM | #5 | |
How can be do it?. In the moment that I activate Chichai, I get tons of lua errors :___(. And one more thing: How can be do it, for in that: Code:
hooksecurefunc(ChatFrame1, "AddMessage", function() self.timeLeft = 122 self:Show() end) Thanks for all, I make it works but only work in the ChatFrame1, if works for the active chatframe, that.... that be more than perfect. THANKS!!! Last edited by Akatosh : 11-20-13 at 10:25 AM. |
||
11-20-13, 03:45 PM | #6 | ||
However, as I said, it's completely possible to change all of the chat settings in-game, but there's a reason there isn't a standalone addon that just copies your chat settings between your characters -- it's a lot of work for not much gain. It's less work to just copy the file, unless you are creating a new character every day or radically changing your chat settings every day. Set it up how you like it, copy the file, done. If you're getting errors, post them. (Usually just the first one that occurs is sufficient.) Nobody can magically see your screen through the forums and know what Lua errors may have been displayed there a day or a week ago.
Finally, I'm aware that English isn't your native language, so hopefully you don't mind me pointing this out since you've used it a couple of times recently -- "dude" is not the right word for that context. "Dude" is an informal/slang term for "man" in English, similar to "guy" but even more informal. I don't think you're trying to say "I have a man" in the middle of your addon questions, so you may want to double-check your translation there.
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. Last edited by Phanx : 11-20-13 at 03:54 PM. |
|||
11-21-13, 12:45 PM | #7 | |
For the theme of ElvUI, etc, I try it time ago, and I see a "All in One" solution, for persons that dont want break a lot their brain, you can customize a lot of option, but not all, you dont have freedom to do all, as I like, they have good things and bad things, In My Opinion, I dont have the absolute truth, only be my opinion. The error of Chicchai: Code:
Message: Interface\AddOns\Chicchai\core.lua:179: attempt to index local 'self' (a nil value) Time: 11/21/13 19:06:46 Count: 1 Stack: Interface\AddOns\Chicchai\core.lua:179: in function `updateHeight' Interface\AddOns\Chicchai\core.lua:221: in main chunk Locals: self = ChatFrame3 { 0 = <userdata> flashTimer = 0 originalShow = <function> defined =[C]:-1 tellTimer = 30717.845 Maximize = <function> defined @Interface\AddOns\Chicchai\core.lua:141 resizeButton = ChatFrame3ResizeButton { } buttonFrame = ChatFrame3ButtonFrame { } Hide = <function> defined @Interface\FrameXML\FrameLocks.lua:120 SetFrozen = <function> defined @Interface\AddOns\Chicchai\core.lua:121 UpdateHeight = <function> defined @Interface\AddOns\Chicchai\core.lua:177 channelList = <table> { } Minimize = <function> defined @Interface\AddOns\Chicchai\core.lua:142 clickAnywhereButton = ChatFrame3ClickAnywhereButton { } isDocked = 1 Chicchai = <unnamed> { } editBox = ChatFrame3EditBox { } Show = <function> defined @Interface\FrameXML\FrameLocks.lua:124 isLocked = 1 name = "Other" originalHide = <function> defined =[C]:-1 buttonSide = "left" zoneChannelList = <table> { } defaultLanguage = "Orco" messageTypeList = <table> { } } self = nil (*temporary) = ChatFrame1 { 0 = <userdata> channelList = <table> { } flashTimer = 0 clickAnywhereButton = ChatFrame1ClickAnywhereButton { } isStaticDocked = true editBox = ChatFrame1EditBox { } tellTimer = 30717.845 isDocked = 1 defaultLanguage = "Orco" zoneChannelList = <table> { } resizeButton = ChatFrame1ResizeButton { } buttonFrame = ChatFrame1ButtonFrame { } messageTypeList = <table> { } } (*temporary) = nil (*temporary) = ChatFrame3 { 0 = <userdata> flashTimer = 0 originalShow = <function> defined =[C]:-1 tellTimer = 30717.845 Maximize = <function> defined @Interface\AddOns\Chicchai\core.lua:141 resizeButton = ChatFrame3ResizeButton { } buttonFrame = ChatFrame3ButtonFrame { } Hide = <function> defined @Interface\FrameXML\FrameLocks.lua:120 SetFrozen = <function> defined @Interface\AddOns\Chicchai\core.lua:121 UpdateHeight = <function> defined @Interface\AddOns\Chicchai\core.lua:177 channelList = <table> { } Minimize = <function> defined @Interface\AddOns\Chicchai\core.lua:142 clickAnywhereButton = ChatFrame3ClickAnywhereButton { } isDocked = 1 Chicchai = <unnamed> { } editBox = ChatFrame3EditBox { } Show = <function> defined @Interface\FrameXML\FrameLocks.lua:124 isLocked = 1 name = "Other" originalHide = <function> defined =[C]:-1 buttonSide = "left" zoneChannelList = <table> { } defaultLanguage = "Orco" messageTypeList = <table> { } } (*temporary) = "ScrollingMessageFrame" (*temporary) = "attempt to index local 'self' (a nil value)" getChicchai = <function> defined @Interface\AddOns\Chicchai\core.lua:115 DOWN = -1 getMinHeight = <function> defined @Interface\AddOns\Chicchai\core.lua:74 Basically the panels are in the back of prat to put the borders, background, and a texture when the chat fades, and fit with the appareance of the chat tabs: http://www.wowinterface.com/forums/s...t=46786&page=3 Chiccai dont give me exactly that I want, after disable all addons and see their efect, dont be exactly what I want. So the "final", appareance of the chat is that: When the chat, don't receive a msg in 124 secs, (prat have 120), 124 to fit with the fade efect of prat. Have a gradient texture (black to transparent), and fit with the color of the tab, so make the appareance of "mix". when the editbox is shown , or mouseover the zone of the chat or anyone of the tabs, a new panel appear and the panel of the "gradient efect" hide. When an event (offline, online, friend guild mate or ID friend and dont be the actibe chat / tab), the tab of general get a gradient yellow color. With a whisper the tab get purple gradient color, with the some condition that I said up. with ID whisp, blue, idem of up. The tab of combat log (the tab is hided), ChatFrame2Tab:EnableMouse(false), and Alpha(0). Detail of the copy and the arrow texture: The code: OnLoad: Code:
hooksecurefunc(ChatFrame1, "AddMessage", function() self.timeLeft = 124 self:Show() end) hooksecurefunc(ChatFrame3, "AddMessage", function() self.timeLeft = 124 self:Show() end) Code:
local tab1 = kgPanels:FetchFrame("ChatTab_General") local tab2 = kgPanels:FetchFrame("ChatTab_Log") local tab3 = kgPanels:FetchFrame("ChatTab_Other") local prat1 = kgPanels:FetchFrame("Prat_Art") local prat2 = kgPanels:FetchFrame("Prat_Art_Fix") local prat3 = ChatFrame1PratCCReminder local prat4 = ChatFrame1ButtonFrameBottomButton local prat5 = kgPanels:FetchFrame("Prat_Art_Off") local prat6 = ChatFrame3PratCCReminder local prat7 = ChatFrame3ButtonFrameBottomButton if ChatFrame1EditBox:IsShown() then self.timeLeft = 124 end if tab1:IsMouseOver() or tab2:IsMouseOver() or tab3:IsMouseOver() then self.timeLeft = 124 end if self.timeLeft or ChatFrame1EditBox:IsShown() then self.timeLeft = self.timeLeft - elapsed local timeLeft = self.timeLeft; if timeLeft < 0 then prat1:Hide() prat2:Hide() prat3:Hide() prat4:Hide() prat6:Hide() prat7:Hide() prat5:Show() else prat1:Show() prat2:Show() prat3:Show() prat4:Show() prat6:Show() prat7:Show() prat5:Hide() end end Code:
self.timeLeft = 124 I hope that you like, it can be possible with you and the persons that help me in this forum. Last edited by Akatosh : 11-21-13 at 01:07 PM. Reason: Grammar |
||
11-22-13, 12:27 AM | #8 |
That OnUpdate script hurts my brain... a lot... but I guess if it's working for you...
Re: Your Chicchai error, did you add/change anything in the config table?
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. |
|
11-22-13, 03:14 PM | #9 | |
For other part, Chicchai don't work exactly as I want, so I discard use it, but I really appreciate your help, thanks anyways. Now I am trying to do the theme of the chat config ingame. And I trying to fix a problem with skada, when I leave a pet battle, allways shown, I configure skada to hide allways when I am solo, etc, and every time that a pet battle end, show the window, dont be intended that, scrips on kgpanels dont work and I dont understand why.... I just put OnLoad the events of pet battle start over close etc: OnLoad: Code:
self:RegisterEvent("PET_BATTLE_OPENING_START") self:RegisterEvent("PET_BATTLE_OPENING_DONE") self:RegisterEvent("PET_BATTLE_TURN_STARTED") self:RegisterEvent("PET_BATTLE_PET_ROUND_PLAYBACK_COMPLETE") self:RegisterEvent("PET_BATTLE_PET_CHANGED") self:RegisterEvent("PET_BATTLE_XP_CHANGED") self:RegisterEvent("PET_BATTLE_ACTION_SELECTED") self:RegisterEvent("PET_BATTLE_OVER") self:RegisterEvent("PET_BATTLE_CLOSE") OnEvent: Code:
if SkadaBarWindowSkada:IsVisible() then SkadaBarWindowSkada:Hide() end |
||
11-22-13, 09:18 PM | #10 | |
(2) I'd skip using events for that, and just hook Skada's own OnShow script to re-hide it if desired: Code:
SkadaBarWindowSkada:HookScript("OnShow", function(this) if not IsInGroup() then this:Hide() end end)
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. |
||
11-23-13, 05:10 AM | #11 | |
I have a lot of panels with no code in the UI, so I can put that code In one of them. Edit1: The code on Kgpanel dont work. Edit2: The code on http://addon.bool.no/ dont work. Code:
Message: Interface\AddOns\Skada_Fix\code.lua:3: attempt to index global 'SkadaBarWindowSkada' (a nil value) Time: 11/23/13 12:08:20 Count: 1 Stack: Interface\AddOns\Skada_Fix\code.lua:3: in main chunk Locals: (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = "attempt to index global 'SkadaBarWindowSkada' (a nil value)" Edit3: I do it!! In Skada.lua Code:
function Skada:OnEnable() self:ReloadSettings() self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("GROUP_ROSTER_UPDATE") self:RegisterEvent("UNIT_PET") self:RegisterEvent("PLAYER_REGEN_DISABLED") self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", COMBAT_LOG_EVENT_UNFILTERED) self:RegisterEvent("PET_BATTLE_OPENING_START") self:RegisterEvent("PET_BATTLE_CLOSE") if type(CUSTOM_CLASS_COLORS) == "table" then Skada.classcolors = CUSTOM_CLASS_COLORS end -- Instead of listening for callbacks on SharedMedia we simply wait a few seconds and then re-apply settings -- to catch any missing media. Lame? Yes. self:ScheduleTimer("ApplySettings", 2) end I send a PM to the Author I hope that I help he Regards. Last edited by Akatosh : 11-23-13 at 05:14 AM. |
||
11-23-13, 10:05 AM | #12 |
PMs are not really a good way to report bugs. You should use the addon's public ticket tracker instead. Let's say 20 people are all having the same problem. Using PMs, they each spend a few minutes typing up a report and sending it to the author. Now the author gets 20 PMs about the same problem, and has to look in 20 different places to collect all the info, not to mention send 20 replies. Using tickets, only one person has to spend time typing up a report. The other 19 people can all see that report, and only have to spend time typing additional info they may have, if any. The author only has to look in one place to see all the info, and only has to post one reply, which everyone can see and respond to.
Plus, with a ticket tracker, the author can see all the things they need to do in one place, and they can sort and filter the list (eg. see all feature requests for Addon A, or all bugs for Addon B). You can't do that with PMs. Other authors may be more patient, but personally, I just delete all the PMs I get about bugs, feature requests, etc. I usually don't have time or the ability to investigate them right away when I read them (I'm usually posting on the forums at work, where I don't have WoW) and then I just forget about them. Same goes for comments, forum posts, and emails. It's just not worth my time to try to keep track of it all.
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. |
|
11-23-13, 10:39 AM | #13 | |
|
||
WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Question About countdown (Kgpanels) |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|