Create panels for customizing your UI, sucessor to eePanels

Wiki and FAQ

Sample Scripts

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

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.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of arturogatti arturogatti Sep 28, 2009 at 02:59 UTC - 0 likes

    First of all thanks for the example scripts on this post... helped me a lot! ;)

    But now i have a doubt...

    Is there a way to create a panel that hides when im casting something? (when i say casting i mean... when the "cast" bar appears)

    Thanks in advance ;)

  • Avatar of yllelder yllelder Sep 26, 2009 at 20:28 UTC - 0 likes

    I make a texture of 512x256,insert this in the game with KGpanels and when resize in the addon (512x256) leaves much larger than it is!

    Thought I'd see what size that is creating the KGpanels my screen (my actual resolution is 1280x1024). Then I take the texture and put it in the addon size (width and height) 100% x 100% to fill the screen, then the pixels KGpanels said that the total width is 1066, is smaller than the resolution real! O_o

    I tried to do the conversion as my decision whatever it says the addon (W 1066):

    If 1280 is 1066

    512 are 426.4

    But there is to do well at all (a little larger or smaller) and I do not fit the adjacent textures.

    Anyone else happens to get a texture that will leave the largest size you have?

    Where are the 214 missing pixels?

  • Avatar of ImpalerCore ImpalerCore Sep 22, 2009 at 04:29 UTC - 0 likes

    This frame shows the level number of a target when a target is selected. If the level is skull, the skull icon is displayed.

    if UnitExists("target") == nil then
        local level = UnitLevel("target")
        if level < 0 then
            self.text:SetFormattedText("%d", level)

    You can customize the panel size to control the size of the icon, and the font parameters to control the level text size and font. Have fun!

  • Avatar of ImpalerCore ImpalerCore Sep 21, 2009 at 14:01 UTC - 0 likes

    To lilgulps

    To make a panel show up when not in combat, and only to show up in a party or raid can be made by combining two of the sample scripts.

     local pmems = GetNumPartyMembers()
     local rmems = GetNumRaidMembers()
    if (pmems > 0 or rmems > 0) then
      if event == "PLAYER_REGEN_ENABLED" then
      elseif event == "PLAYER_REGEN_DISABLED" then

    Not tested!

    Last edited Sep 21, 2009 by ImpalerCore
  • Avatar of lilgulps lilgulps Sep 20, 2009 at 09:05 UTC - 0 likes

    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? :(

  • Avatar of ImpalerCore ImpalerCore Sep 19, 2009 at 06:03 UTC - 0 likes

    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.

    if UnitExists("target") == nil then

    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.

    local f = kgPanels:FetchFrame("kgIconBorderPanel")
    local ClassIconCoord =
      WARRIOR = {1,1},
      MAGE = {1,2},
      ROGUE = {1,3},
      DRUID = {1,4},
      HUNTER = {2,1},
      SHAMAN = {2,2},
      PRIEST = {2,3},
      WARLOCK = {2,4},
      PALADIN = {3,1},
      DEATHKNIGHT = {3,2},
      DEFAULT = {4,4}, -- transparent so hidden by default
    if UnitExists("target") == nil then
    local _,class = UnitClass("target");
    local col, row = ClassIconCoord[class or "DEFAULT"][1], ClassIconCoord[class or "DEFAULT"][2];
    local left, top = (row-1)*0.25,(col-1)*0.25;"Interface\\Textures\\Special\\ClassIcons");,left+0.25,top,top+0.25);"TOPLEFT", self, "TOPLEFT", 6, -6);"BOTTOMRIGHT", self, "BOTTOMRIGHT", -6, 6);

    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 :-)

    Last edited Sep 19, 2009 by ImpalerCore
  • Avatar of Kuzah Kuzah Aug 26, 2009 at 21:20 UTC - 0 likes

    @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).

  • Avatar of sirspikey sirspikey Aug 26, 2009 at 16:40 UTC - 0 likes

    @Kuzah check out the addon DevTool it helps you id the frames under your pointer. Search for it on or

    Last edited Aug 26, 2009 by sirspikey: used wrong word
  • Avatar of Kuzah Kuzah Aug 26, 2009 at 05:26 UTC - 0 likes

    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.

  • Avatar of Kuzah Kuzah Aug 26, 2009 at 04:30 UTC - 0 likes

    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.


Date created
Sep 16, 2008
Last update
Jun 23, 2015
Development stage
  • enUS
  • frFR
  • koKR
  • zhCN
All Rights Reserved
Curse link
Reverse relationships
Recent files
  • A: r437 for 6.2.0 Jun 23, 2015
  • A: r436 for 6.1.0 Feb 24, 2015
  • R: 1.20 for 6.0.2 Oct 24, 2014
  • R: 1.19 for 6.0.2 Oct 17, 2014
  • A: r433 for 6.0.2 Oct 17, 2014