Reply
 
Thread Tools Display Modes
Old 07-16-10, 02:45 PM   #21
magges
An Aku'mai Servant
 
magges's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 36
Code:
function Skada:ToggleWindow()
	for i, win in ipairs(windows) do
		if win:IsShown() then
			win.db.hidden = true
			win:Hide()
		else
			win.db.hidden = false
			win:Show()
		end
	end
end
i dont get how to use that in my addon :/

if i try to say for i, win ... win:Show() it wont work.
The same with ...then win.db.hidden = false
Do i have to set a some variables for the addon skada or ..whatever?
magges is offline   Reply With Quote
Old 07-16-10, 02:47 PM   #22
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,526
You don't use that in your addon. You just use Skada:ToggleWindow(). You call the function in Skada, which executes the code in that function.
__________________
"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

Seerah is offline   Reply With Quote
Old 07-16-10, 02:56 PM   #23
magges
An Aku'mai Servant
 
magges's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 36
Yeah hm but i dont want to toggle it .. I want one button to show it and one to hide u know? How can i manage that?

atm im using SkadaBarWindowSkada:Hide() but this just hide this one Frame, not all
magges is offline   Reply With Quote
Old 07-16-10, 05:44 PM   #24
magges
An Aku'mai Servant
 
magges's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 36
Code:
disabled = true

open:
Skada:SetActive(disabled)

close:
Skada:SetActive(enable)
i dont know why but it works ..unfortunately on the first click it appears and then it disappears automatically. But on all other clicks it seems to work fine.
Think i have to live with it till i find a solution
magges is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Graphics Help » .tga is not transparent - .png is

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