View Single Post
02-28-13, 06:08 PM   #4
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Ok my finished code is there:

Code:
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addon)
	if addon ~= "ShadowUF" then return end
	self:UnregisterEvent("ADDON_LOADED")
	if ShadowUF.db:GetCurrentProfile() == "MayronUI" then
		BTL:Show()
		TL:Hide()
	else
		TL:Show()
		BTL:Hide()
	end
end)
But unfortunately the:

"BTL:Show()
TL:Hide()"

part never reaches as both of the frames are showing for some reason. I had to also change "ShadowedUnitFrames" to "ShadowUF" because for some reason it came up with a lua error saying that "db" is a nil value but with that instead I do not get any errors. Not sure what that's about. I will keep up the experimenting.
  Reply With Quote