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 ImpalerCore ImpalerCore Oct 27, 2009 at 15:42 UTC - 0 likes

    I've not done any vehicle based stuff, but I can make a guess.

    <OnLoad>
    self:RegisterEvent ("UNIT_ENTERED_VEHICLE")
    self:RegisterEvent ("UNIT_EXITED_VEHICLE")
    
    <OnEvent>
    if event == "UNIT_ENTERED_VEHICLE" then
        self:Hide()
    elseif event == "UNIT_EXITED_VEHICLE" then
        self:Show()
    end
    

    To hide all the unitframes, you would need to invoke Hide() on all the respective global references to those frames. For Pitbull3, this can be something akin to

    PitBullUnitFrame1:Hide()
    PitBullUnitFrame2:Hide()
    ...
    PitBullUnitFrame7:Hide()
    

    Use the frame finder to create a list of unit frames you want to hide and add them to the OnEvent of your kgpanel. If you have kgpanel decorations to those frames, they should hide as well if they are parented properly.

    For changing the minimap location, you need to again find its frame name, and you can move it using the SetPoint command.

    http://www.wowwiki.com/API_Region_SetPoint

    You can use UIParent as the relative frame and "CENTER" as the relative point to center it on screen, and use ofsx and ofsy to position it. You should be able to anchor it to any corner using some combination of "TOP", "LEFT", "BOTTOM", and "RIGHT".

    If you're using the regular blizzard minimap frame, I think its name is just Minimap, so you could do something like this.

    <OnLoad>
    self:RegisterEvent ("UNIT_ENTERED_VEHICLE")
    self:RegisterEvent ("UNIT_EXITED_VEHICLE")
    
    <OnEvent>
    if event == "UNIT_ENTERED_VEHICLE" then
        Minimap:SetPoint( "CENTER", "UIParent", "CENTER", 0, 0 )
    elseif event == "UNIT_EXITED_VEHICLE" then
        Minimap:SetPoint( "CENTER", "UIParent", "CENTER", 100, 100 )
    end
    

    If you use a minimap addon, you'll have to use a different name. Again use the frame finder.

    As far as individual vehicle frame names, I do not know. There is a UnitInVehicle API function to determine whether a unit is in a vehicle, like UnitInVehicle( 'player' ), but nothing specific to vehicle name that I could find after a 5 min google search. Getting the vehicle name could be implemented in an addon somewhere, but I currently don't know how to do it.

    http://wowprogramming.com/utils/xmlbrowser is a good resource to look up how to do things as well if you get stuck and you have time to browse for vehicle name. If you get something working, it would be nice to post back to further the kgpanel script kiddies.

    Good luck!

  • Avatar of arturogatti arturogatti Oct 27, 2009 at 05:23 UTC - 0 likes

    Is there a way to see the vehicles frame name?

    Do they all have the same frame name? or is there a specific name for each one of them? (i mean.. the diferent type of vehicles... wintergrasp cannons, argent tournament lance mounts, etc...)

    Anyway... How do I make all my UI Frames Hide when i enter a vehicle?

    and...

    Is there a script for changing my minimap place (x,y) in the screen when i enter a vehicle?

    Thanks in advance ;)

  • Avatar of arturogatti arturogatti Oct 26, 2009 at 15:32 UTC - 0 likes

    Finished trying it... works 100% :D

    It wasnt the case sensitive problem... I accidently had a <space> in the end of the Pitbull4_Frames_targettarget XD

    Anyway... once again..

    Ty very much! ;)

  • Avatar of ImpalerCore ImpalerCore Oct 26, 2009 at 14:01 UTC - 0 likes

    Are you still having issues arturo? You have to be careful that the case of the letters in the name is exact.

  • Avatar of zernon916 zernon916 Oct 24, 2009 at 18:40 UTC - 0 likes

    For Pitbull4 I used: Anchor = Pitbull4_Frames_targettarget Parent = Pitbull4_Frames_targettarget

    Dont capitalize Targettarget. It is cap sensitive. targettarget is the correct way :)

  • Avatar of arturogatti arturogatti Oct 24, 2009 at 03:12 UTC - 0 likes

    hmm... i think im doing it all correctly but the frame doesnt load when the Pitbull4_Frames_Targettarget shows. (yes, im using pitbull4)

    i think im parenting it well...

    im setting "PitBull4_Frames_targettarget" on both Parent Frame and Anchor Frame. They're both set to Center.

    so... am i missing somethin? :x

    thanks once again ;)

  • Avatar of ImpalerCore ImpalerCore Oct 23, 2009 at 21:14 UTC - 0 likes

    If these panels are decorations, then it should be as simple as using the frame finder to find the name of the Pitbull Frame, and then just set the parent of your kgpanel to that frame.

    I.E. for Pitbull3, the TargetOfTarget frame should be PitBullUnitFrame3, so that would be the name you would enter as the parent of your kgpanel.

    Use the frame finder on the pet frame and parent it to that and you should be set.

  • 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

Facts

Date created
Sep 16, 2008
Category
Last update
Jun 23, 2015
Development stage
Release
Language
  • enUS
  • frFR
  • koKR
  • zhCN
License
All Rights Reserved
Curse link
kgPanels
Reverse relationships
1
Downloads
1,923,235
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

Authors