Download
(312Kb)
Download
Updated: 03-06-13 05:57 AM
Pictures
File Info
Updated:03-06-13 05:57 AM
Created:unknown
Downloads:129,073
Favorites:619
MD5:

kgPanels  Popular! (More than 5000 hits)

Version: 1.15
by: Kagaro [More]

kgPanels, successor to eePanels. This mod allows you to place artwork in your UI. Please be sure to grab the config addon to be able to configure kgPanels. The menu is LOD so once created memory usage is minimal. This mod also allows you to attach scripts to events for each panel.

Please note the download also now includes kgPanels config as a single zip
Please see curse.com for the wiki pages
http://www.wowace.com/projects/kg-panels/pages/kg-panel-wiki

Version 1.5.3-beta
-- Compatability updates for Cataclysm
Version 1.5.2
-- Updated package for Ace3SharedMediaWidget changes.
Version 1.5
-- Fixes in embeds for disembedded usage
Version 1.4.0
-- Fixes for vanishing buttons with new Ace3
Version 1.39
-- Add libDualSpec support
Version 1.38
-- Fix for the FrameFidner function
Version 1.37
-- API changes for 3.3.3

Toc update for 3.1, fix for kgPanelsConfig to be up to date toc
Updates for 3.2
Post A Reply Comment Options
Unread 02-21-10, 01:05 PM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 6
Originally posted by gruff.ovelen
Hoping for some assistance with a script from people smarter than me...
I have 3 panels (buttons): #0 shows action bars, #1 shows skada, and #2 shows minimaps. OnClicks for each work fine to show / hide.

I'd like to swap to skada automatically in combat (b/c skada auto swaps to threat while in combat), but return to my previous view at the end of combat. (i.e. if bars are active and i enter combat, skada displays; once combat ends skada hides and I'm back at bars).

Here's my current code:

OnLoad
Code:
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
OnEvent
Code:
local enter, exit
if (event == "PLAYER_REGEN_DISABLED") then -- entering combat
  if  BT4Bar3:IsVisible() then enter = 0 -- bars
    elseif SkadaBarWindowMain:IsVisible() then enter = 1 -- skada
    else enter = 2 -- maps
  end
  exit = enter -- save start state for exit   
    if enter == 0 then
    -- show skada and hide bars
    elseif enter == 2 then
    -- show skada and hide maps
  end
elseif (event == "PLAYER_REGEN_ENABLED") then -- exiting combat
  if exit == 0 then 
    -- hide skada and show action bars
  elseif exit == 2 then 
    -- hide skada and show maps
  end
end
My Problem:
  • My exit variable is not updated (lua error of variable not defined or nil). Best guess is localization / scoping issue (trying to update variable defined outside current chunk).
  • moving the enter assignement code above the if / elseif combat checks always results in the end state = 2 (skada) (because thats where i am when the event fires).
I'd really appreciate any suggestions!
Your scoping enter and exit local to the function, so they only exist for the function call. make them part of the object
in onLoad create them as self.enter=0; self.exit=0 now you can use them inbetween function calls
Report comment to moderator  
Reply With Quote
Unread 02-19-10, 08:15 AM  
karmamuscle
A Cobalt Mageweaver
 
karmamuscle's Avatar
AddOn Author - Click to view AddOns

Forum posts: 205
File comments: 173
Uploads: 1
How would I go about making a panel only visible when the spell Shadow Weaving has reached 5 stacks?
Report comment to moderator  
Reply With Quote
Unread 02-18-10, 08:49 PM  
gruff.ovelen
A Defias Bandit
 
gruff.ovelen's Avatar

Forum posts: 2
File comments: 1
Uploads: 0
Hoping for some assistance with a script from people smarter than me...
I have 3 panels (buttons): #0 shows action bars, #1 shows skada, and #2 shows minimaps. OnClicks for each work fine to show / hide.

I'd like to swap to skada automatically in combat (b/c skada auto swaps to threat while in combat), but return to my previous view at the end of combat. (i.e. if bars are active and i enter combat, skada displays; once combat ends skada hides and I'm back at bars).

Here's my current code:

OnLoad
Code:
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
OnEvent
Code:
local enter, exit
if (event == "PLAYER_REGEN_DISABLED") then -- entering combat
  if  BT4Bar3:IsVisible() then enter = 0 -- bars
    elseif SkadaBarWindowMain:IsVisible() then enter = 1 -- skada
    else enter = 2 -- maps
  end
  exit = enter -- save start state for exit   
    if enter == 0 then
    -- show skada and hide bars
    elseif enter == 2 then
    -- show skada and hide maps
  end
elseif (event == "PLAYER_REGEN_ENABLED") then -- exiting combat
  if exit == 0 then 
    -- hide skada and show action bars
  elseif exit == 2 then 
    -- hide skada and show maps
  end
end
My Problem:
  • My exit variable is not updated (lua error of variable not defined or nil). Best guess is localization / scoping issue (trying to update variable defined outside current chunk).
  • moving the enter assignement code above the if / elseif combat checks always results in the end state = 2 (skada) (because thats where i am when the event fires).
