kgPanels

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

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

  • Avatar of arturogatti arturogatti Oct 23, 2009 at 16:45 UTC - 0 likes

    Hi again! :)

    Now i have two doubts...

    I just need to keep a panel hidden when my pet isnt active. (when players pet is visible, frame shows, if not it hides)

    I mean.. when my warlocks pet is summoned the panel opens up, and when it dies or isnt summoned the panel hides.

    and

    Pretty much the same thing has above but now it shows/hides when my target has a target or not. (when targets target frame is visible, frame shows, if not it hides)

    PS: I use pitbull for portraits frames and bars. Please explain it well cause im not into code thing. :P

    Thanks in advance ;)

  • Avatar of zernon916 zernon916 Oct 22, 2009 at 21:02 UTC - 0 likes

    Hi, Love this addon. I have been working on using this to skin a Druid UI. I am attempting to use it to change the borders of most of the target, player, focus, focus target, chat, targettarget, buffs, and many other frames. I am running into a problem with getting the Chat, and Minimap frame. I am using the parrent setting to show only when I have a buff active. It works until I log out. Once I log out and back in, those 2 panels decide to not show any more. I have tried to change the transpariency setting, with no luck. If anyone can help that would be awsome.

  • Avatar of Farside1234 Farside1234 Oct 16, 2009 at 12:05 UTC - 0 likes

    Thanks again for all your time, and input. That code worked perfectly,I now have working,and dragable on screen Target :HP/MP/Combo Point boxes.

    Farside
  • Avatar of ImpalerCore ImpalerCore Oct 16, 2009 at 01:02 UTC - 0 likes

    I got on WoW and did some testing, you can also try this. The self.text:SetText( "" ) didn't work as I saw the "Target" text also, so I went to LibDogTags documenation and found a RemoveFontString. This should also work for you.

    <OnLoad> 
    self:RegisterEvent("PLAYER_TARGET_CHANGED") 
    
    <OnEvent> 
    if UnitExists("target") then 
        LibStub("LibDogTag-3.0"):AddFontString(self.text, self, [[[thickoutline][( [IsPlayer ? Name:ClassColor ! IsPet ? Name:ClassColor ! IsEnemy ? Name:HostileColor ! PvP ? Name:HostileColor ! Name:ClassColor] )] ]], "Unit", { unit = "target"}) 
    else 
        LibStub("LibDogTag-3.0"):RemoveFontString(self.text) 
    end
    

    You can also do this for the focus using PLAYER_FOCUS_CHANGED a la

    <OnLoad> 
    self:RegisterEvent("PLAYER_FOCUS_CHANGED") 
    
    <OnEvent> 
    if UnitExists("focus") then 
        LibStub("LibDogTag-3.0"):AddFontString(self.text, self, [[[thickoutline][( [IsPlayer ? Name:ClassColor ! IsPet ? Name:ClassColor ! IsEnemy ? Name:HostileColor ! PvP ? Name:HostileColor ! Name:ClassColor] )] ]], "Unit", { unit = "focus"}) 
    else 
        LibStub("LibDogTag-3.0"):RemoveFontString(self.text) 
    end
    
    Last edited Oct 16, 2009 by ImpalerCore
  • Avatar of Farside1234 Farside1234 Oct 15, 2009 at 22:34 UTC - 0 likes

    Thanks again, I reworked this code:

    OnLoad

    self:RegisterEvent("UNIT_TARGET")

    self:Hide()

    OnEvent:

    if UnitExists("target") == nil then

    self:Hide()

    return

    else

    self:Show()

    return

    LibStub("LibDogTag-3.0"):AddFontString(self.text, kgPanels, [thickoutline][( [IsPlayer ? Name:ClassColor ! IsPet ? Name:ClassColor ! IsEnemy ? Name:HostileColor ! PvP ? Name:HostileColor ! Name:ClassColor] )], "Unit", { unit = "target"})

    end

    This works great. I appreciate all your help.

    Last edited Oct 15, 2009 by Farside1234
  • Avatar of ImpalerCore ImpalerCore Oct 15, 2009 at 13:19 UTC - 0 likes

    Glad to hear it's working for you!

    The issue you are describing is because the unit does not exist and DogTags still gives you a text string. You can combine your dogtag line with my kgpanel script below to set the text to "" when the unit does not exist.

    ---kgNamePanel---
    
    <OnLoad>
    self:RegisterEvent("PLAYER_TARGET_CHANGED")
    
    <OnEvent>
    if UnitExists("target") ~= nil then
        LibStub("LibDogTag-3.0"):AddFontString(self.text, kgPanels, [[[thickoutline][( [IsPlayer ? Name:ClassColor ! IsPet ? Name:ClassColor ! IsEnemy ? Name:HostileColor ! PvP ? Name:HostileColor ! Name:ClassColor] )] ]], "Unit", { unit = "target"}) 
    else
        self.text:SetText("")
    end
    
    Last edited Oct 15, 2009 by ImpalerCore
  • Avatar of Farside1234 Farside1234 Oct 14, 2009 at 23:21 UTC - 0 likes

    I have this code working:

    OnLoad:

    self:RegisterEvent("PLAYER_TARGET_CHANGED")

    OnEvent:

    LibStub("LibDogTag-3.0"):AddFontString(self.text, kgPanels, [[[thickoutline][( [IsPlayer ? Name:ClassColor ! IsPet ? Name:ClassColor ! IsEnemy ? Name:HostileColor ! PvP ? Name:HostileColor ! Name:ClassColor] )] ]], "Unit", { unit = "target"})

    Works great!,but one problem when I don't have any target I get this text in the center of the box. "Target" without the ""

    Thank you, Farside
    Last edited Oct 15, 2009 by Farside1234
  • Avatar of ImpalerCore ImpalerCore Oct 14, 2009 at 14:17 UTC - 0 likes

    There isn't a whole lot out there for glueing DogTags and kgpanels together. I did find this in a WoW forum, so you may be able to get something going.

    http://forums.worldofwarcraft.com/thread.html?topicId=15443286681&sid=1

    <OnLoad>
    self:RegisterEvent("PLAYER_ENTERING_WORLD")
    
    <OnEvent>
    LibStub("LibDogTag-3.0"):AddFontString(self.text, kgPanels, [[[thickoutline][alpha(1)][( **This part** )] ]], "Unit", { unit = "player" })
    

    First see if this works for displaying player info in a kgpanel (at work so can't try it out). Make sure DogTags or Pitbull3 is installed since it comes with DogTags.

    <OnLoad>
    self:RegisterEvent("PLAYER_ENTERING_WORLD")
    
    <OnEvent>
    LibStub("LibDogTag-3.0"):AddFontString(self.text, kgPanels, [[[thickoutline][alpha(1)][( Name:ClassColor )] ]], "Unit", { unit = "player" })
    

    The self.text field is a FontString created by kgpanels that is assigned to that frame.

    If that works, the next step is to try to see if you can get the target name. Guessing at the parameters, try this out.

    <OnLoad>
    self:RegisterEvent("PLAYER_TARGET_CHANGED")
    
    <OnEvent>
    LibStub("LibDogTag-3.0"):AddFontString(self.text, kgPanels, [[[thickoutline][alpha(1)][( Name:ClassColor )] ]], "Unit", { unit = "target" })
    

    If this displays the name of the target and updates when you change targets, you should have enough to get the rest of your dogtag in place. If you parent the frame to the target frame, it should show and hide with that frame. For Pitbull3, the target frame should be PitBullUnitFrame3 (spelling must be exact!).

    If the DogTag code doesn't work, then try the pitbull3 or dogtag forums. If you're interested in using the WoW API to setup the text, then I might be able to help you figure it out, i.e.

    (not tested)

    ---kgNamePanel---
    
    <OnLoad>
    self:RegisterEvent("PLAYER_TARGET_CHANGED")
    
    <OnEvent>
    if UnitExists("target") ~= nil then
        -- Adds a chat frame message of the target's name
        --DEFAULT_CHAT_FRAME:AddMessage( UnitName( "target" ) )
        self.text:SetText( UnitName("target") )
        local _, rclass = UnitClass("target")
        local color = RAID_CLASS_COLORS[rclass]
        self.text:SetTextColor(color.r, color.g, color.b, 1.0)
    else
        self.text:SetText("")
    end
    
    Last edited Oct 15, 2009 by ImpalerCore
  • Avatar of Farside1234 Farside1234 Oct 14, 2009 at 05:43 UTC - 0 likes

    I was hoping someone could help me with a script to add dog tags into a kgpanel,

    Example:

    (text only shows when I have a target)

    [Level:DifficultyColor] [Name:ClassColor] [Guild:Cyan]

    Note: I would like to be able to input any dog tag code in there,and make ToT or Pet the Unit.

    So basicly I need the script and where to put the parts of the script into the kgpanels.

    Thank You, Farside

  • Avatar of ImpalerCore ImpalerCore Oct 02, 2009 at 03:43 UTC - 0 likes

    Thanks for the kudos. I think your kgpanels addon is awesome, and it's been great tool to learn basic WoW UI programming. I only wish I had the artistic talent to make my own animations. I would so create a welding spark like animation that I can display when I take damage on my unitframe art.

    I've been playing with some other animation ideas, but I'm still working it out.

Facts

Date created
Sep 16, 2008
Category
Last update
Sep 10, 2013
Development stage
Release
Language
  • enUS
  • frFR
  • koKR
  • zhCN
License
All Rights Reserved
Curse link
kgPanels
Reverse relationships
1
Downloads
1,745,339
Recent files
  • R: 1.17 for 5.4.0 Sep 10, 2013
  • A: r428 for 5.4.0 Sep 10, 2013
  • R: 1.16 for 5.3.0 May 22, 2013
  • A: r426 for 5.3.0 May 22, 2013
  • A: r425 for 5.2.0 Apr 29, 2013

Authors