Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(312 Kb)
Download
Updated: 03-06-13 05:57 AM
Pictures
File Info
Updated:03-06-13 05:57 AM
Created:unknown
Downloads:113,086
Favorites:639
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
Archived Files (14)
File Name
Version
Size
Author
Date
v1.5.4.4
288kB
Kagaro
12-05-10 12:52 PM
v1.5.3-beta
227kB
Kagaro
09-04-10 03:25 PM
v1.5.2
226kB
Kagaro
07-20-10 05:32 AM
v1.38
218kB
Kagaro
03-25-10 08:04 AM
v1.37
216kB
Kagaro
03-23-10 08:44 AM
v1.36
215kB
Kagaro
02-07-10 12:09 PM
v1.33
206kB
Kagaro
08-07-09 05:51 AM
v1.32
206kB
Kagaro
07-28-09 02:54 AM
v1.29
212kB
Kagaro
04-22-09 09:30 AM
v1.27
204kB
Kagaro
03-28-09 12:26 PM
v1.26
202kB
Kagaro
03-24-09 08:02 AM
v1.24
201kB
Kagaro
03-21-09 06:26 PM
v1.20
192kB
Kagaro
03-10-09 11:59 AM
78841
31kB
Kagaro
07-22-08 01:01 PM


Post A Reply Comment Options
Unread 03-25-10, 07:38 AM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 9
Re: frame finder

Originally posted by timberbear60
Pretty much a noob when it comes to kgpanels,but I'm learning and I love this mod. One small problem, I have bound a key to the frame finder but it doesn't seem to work. When I press the bound key with my mouse hovering over a frame the frame finder window pops up but there is nothing listed. I have tried it on Dominos bars which has worked in the past, along with chinchilla and Shadowed Unit Frames. Any suggestions? Is there another way to get frame ID's? Any help would be greatly appreciated. Thanks for all your work on this.
Ill double check it today, part of 3.3.3 was a change to how mouseOver api call was done.
Kagaro is offline Report comment to moderator  
Reply With Quote
Unread 03-23-10, 04:06 PM  
timberbear60
A Murloc Raider

Forum posts: 9
File comments: 36
Uploads: 0
frame finder

Pretty much a noob when it comes to kgpanels,but I'm learning and I love this mod. One small problem, I have bound a key to the frame finder but it doesn't seem to work. When I press the bound key with my mouse hovering over a frame the frame finder window pops up but there is nothing listed. I have tried it on Dominos bars which has worked in the past, along with chinchilla and Shadowed Unit Frames. Any suggestions? Is there another way to get frame ID's? Any help would be greatly appreciated. Thanks for all your work on this.
timberbear60 is offline Report comment to moderator  
Reply With Quote
Unread 03-04-10, 06:11 AM  
Halstrom
A Deviate Faerie Dragon
 
Halstrom's Avatar
AddOn Compiler - Click to view compilations

Forum posts: 19
File comments: 14
Uploads: 4
oRA2 Main tanks

Hey,

Am currently trying to set panels to the oRA2 main tank frames...

I figured I need three panels - one to show when there are 2 main tanks, one to show when there are 3 main tanks and one to show when there are 4 main tanks.

I tried parenting but the obvious problem was that the panel parented to the second main tank would remain showing when a third tank and the third tank panel was added.

Ditto for four tanks: the fourth tank panel would show, but so would the third tank and second tank panels too, making a bit of a mess.

I guess there's scripting options to help with this? But I'm pretty much .lua illiterate and have spent a good few hours combing the interwebs to little avail.

I got something like this for each panel, but it seems to have totally borked kgpanels if I enter it and it won't load any of my panels at all! So have just ditched it for now but figured I'd come ask for some help.

There's probably a really simple script but I have no idea what that'd be.

At the moment, I've got:

OnLoad:

self:RegisterEvent("oRA_MainTankUpdate")
self:RegisterEvent("oRA_JoinedRaid", "oRA_MainTankUpdate")
self:RegisterCheck("GETMT", "oRA_Broadcast")
self:Hide()
OnEvent