I'd really appreciate any suggestions!
__________________
Pea's out...
Target Dummies
Report comment to moderator  
Reply With Quote
Unread 02-09-10, 05:45 PM  
Ayuki
A Kobold Labourer

Forum posts: 0
File comments: 17
Uploads: 0
need script help

Im trying to fix this for Recount but... it aint working so well for me ;P i took most of it from a working one for omen
Code:
class = UnitClass("player");
if class == "Krieger" or class == "Kriegerin" or class == "Warrior" then
    barcolor1 = {r=1,g=0.78,b=0.55,a=1}
..........
end

Recount.db.profile.Colors.Bar["Total Bar"] = barcolor1
edit fixed it...
Last edited by Ayuki : 02-10-10 at 01:02 PM.
Report comment to moderator  
Reply With Quote
Unread 02-09-10, 10:24 AM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 6
Re: Re: Re: Scripting text display

Originally posted by cormanthor
The odd part is, this media package adds itself to sharedMedia. It works with pretty much every other addon package (pMinimap, ForteXorcist, MSBT, etc.). I wasn't sure if I was just doing it wrong or what.
You know I wasnt paying enough attention

self.text:SetFont(kgPanels:FetchFont("Emblem"),10);
Report comment to moderator  
Reply With Quote
Unread 02-09-10, 12:51 AM  
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations

Forum posts: 97
File comments: 49
Uploads: 1
Re: Re: Scripting text display

Originally posted by Kagaro
For fonts to be used in kgPanels, they need to add themselves to libsharedMedia
The odd part is, this media package adds itself to sharedMedia. It works with pretty much every other addon package (pMinimap, ForteXorcist, MSBT, etc.). I wasn't sure if I was just doing it wrong or what.
__________________
Some days it's just not worth chewing through the restraints...
Report comment to moderator  
Reply With Quote
Unread 02-08-10, 08:21 PM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 6
Re: Scripting text display

Originally posted by cormanthor
I've been successful thus far in setting up a script to change the text field for a panel. My only hang up is the font face and size. I have Grizzly Shared Media installed and working everywhere else. But the font dropdown is greyed out on kgPanels.
Code:
self.text:SetFont("Emblem",10);
isn't working for me, and I am not sure how to use the SetPoint function as well.
For fonts to be used in kgPanels, they need to add themselves to libsharedMedia
Report comment to moderator  
Reply With Quote
Unread 02-08-10, 11:50 AM  
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations

Forum posts: 97
File comments: 49
Uploads: 1
Scripting text display

I've been successful thus far in setting up a script to change the text field for a panel. My only hang up is the font face and size. I have Grizzly Shared Media installed and working everywhere else. But the font dropdown is greyed out on kgPanels.
Code:
self.text:SetFont("Emblem",10);
isn't working for me, and I am not sure how to use the SetPoint function as well.
__________________
Some days it's just not worth chewing through the restraints...
Report comment to moderator  
Reply With Quote
Unread 02-07-10, 02:36 PM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 6
Originally posted by xtoq
I am a newb too, but I'd imagine you'd have to tell it somewhere somehow that you want this to start on your focus. Just a thought though.
most likely cause you want
UNIT_SPELLCAST_START
UNIT_SPELLCAST_STOP
UNIT_SPELLCAST_INTERRUPTED

then you need to check arg1 (the unit) to see if it is the unit you want.
Report comment to moderator  
Reply With Quote
Unread 02-07-10, 02:30 PM  
xtoq
An Aku'mai Servant
 
xtoq's Avatar
AddOn Author - Click to view AddOns

Forum posts: 32
File comments: 642
Uploads: 4
Originally posted by Paloladin
I'm trying to show a panel when my focus target casts a spell and then hide it when the spell ends. I have the following in the scripts for the panel Im trying to get to do this but it doesnt do anything at all. Complete newb at scripting can anyone help me out with this? Id appreciate it immensely.

OnLoad Section:
self:RegisterEvent("SPELLCAST_START")
self:RegisterEvent("SPELLCAST_STOP")
self:RegisterEvent("SPELLCAST_INTERRUPTED")
self:Hide()

OnEvent Section:
if event == "SPELLCAST_START" then
self:Show()
elseif event == "SPELLCAST_STOP" then
self:Hide()
elseif event =="SPELLCAST_INTERRUPTED" then
self:Hide()
end
I am a newb too, but I'd imagine you'd have to tell it somewhere somehow that you want this to start on your focus. Just a thought though.
__________________
There is absolutely no evidence to support the theory that life is serious.
Report comment to moderator  
Reply With Quote
Unread 02-04-10, 12:42 PM  
Warschild
A Murloc Raider

Forum posts: 7
File comments: 14
Uploads: 0
Smooth movement script?

Looking for help, but I warn you... not for the feint of heart!

