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 Choonster Choonster May 05, 2012 at 15:51 UTC - 0 likes

    For those wondering what the names of the various arguments to the scripts are (like I was earlier), I've looked at the function that sets up the scripts and written them below.

    self is always the panel's frame.

    • OnEvent: self, event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10
      • event is the name of the event that fired, arg1-arg10 are the arguments it supplied.

    • OnUpdate: self, elapsed
      • elapsed is the number of seconds since the last OnUpdate was fired.

    • OnClick: self, button
      • button is the name of the mouse button that clicked the panel. This will usually be LeftButton, RightButton or MiddleButton for the first three mouse buttons or ButtonN (where N is some number) for mouse buttons 4+.
      • pressed and released will be true or false (nil) depending on whether the script was triggered by a mouse down or mouse up hardware event. These variables are mentioned on the main page itself, but I thought I'd put them here anyway.
      • It's worth noting that this actually uses the OnMouseUp/OnMouseDown handlers of the frame (because frames don't have OnClick handlers), so it doesn't count as a hardware event for functions that require one (e.g. SetCurrentTitle)

    • OnSizeChanged: self, width, height
      • width and height are the new width/height of the panel.
      • These were previously in the wrong order, but were fixed in r404.

    • OnLoad: self, kgPanels
      • kgPanels is the AddOn's main table.

    • OnShow, OnHide, OnEnter, OnLeave and OnReceiveDrag all have self as their only argument.
    Last edited Jun 15, 2012 by Choonster: Updated with Kagaro's r403/r404 changes.
  • Avatar of kagaro kagaro Apr 14, 2012 at 21:33 UTC - 0 likes

    fixed

  • Avatar of victorcillo victorcillo Apr 11, 2012 at 17:21 UTC - 0 likes

    Kagaro, you put the script for OnClick, has an error and confusion can lead people to not have much idea of ​​programming, if you can change elsif - elseif, will be better, I think I broke his brain was not working because your script when I gave him to copy - paste XD

    P. D. I hope my comment did not offend you friend

  • Avatar of victorcillo victorcillo Apr 10, 2012 at 02:01 UTC - 0 likes

    @palthis: Go

    If possible make a panel button has an effect, I've done this:

    OnClick

    if pressed then

    self:SetWidth(190) self:SetHeight(55)

    elseif released then

    self:SetWidth(200) self:SetHeight(60)

    end

    Last edited Apr 10, 2012 by victorcillo
  • Avatar of victorcillo victorcillo Apr 10, 2012 at 01:56 UTC - 0 likes

    hello, my name is victor, sorry for my bad English.

    I use almost KgPanels since it was created, I have much knowledge of programming but I'm learning through Kagaro, I put a screenshot of my UI KgPanels totally made ​​by using many of the scripts present on this forum and other pages, if someone want to know as I have done any of the parts that make up that let me know by private message or just putting it here.

    http://imageshack.us/photo/my-images/706/wowscrnshot040912135024.jpg/

  • Avatar of palthis palthis Nov 22, 2011 at 06:48 UTC - 0 likes

    Is it possible to simulate a button using a panel and pressed effect?

  • Avatar of begothprincess begothprincess Nov 09, 2011 at 15:27 UTC - 0 likes

    Hi I got KG panels a long time ago and i loved the concept how ever i am not good at using photo shop. I am wondering if anyone might be able to help me create a panel. I have an img. that i want to use. Its based off the new darkmoon fair art. If you can help me do it please send me a message.

  • Avatar of HashBrownJM HashBrownJM Nov 06, 2011 at 19:03 UTC - 0 likes

    Hi all. Took a long break from WoW, finally getting back into it, and there's something I had on my old UI that I can't remember how to recreate (because it required a little bit of code in the kgPanels config menu).

    Essentially, I have three separate kgPanels that fit behind my Grid frames. One is sized for a 5-man party, one for a 10-man raid, and the other for a 25-man raid. I know there's something you can put in each of those frames's config that'll only make them show up for the appropriate party size.

    So, for example, if I'm soloing, none of them show. As soon as I enter a party, the 5-man one appears. If I join a raid, 10-man, or if it's 25, 25-man. So on and so forth.

    Does anyone know what I need to put in? It's two fields (I'll have to look up which), but it was something like scan party, then IF members are >2 and <11, show.

    Etc.

    Thanks!

  • Avatar of OneWhoSighs OneWhoSighs Sep 18, 2011 at 12:38 UTC - 0 likes

    Hi, I've been using kgpanels as a border for my target unit frame. I'm currently using the script given from the sample scripts page and there appears to be a delay when I select/deselect a target. Is there a way to reduce to remove this delay? Thanks.

  • Avatar of Phauxe Phauxe Jul 11, 2011 at 20:51 UTC - 0 likes

    Love kgpanels.

    Not sure if this is the right place for this or not.

    I have been researching for hours trying to figure if/how to create a panel to show local/server time on mouse over. Example the panel on default will show either the local or server time and then on mouse over show the opposite time.

    I have also been doing alot of research trying to get the micro menu buttons I created in kgpanels to reference thier tooltip on mouseover.

    Again sorry if im in the wrong spot, any help is appreciated.

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,888,070
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