--Two tanks panels:
if UnitExists("oRAMainTankUnitButton2") == nil then
self:Hide()
elseif UnitExists("oRAMainTankUnitButton2") == true then
self:Show()
elseif UnitExists("oRAMainTankUnitButton3") == true then
self:Hide()
elseif UnitExists("oRAMainTankUnitButton4") == true then
self:Hide()

--Three tanks panel:
if UnitExists("oRAMainTankUnitButton3") == nil then
self:Hide()
elseif UnitExists("oRAMainTankUnitButton3") == true then
self:Show()
elseif UnitExists("oRAMainTankUnitButton4") == true then
self:Hide()

--Four tanks panel:
if UnitExists("oRAMainTankUnitButton4") == nil then
self:Hide()
elseif UnitExists("oRAMainTankUnitButton4") == true then
self:Show()

end

This, as I said, borkes kgpanels fullstop lol, so must be very wrong.

Is there something ridiculously simple I've missed here? Please halp!
__________________
Last edited by Halstrom : 03-04-10 at 06:45 AM.
Halstrom is offline Report comment to moderator  
Reply With Quote
Unread 02-27-10, 07:21 PM  
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations

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

Originally posted by Kagaro
You know I wasnt paying enough attention

self.text:SetFont(kgPanels:FetchFont("Emblem"),10);
Oh, btw, it also works if you explicitly address the font:
Code:
self.text:SetFont("\\Interface\\Addons\\GrizzlySharedMedia\\fonts\\Emblem",10,"OUTLINE")
/cheers
__________________
Some days it's just not worth chewing through the restraints...
cormanthor is offline Report comment to moderator  
Reply With Quote
Unread 02-24-10, 10:50 AM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 9
Re: Re: Re: KGPanels and Vuhdo

Originally posted by Johnychemist
So it seems that right now the only static names available with vuhdo is the group frame name and button name checked with /framestack doesn't seem to be a button frame name available. On KGPanels front is there any work arounds for that? Any reason why the button name will not work?
Only to say that as the unit frame button objects are secure and have special handling. You should be able to parent to parent and anchor to them, not sure why you cant.
Kagaro is offline Report comment to moderator  
Reply With Quote
Unread 02-24-10, 10:48 AM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 9
Originally posted by Angrysteel
For some reason i am unable to get KGpanels to work on the PTR.

I cant remember the last time the PTR broke KGpanels, so maybe i am just doing something wrong.


Has anyone else tried this mod with success on the PTR?

EDIT:

Message: Interface\AddOns\kgPanels\kgPanels.lua:766: attempt to call method 'SetTexCoordModifiesRect' (a nil value)
Time: 02/23/10 11:33:33
Count: 1
Stack: Interface\AddOns\kgPanels\kgPanels.lua:766: in function `ResetTextures'
Interface\AddOns\kgPanels\kgPanels.lua:670: in function `PlaceFrame'
Interface\AddOns\kgPanels\kgPanels.lua:582: in function `ApplyLayout'
Interface\AddOns\kgPanels\kgPanels.lua:566: in function `ActivateLayout'
Interface\AddOns\kgPanelsConfig\LayoutHelper.lua:161: in function `ActivateLayout'
Interface\AddOns\kgPanelsConfig\LayoutHelper.lua:55: in function <Interface\AddOns\kgPanelsConfig\LayoutHelper.lua:55>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[3]"]:9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?
...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:796: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:611>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[4]"]:9: in function <[string "safecall Dispatcher[4]"]:5>
(tail call): ?
...ce\AddOns\AuctionLite\Libs\AceGUI-3.0\AceGUI-3.0.lua:326: in function `Fire'
...Lite\Libs\AceGUI-3.0\widgets\AceGUIWidget-Button.lua:27: in function <...Lite\Libs\AceGUI-3.0\widgets\AceGUIWidget-Button.lua:26>

Locals: self = <table> {
SetDefaultModuleLibraries = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:381
FetchFont = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:354
SetupScript = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:857
OnInitialize = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:398
NewModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:255
EnableModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:346
modules = <table> {
}
GetModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:230
IterateEmbeds = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:456
ResetFont = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:839
defaultModuleLibraries = <table> {
}
eframe = kgPanels_Dep_Frame {
}
UnregisterChatCommand = <function> defined @Interface\AddOns\AuctionLite\Libs\AceConsole-3.0\AceConsole-3.0.lua:111
Printf = <function> defined @Interface\AddOns\AuctionLite\Libs\AceConsole-3.0\AceConsole-3.0.lua:69
angles = <table> {
}
GetName = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:298
AddMissingMedia = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:431
ReParent = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:598
name = "kgPanels"
FetchArt = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:351
IsEnabled = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:465
CommandLine = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:508
DisableModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:364
RemoveFrame = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:613
parents = <table> {
}
GetArgs = <function> defined @Interface\AddOns\AuctionLite\Libs\AceConsole-3.0\AceConsole-3.0.lua:144
Print = <function> defined @Interface\AddOns\AuctionLite\Libs\AceConsole-3.0\AceConsole-3.0.lua:54
active = "Gumpster"
flip = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:188
baseName = "kgPanels"
ResetParent = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:700
IsModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:482
db = <table> {
}
SetDefaultModuleState = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:401
PlaceFrame = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:665
ResetTextures = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:763
SetEnabledState = <function> defined @I


I guess i now see it is broke on PTR, do you have a PTR version on Wowace somewhere? Was unable to find it if so.
That appears to be a blizzard bug, other addons are having issues as well with that function call. At this point unable to tell if blizzard is removing the function or just an oversight.
Kagaro is offline Report comment to moderator  
Reply With Quote
Unread 02-23-10, 08:35 PM  
Johnychemist
A Kobold Labourer

Forum posts: 0
File comments: 7
Uploads: 0
Re: Re: KGPanels and Vuhdo

Originally posted by Kagaro
You want to anchro + parent to the frame and not the unit button itself.

So it seems that right now the only static names available with vuhdo is the group frame name and button name checked with /framestack doesn't seem to be a button frame name available. On KGPanels front is there any work arounds for that? Any reason why the button name will not work?
Johnychemist is offline Report comment to moderator  
Reply With Quote
Unread 02-23-10, 11:23 AM  
Angrysteel
A Murloc Raider

Forum posts: 6
File comments: 206
Uploads: 0
For some reason i am unable to get KGpanels to work on the PTR.

I cant remember the last time the PTR broke KGpanels, so maybe i am just doing something wrong.


Has anyone else tried this mod with success on the PTR?

EDIT:

Message: Interface\AddOns\kgPanels\kgPanels.lua:766: attempt to call method 'SetTexCoordModifiesRect' (a nil value)
Time: 02/23/10 11:33:33
Count: 1
Stack: Interface\AddOns\kgPanels\kgPanels.lua:766: in function `ResetTextures'
Interface\AddOns\kgPanels\kgPanels.lua:670: in function `PlaceFrame'
Interface\AddOns\kgPanels\kgPanels.lua:582: in function `ApplyLayout'
Interface\AddOns\kgPanels\kgPanels.lua:566: in function `ActivateLayout'
Interface\AddOns\kgPanelsConfig\LayoutHelper.lua:161: in function `ActivateLayout'
Interface\AddOns\kgPanelsConfig\LayoutHelper.lua:55: in function <Interface\AddOns\kgPanelsConfig\LayoutHelper.lua:55>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[3]"]:9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?
...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:796: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:611>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[4]"]:9: in function <[string "safecall Dispatcher[4]"]:5>
(tail call): ?
...ce\AddOns\AuctionLite\Libs\AceGUI-3.0\AceGUI-3.0.lua:326: in function `Fire'
...Lite\Libs\AceGUI-3.0\widgets\AceGUIWidget-Button.lua:27: in function <...Lite\Libs\AceGUI-3.0\widgets\AceGUIWidget-Button.lua:26>

Locals: self = <table> {
SetDefaultModuleLibraries = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:381
FetchFont = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:354
SetupScript = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:857
OnInitialize = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:398
NewModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:255
EnableModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:346
modules = <table> {
}
GetModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:230
IterateEmbeds = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:456
ResetFont = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:839
defaultModuleLibraries = <table> {
}
eframe = kgPanels_Dep_Frame {
}
UnregisterChatCommand = <function> defined @Interface\AddOns\AuctionLite\Libs\AceConsole-3.0\AceConsole-3.0.lua:111
Printf = <function> defined @Interface\AddOns\AuctionLite\Libs\AceConsole-3.0\AceConsole-3.0.lua:69
angles = <table> {
}
GetName = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:298
AddMissingMedia = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:431
ReParent = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:598
name = "kgPanels"
FetchArt = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:351
IsEnabled = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:465
CommandLine = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:508
DisableModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:364
RemoveFrame = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:613
parents = <table> {
}
GetArgs = <function> defined @Interface\AddOns\AuctionLite\Libs\AceConsole-3.0\AceConsole-3.0.lua:144
Print = <function> defined @Interface\AddOns\AuctionLite\Libs\AceConsole-3.0\AceConsole-3.0.lua:54
active = "Gumpster"
flip = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:188
baseName = "kgPanels"
ResetParent = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:700
IsModule = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:482
db = <table> {
}
SetDefaultModuleState = <function> defined @Interface\AddOns\AuctionLite\Libs\AceAddon-3.0\AceAddon-3.0.lua:401
PlaceFrame = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:665
ResetTextures = <function> defined @Interface\AddOns\kgPanels\kgPanels.lua:763
SetEnabledState = <function> defined @I


I guess i now see it is broke on PTR, do you have a PTR version on Wowace somewhere? Was unable to find it if so.
Last edited by Angrysteel : 02-23-10 at 11:37 AM.
Angrysteel is offline Report comment to moderator  
Reply With Quote
Unread 02-23-10, 10:45 AM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 9
Re: KGPanels and Vuhdo

Originally posted by Johnychemist
Has anyone got anyexperience with KGP and Vuhdo?

I'm trying to parent and anchor frames to each Vuhdo player unit... i.e. Group 1 PLayer 1 - 5, if any member of the group leaves that frame disappears, and so on.

/print GetMouseFocus():GetName() gives me the correct frame names to parent to, and this has been verified with the author. The individual frame name for Group 1 player 1 is VdAc1HlU2 but on parent and anchor the frame disapears, even though the Vuhdo unit frame is still visible.

If its important at all my res is 1920 x 1200, I thought since on some frame anchoring with other UI areas the frame has moved on position that it could have moved off the screen, but after playing about for some time don;t think thats the case. (Reset position to x = 0, y = 0)

Vuhdo author comments can be found at http://www.wowinterface.com/download....html#comments

Any ideas or suggestions welcome.

Thanks.
You want to anchro + parent to the frame and not the unit button itself.
Kagaro is offline Report comment to moderator  
Reply With Quote
Unread 02-22-10, 08:10 AM  
Johnychemist
A Kobold Labourer

Forum posts: 0
File comments: 7
Uploads: 0
KGPanels and Vuhdo

Has anyone got anyexperience with KGP and Vuhdo?

I'm trying to parent and anchor frames to each Vuhdo player unit... i.e. Group 1 PLayer 1 - 5, if any member of the group leaves that frame disappears, and so on.

/print GetMouseFocus():GetName() gives me the correct frame names to parent to, and this has been verified with the author. The individual frame name for Group 1 player 1 is VdAc1HlU2 but on parent and anchor the frame disapears, even though the Vuhdo unit frame is still visible.

If its important at all my res is 1920 x 1200, I thought since on some frame anchoring with other UI areas the frame has moved on position that it could have moved off the screen, but after playing about for some time don;t think thats the case. (Reset position to x = 0, y = 0)

Vuhdo author comments can be found at http://www.wowinterface.com/download....html#comments

Any ideas or suggestions welcome.

Thanks.
Johnychemist is offline Report comment to moderator  
Reply With Quote
Unread 02-21-10, 01:05 PM  
Kagaro
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 132
Uploads: 9
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
Kagaro is offline Report comment to moderator  
Reply With Quote
Unread 02-19-10, 08:15 AM  
karmamuscle
Premium Member
 
karmamuscle's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 196
File comments: 166
Uploads: 1
How would I go about making a panel only visible when the spell Shadow Weaving has reached 5 stacks?
karmamuscle is offline 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
gruff.ovelen is offline 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.
Ayuki is offline 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: 9
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);
Kagaro is offline 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.