Let's say I have a frame that I want to move depending on whether I'm in Orgrimmar or not. I know how to make the frame just jump right to the new location... but what I'm looking for is a way to make it kinda glide over. A smooth transition from one position to the other.

Does anyone have a script that I could tinker around with? Sadly, I can usually tinker enough to get things working but I'm not experienced enough to make things from scratch ........ yet.

Thanks.
Report comment to moderator  
Reply With Quote
Unread 01-25-10, 09:43 PM  
Paloladin
A Kobold Labourer
AddOn Compiler - Click to view compilations

Forum posts: 0
File comments: 11
Uploads: 1
I'm trying to show a panel when my focus target casts a spell and then hide it when the spell ends. I have the following in the scripts for the panel Im trying to get to do this but it doesnt do anything at all. Complete newb at scripting can anyone help me out with this? Id appreciate it immensely.

OnLoad Section:
self:RegisterEvent("SPELLCAST_START")
self:RegisterEvent("SPELLCAST_STOP")
self:RegisterEvent("SPELLCAST_INTERRUPTED")
self:Hide()

OnEvent Section:
if event == "SPELLCAST_START" then
self:Show()
elseif event == "SPELLCAST_STOP" then
self:Hide()
elseif event =="SPELLCAST_INTERRUPTED" then
self:Hide()
end
Report comment to moderator  
Reply With Quote
Unread 01-12-10, 12:41 PM  
Finalflo
A Deviate Faerie Dragon
AddOn Compiler - Click to view compilations

Forum posts: 16
File comments: 149
Uploads: 1
Hy,

I would like to make a Panel auto/hide when mouse is not over.

I think it has to do with OnEnter and OnLeave but I don't know what to put in script.

Thanks !
__________________

Report comment to moderator  
Reply With Quote
Unread 01-01-10, 05:52 AM  
Meldir
A Kobold Labourer
AddOn Compiler - Click to view compilations

Forum posts: 0
File comments: 20
Uploads: 1
i tried many things now but get nothing to work

my problem:
I want to have a real square panel with a squared border, i think its very simple, but i fail this so hard ... the standard blizzard tooltip has rounded edges and i want some nice borders like this:

http://s.wowinterface.com/preview/pvw34951.jpg

pls help me, i know question is not that hard but how i said ... I FAIL
Report comment to moderator  
Reply With Quote
Unread 12-22-09, 02:18 PM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 6
Re: scripting-hide show

Originally posted by coehl
I posted this in the forums also, but wasn't getting a lot of results there.
--------------------------------------
Hi there, I have a couple questions.

I have a tabbing system in my UI, so you can select a "meters" tab to view your meters, and a "bars" tab to view extra action bars, etc. Let's look at a sample code:
SkadaBarWindowthreat:Show()
SkadaBarWindowSkada:Show()
BT4BarBagBar:Hide()
BT4BarStanceBar:Hide()
BT4Bar5:Hide()
BT4Bar6:Hide()
BT4Bar7:Hide()

This will work so long as the two specific windows in Skada exist and the specific bars in bartender are enabled (and both addons are available). My system's a lot more complicated than this, so there are a lot of elements, all of which NEED to exist (be turned on/installed) or the scripts lose their references and start giving me the brown lua crown.

I know I can resolve this with if statments that check for existence of the objects first. What kind of syntax do I use?

I tried something like this

if SkadaBarWindowThreat:Exists() then
SkadaBarWindowthreat:Show()
if SkadaBarWindowSkada:Exists() then
SkadaBarWindowthreat:Show()
end

--------------------------------------

Also, I have some buttons that I want to simply toggle some elements. I'm using the OnClick event I thought it would be straight forward, but what it does is it hides/shows the element for as long as the mouse button is held. Once released, it reverts back to what it was in the first place.

Here's the script I use to attempt it

if BT4Bar3:IsVisible() then
BT4Bar3:Hide()
else
BT4Bar3:Show()
end

-------------------------------------
Lastly, I cannot find anything that documents how to invoke a command or macro. Is this because of the whole "secure actions" issue?
I want a panel that I can click that invokes the
/grid standby
command. Otherwise, if I just hide Grid, Grid will come back up eventually probably due to refreshing of itself.


Any help that I can get on any of these three issues is most appreciated.
You can do
Code:
if SkadaBarWindowThreat then
   -- do stuff to that bar, its a global variable so if skada didnt load/not loaded
   -- you check for it here
end
For your click actions
Panels didnt have a click handler just mouse pressed and released
there is a vairable that is set to tru so you can react appropiatly

i.e. if pressed
OR
if released

Sorry but that was done so you could do not only OnEnter andOnLeave
but make choices based on click state.
Code:
if BT4Bar3:IsVisible() and presssed then
BT4Bar3:Hide()
else if pressed then
BT4Bar3:Show()
end
And for third, yes thats securebutton code stuff, if you really want in your onLoad, you could create a Securebutton, parent it to your panel and plac eit above the panel itself and add a secureclick action.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.