Quantcast
Skada global variables and skinning - WoWInterface
Thread Tools Display Modes
06-14-15, 04:33 PM   #1
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 80
Skada global variables and skinning

Hey guys,

Skada is a big Addon but I can't find any good documentation.

Is there a way to tell if the Skada window is showing, like maybe a boolean?

I found Skada:ToggleWindow(); as a function, but that doesn't help me find out if the Skada window is showing.

Skinning Skada would require similar documentation, is there a way to find important frames or do I have to skim the whole of Skada?
How do most people skin their addons? Like for ElvUI?

thanks for the help guys

Last edited by gempir : 06-14-15 at 04:42 PM.
  Reply With Quote
06-14-15, 05:12 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,734
<nameofframe>:IsShown()
http://wowprogramming.com/docs/widgets/Frame
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
06-14-15, 05:15 PM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,236
Code:
if SkadaBarWindowSkada:IsVisible() then
--  I can see it
end
Edit: or what Seerah said.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 06-14-15 at 08:17 PM.
  Reply With Quote
06-15-15, 03:15 AM   #4
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 80
Code:
attempt to call method 'IsShown' (a nil value)
Is the error I'm getting, so for SkadaBarWindowSkada:IsShown() or neither for Skada:IsShown() there is a value.

IsVisible produces the same result.

Code:
attempt to index global 'SkadaBarWindowSkada' (a nil value)
And having Skada shown or not shown doesn't change anything.
Am I missing something? What am I doing wrong?

Thanks for the help guys
  Reply With Quote
06-15-15, 12:07 PM   #5
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 80
Originally Posted by Leatrix View Post
To see if the Skada window is showing, you can use something like this:
Code:
/run if SkadaBarWindowSkada:IsShown() then print("Showing") else print("Not showing") end
If you want to find out the names of the global frames shown on your screen, use the /framestack command.
Well I run into this problem probably because Skada is loading after my Addon.

Do i need to make something like OnEvent that the

Lua Code:
  1. if SkadaBarWindowSkada:IsShown() then
  2.     print("Showing")
  3. else
  4.     print("Not Showing")
  5. end

only loads later?

Yeah, I'm retarded. This finally works.

Lua Code:
  1. local frame = CreateFrame("FRAME", "FooAddonFrame");
  2. frame:RegisterEvent("PLAYER_ENTERING_WORLD");
  3. local function eventHandler(self, event, ...)
  4.  if SkadaBarWindowSkada:IsShown() then
  5.     print("Showing")
  6.  else
  7.     print("Not Showing")
  8.  end
  9. end
  10. frame:SetScript("OnEvent", eventHandler);

Last edited by gempir : 06-15-15 at 12:11 PM.
  Reply With Quote
06-15-15, 02:02 PM   #6
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,059
Adding skada as an optional dependency to your toc file will ensure your addon loads after it does.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Skada global variables and skinning

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off