WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Skada, can i change anything in the lua so it's only displayed in combat? (https://www.wowinterface.com/forums/showthread.php?t=45778)

Rusken 02-04-13 03:38 PM

Skada, can i change anything in the lua so it's only displayed in combat?
 
As the title says, i have made a couple of KGpanels for skada and since each individual bar don't have a "name" when doing a ./framestack i had to anchor and parent them to the entire skada window.
So now there's 3 borders visible all the time except when i am in combat and people dps/heal and there is no option for this in skada config, the only thing i can select is "hide when alone".
Sure that option solves it when im alone but when im in a party or raid those 3 kgpanels will be there even if no one dps/heal.
So, is there any coding expert out there that could help me with this? Or could i get the name of those 3 individual bars in some other way then /framestack?
If so, i could just anchor/parent the panels to them.
Thanks in advance<3

A screenshot to show what i mean ->


ravagernl 02-07-13 10:53 AM

Maybe this will help, assuming you want to hide/show a frame based on combat status.

OnLoad script for a panel:
lua Code:
  1. self:RegisterEvent("PLAYER_REGEN_DISABLED")
  2. self:RegisterEvent("PLAYER_REGEN_ENABLED")

PLAYER_REGEN_DISABLED triggers when you go into combat, PLAYER_REGEN_ENABLED triggers when you exit combat.

OnEvent script for a panel:
lua Code:
  1. if event == "PLAYER_REGEN_ENABLED" then
  2.   self:Hide()
  3. elseif event == "PLAYER_REGEN_DISABLED" then
  4.   self:Show()
  5. end

Also, I just googled and found this post on this forum:
Quote:

Originally Posted by Taryble (Post 205422)
In the "Parent" box at the bottom of the main setup for the panel, just set it to parent to SkadaBarWindowSkada and you're done.

(for the default setup - if you're using 2 skada windows and want it to show up with a window with a different name, it's SkadaBarWindow<windowname> - ie, a window called Test is SkadaBarWindowTest.)

http://lmgtfy.com/?q=skada+kgpanels


All times are GMT -6. The time now is 12:15 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI