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 kagaro kagaro Oct 27, 2010 at 20:22 UTC - 0 likes

    The OnLoad script, isnt executing cause kgPanels fakes OnLoad as the panels can be created well before the parents and ancors exists. The faked OnLoad is done via a hidden function called InitScripts, which in turns runs the attached onLoad after the parents and anchors come into existence. Also OnLoad in your context below would never work, as by time you can fetch the panel, OnLoad has already executed. (onLoad works best with XML files as it calls that after CreateFrame executes.) So your best is instead of fuding the onLoad, to directly just set the backdrop and alhpa. IF you want this to be permanement base on clicks, then your gonna need to mess with the saved variables[]['KgPanel5"].scripts["LOAD"] =" You script as text here"

    I Really dont advise you doing that, as you could corrupt your saved variables.

    As for the first function, where are you defining it? if you want to make it global to your scripts I suggest more along the lines of: In an OnLoad script

    kgPanels.MoveTo = function(...)
    .. code here ...

    so in OnClick you could do kgPanels:MoveTo(self, .....)

  • Avatar of DasFaultier DasFaultier Oct 27, 2010 at 20:09 UTC - 0 likes

    Hey Kagaro.

    I worked out 2 Scripts with a mate, but they don't want to work. Both are called by 'OnClick' First, to move a panel out of the frame:

    function kgPanels_MoveTo(Panel, newX, newY, moveDelay, moveStep, SavedTime)
    	if GetTime()-SavedTime <= moveDelay then
    		local point, relativeTo, relativePoint, posX, posY = Panel:GetPoint()
    		if posX == newX and posY == newY then return end
    		if posX < newX then
    			posX = posX+(moveStep or 1)
    		if posY < newY then
    			posY = posY+(moveStep or 1)
    		if posX > newX then
    			posX = newX
    		if posY > newY then
    			posY = newY
    		Panel:SetPoint(point, relativeTo, relativePoint, posX, posY)
    		SavedTime = GetTime()
    		kgPanels_MoveTo(Panel, newX, newY, moveDelay, moveStep, SavedTime)
    -- Usage: kgPanels_MoveTo(frame, posX, posY, interval (seconds), steps, GetTime()) - kgPanels_MoveTo(self, 1000, 1000, 0.1, 10, GetTime()) - will move frame "self" to 1000, 1000. Moving 10 pixels every 0.1 seconds.

    and second, to Change the OnLoad script of a frame by clicking another frame:

    local Panel5 = kgPanels:FetchFrame("KgPanel5")
    Panel5:SetScript("OnLoad", self:SetBackdropBorderColor(0.77, 0.12, 0.23, 1)) 

    Both of them don't work. Any ideas?

  • Avatar of 3dfxorchid 3dfxorchid Oct 19, 2010 at 16:02 UTC - 0 likes

    how is it to make in an simple script to show the money from a char, i only found big scripts, is this posible to make?


  • Avatar of kagaro kagaro Oct 19, 2010 at 00:52 UTC - 0 likes

    ok applied a fix that should resolve the issues

  • Avatar of kagaro kagaro Oct 19, 2010 at 00:05 UTC - 0 likes

    bear with me, im trying to fix 2 problems without causing people to change anything.

  • Avatar of trotskyicepick trotskyicepick Oct 18, 2010 at 23:48 UTC - 0 likes

    How on earth did you discover that? Looks OK now.....thanks.

  • Avatar of kcuhc kcuhc Oct 18, 2010 at 23:07 UTC - 0 likes

    This error is not happening on all my character since the last update. 2 of my toons' layouts are fine. But one is destroyed. Lets see....

    Change Background Color Style from "Solid" to "None" on the offending texture-based panels. This fixes the problem. And the toons where the Panels were working fine, this was already set to "None"

    Last edited Oct 18, 2010 by kcuhc
  • Avatar of kittykatmax kittykatmax Oct 18, 2010 at 22:29 UTC - 0 likes

    I am having the same problem - white panels for most of the art that was working just fine previously. Deleting and recreating the panels doesn't fix the issue.

  • Avatar of trotskyicepick trotskyicepick Oct 18, 2010 at 22:10 UTC - 0 likes

    Please see

    My panels replaced by white block after last update.

  • Avatar of kagaro kagaro Oct 18, 2010 at 20:50 UTC - 0 likes

    kcuhc .. fixed, in next


Date created
Sep 16, 2008
Last update
Sep 10, 2013
Development stage
  • enUS
  • frFR
  • koKR
  • zhCN
All Rights Reserved
Curse link
Reverse relationships
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