WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Graphics Help (https://www.wowinterface.com/forums/forumdisplay.php?f=14)
-   -   .tga is not transparent - .png is (https://www.wowinterface.com/forums/showthread.php?t=33973)

magges 07-16-10 02:45 PM

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?

Seerah 07-16-10 02:47 PM

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.

magges 07-16-10 02:56 PM

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 07-16-10 05:44 PM

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


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

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