Hi, I hope this is not in the wrong forum section.
This code below does not work. I have tried using "if kgPanels:FetchFrame("Expandbutton"): IsVisible() then" instead of checking to see if the correct profile was selected on the class timer addon however that also did not work. I thought it was because the "Expandbutton" uses a "self:SetAlpha(0)". I want the button to only show if that panel is showing and not hidden regardless of what alpha its using so I thought maybe IsVisible is the wrong code to use? I'm not sure.
I am using this code:
if InCombatLockdown() then return end
if pressed then
if GetMouseButtonClicked() == "LeftButton" then
if ClassTimer.db:GetCurrentProfile() == "MyUI" then
elseif ClassTimer.db:GetCurrentProfile() == "MyUIH" then
elseif ClassTimer.db:GetCurrentProfile() == "MyUIH2" then
end
end
end
It is also worth mentioning that it does not necessarily need to be "ClassTimer.db:GetCurrentProfile() == " it can also be used on another kgpanel such as ""kgPanels:FetchFrame("Retract"): IsVisible() then".
If anyone can help me with this, that would be amazing. Thank you!
Also I want a panel to change alpha depending on whether shadowed unit frames profile is set.
I use this code onLoad:
if ShadowUF.db:GetCurrentProfile() == "<profilename>" or ShadowUF.db:GetCurrentProfile() == "<profilename>" then
self:SetAlpha(1)
else
self:SetAlpha(0.5)
end
however this does not work either. Anyone know why?
Do you have this in the OnClick section of the kgPanels scripts area? If so, I don't see anything in your code to specify up/down clicks. The script fires for both.
__________________
"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
The problem has been fixed. Parts of the names used in the code was incorrect and because I'm still new to this, I over looked that and thought some of the terminology was wrong. Thanks anyway!