Chat Code Help
For context all the elements of the chat should be hidden until your cursor is over top it, except the FontStringContainer.
So I have a few problems with my code. First, even though the tab text is set to "SetAlpha(0)" on load it is being overwritten somehow and appears on load. Second, when I get a private message on a tab that isnt open I would like if the tab would appear but im not sure how I would do so. Third, calling the "OnEnter()" and "OnLeave()" function I have created for "CombatLogQuickButtonFrameButton1" and "CombatLogQuickButtonFrameButton2" results in a lua error. Here is the error if needed: https://pastebin.com/gkh1h35e Also I couldnt figure out how to call my number table for "SetupHooks" so I had to put the individual frame number. Maybe there is a way to fix that. Finally here is my code: https://pastebin.com/2TkPA1wJ Hopefully everything is concise and easy to understand as well as not overwhelming for anyone willing to help! Thank you and have a wonderful day! |
Some notes without looking into all the details; also i dont have a active wow subscription right now so it could be that i am not 100% right with what i am saying. i could read up some Blizzard Code but thats the hard way and i am a bit lazy to do it this way right now :D
I feel like it could be way way easier instead of hiding all this textures (ButtonFrameBottomTexture, BottomTexture etc) to hide their parent frame, if one exists ofc. How to get a parent frame? frame:GetParent() if its the same parent for all your textures just hide your parent, will be much easier todo :) Hiding the parent frame will hide all childrens aswell. (Note: difference of frame:IsVisible() and frame:IsShown(). https://wow.gamepedia.com/API_Region_IsShown ) Quote:
1. accesing it via the global Variable. for example: ChatFrame1 2. accessing it in the global table _G. for example _G["ChatFrame1"]. this way also allows you to do all kinds of string manipulation or use a string variable inside the [] . So in your case the second way would be the prefered one. Also you need to look up the differnce between global variables and local ones. DHBT is a global variable in your code which means this variable could be accessed and mofified from every other addon by typing _G["DBHT"] or just DHBT = "haha, i have just changed your variable" If a variable should only exist in a single file define it like this at the beginning of your file: local DHBT = "whatever" if it should only exist inside a function and not even be visible inside the whole file define it the same way but inside the function :) i guess thats all i have to say for now. If there is anything else let me know :) |
I will try a few of these things and get back to you. I am a little overwhelmed with this one. One quick question though. Some frames in WoW have a "." in them but that seems to cause lua errors. I read if you use a "%" in front it fixes that problem. Is that right?
|
|
Im struggling a lot with this last addon im creating, would someone be willing to write up a addon that hides all the chat except the FontStringContainer unless your cursor is over top and add a "C_Timer.NewTimer(.5, XXX)" delay for when it hides
|
Have a look at Chicchai
https://www.wowinterface.com/downloa...-Chicchai.html |
All times are GMT -6. The time now is 04:11 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI