kgPanels
Create panels for customizing your UI, sucessor to eePanels
OnClick now provides a pressed and released variable you can check for.
if pressed then -- do mouse down actions elseif released then -- do mouse up actions end
This means your script will get called twice when someone clicks the panel.
Here is a youtube link to a video Tutorial
Ive created an Example Texture Pack.
This example pack is just a template. If you want to use it as a storage spot for your art, look at the read me file for directions on usage.
I am very new to writing scripts, and basically I have a panel I have created.
I want this panel to hide when i enter combat and reappear when I exit combat. I also want this panel to hide when I am not in a group. But to show when I join a 5 man party or a raid.
Any help? :(
I have a couple of panels that I'm trying to layer on top of each other. It seems to be working, except there seems to be a little bit of a delay, and I'm wondering if I could do something that would make the kgpanel frame more responsive.
This is the background panel that my class icon sits on top of. Everything appears to work fine, except there is like a 1/2 second delay when I select or deselect a target till the frame shows or hides respectively. Is there a way to make it a little more responsive? It's not a big deal if it works this way, I'm just wondering if there is something I could do to make it more responsive to changes in targets.
This panel borrows code from an addon that displays a class specific icon texture from a grid of icons. Using the texcoord, I'm able to select the right icon from the complete image. Is there any way I could improve this code?
Thanks for any advice.
EDIT: I found out how to make it faster. Just replace the generic "UNIT_TARGET" event with "PLAYER_TARGET_CHANGED". Now the icon changes quickly :-)
I have made 2 panels that are used stances/buffs and consumables. When I enter an vehicle the actionbars dissapear, but the 2 panels remain. What I want is the panels to dissapear when I enter an vehicle such as a plain or wolves in ToC and they re-appear when I leave the vehicle.
Any input/scripts/help will be very appreciate.
Many thanks.
Then register the event in OnLoad and make an if-statement in the OnEvent
self:RegisterEvent ("UNIT_ENTERED_VEHICLE")
In the OnEvent:
if UnitInVehicle("player") then...
there you go :)
I did
OnLoad
self:RegisterEvent ("UNIT_ENTERED_VEHICLE")
self:RegisterEvent ("UNIT_EXITING_VEHICLE")
OnEvent
if event == "UNIT_ENTERED_VEHICLE" then
self:Hide()
elseif event == "UNIT_EXITING_VEHICLED" then
self:Show()
end
What am I doing wrong here?
@sirspikey, thanks for the suggestion, but it only says WorldFrame too.
I was digging into the issue more and it seems that LibQTip does this, "LibQTip produces anonymous frames and even if it named them, you will have hard time doing something consistent because there are reused in undefined order."
I was wondering if there's something we could do like parent/anchor to a 'mother' frame. Like for example I have to attach a panel to ShoppingTooltip1 2 and 3, but what if I could 'mother' frame anchor by putting in just ShoppingTooltip#. I could imagine it's easy for just a number change, but what if there was a uniquely generated string? If we could parent/anchor panels to a 'mother' frame and just use the auto resize that'd be like making a single kgpanel and it would cover every tooltip!! (since right now I have to make many panels to cover all different tooltip frame names).
@Kuzah check out the addon DevTool it helps you id the frames under your pointer. Search for it on curse.com or wowinterface.com
A different topic at hand.
Was wondering if there was some way to nudge or resize a kgpanel that has been made to auto adjust via "Resizing your panel on the fly" from the FAQ.
Like if I use kgpanel for all my tooltips I would like to be able to nudge the kgpanel for all tooltips and/or be able to give it a smaller or larger size than what it is now. I'm guessing I could mess with the "self:SetWidth(DropDownList1:GetWidth())" and "self:SetHeight(DropDownList1:GetHeight())", but I haven't a clue what to do.
I was wondering if someone could help me identify a certain frame.
A quick summary: Hidden all tooltips via TipTac. Made kgpanels for each tooltip. Made a panel for GameTooltip, ItemRefTooltip, ShoppingTooltip1, ShoppingTooltip2, and ShoppingTooltip3.
Problem: Auditor's tooltip does not show any kgpanels, but if I add a background back to TipTac's options Auditor shows a background. I tried using kgpanel frame finder and get this: Frames, WorldFrame, UIParent, Unknown (5 times). I tried using the macro "/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName())" it returns only WorldFrame.
Auditor's author mentioned that the addon uses LibQTip. Thought it was worth mentioning.
@Finmakin For each panel you want to respond, put this :
In each Panel set the OnLoad script
Then in each Panel OnEvent script:
First of all.... Nice addon I have played with it and have setup a nice UI with it.. But have a question regarding scripts.. (I am a totally noob with scripts).
What is am looking for ?
I have placed the (group) kg panels on the same spot as where the Unit frames appearing when people join the group, what i like to get is that screen is empty from these panels and that they are loading automaticly when a player enter the group. I believe that can be done on onload.. not sure.
pls help me out tnx
Hi, excellent addon btw :)
I was wondering:
I'm trying to make the healthbar look like it rises from some other part off my ui, when i target someone or entering combat. I got all the other stuff working in the script but can't find out haw to access the objects (HPBar) coordinates from the scripting in kgpanels.
Tried stuff like kgPanelsDB.global.layouts.<panelname>.test.absolute_bg.URx self:setoffset
Don't know what to call for and where i should insert the new cords.
Hi, excellent addon btw :)
I was wondering:
I'm trying to make the healthbar look like it rises from some other part off my ui, when i target someone or entering combat. I got all the other stuff working in the script but can't find out haw to access the objects (HPBar) coordinates from the scripting in kgpanels.
Tried stuff like kgPanelsDB.global.layouts.<panelname>.test.absolute_bg.URx self:setoffset
Don't know what to call for and where i should insert the new cords.