Originally Posted by Be3f.
Thanks for both of your responses. So if I understand this correctly, would I have to do something like SLDT_Clock:Hide() / SLDT_Clock:Show() aswell?
|
You'll have to either check for alpha, or use the 'fadeinfo' parameter that's available with UIFrameFadeIn(Out) and use its 'finishedFunc' to hide the frame after fading.
Example would be place with the OnLoad for that frame:
Lua Code:
self.fadeIn = {
mode = "IN",
timeToFade = 1,
startAlpha = 0,
endAlpha = 1,
finishedFunc = function()
print("Fade in finished");
end
}
self.fadeOut = {
mode = "OUT",
timeToFade = 1,
startAlpha = 1,
endAlpha = 0,
finishedFunc = function()
SLDT_Clock:Hide(); -- Hide the frame after fading out.
end
}
Then OnClick would be:
Lua Code:
if pressed then
if SLDT_Clock:IsShown() then
UIFrameFadeOut(SLDT_Clock, self.fadeOut)
else
UIFrameFadeIn(SLDT_Clock, self.fadeIn)
end
end