Browse files

Merge remote-tracking branch 'curseforge/master' into elvcurse

Conflicts:
	config/profile.lua
	core/install.lua
	modules/unitframes/construct_elements.lua
	modules/unitframes/groups/raid2640.lua
	modules/unitframes/groups/raid625.lua
	modules/unitframes/unitframes.lua
  • Loading branch information...
2 parents 08faa5b + 7cfdc23 commit 0ec64a966878fb72c07f0287020f2dbedeab5214 @Caliburnus committed Mar 26, 2012
View
10 CHANGELOG.txt
@@ -1 +1,9 @@
-*Removed some old code that was used to keep ElvUI working with patch 4.2.
+*Removed some old code that was used to keep ElvUI working with patch 4.2.
+*Re-Add scale restriction so you can't set UIScale below .64.
+*Add support to the keybind mode for all gaming mouses.
+*Enable/Disable unitframes should no longer require reload ui. This change also fixes people disabling a frame and seeing the default Blizzard frame popping up after a reload or restart.
+*Fix strata issue I noticed on shaman, debuff highlighting and incomming heals were appearing above the Totem bar.
+*Fix logic error with the BGMap skin, should now set alphas correctly when mousing in and out of the frame.
+*Fix issue with datatext getting reset when using the reset anchors button.
+*Fix Raid Icon size not adjusting when changing the option.
+*40 Man layout can now have role icons and raid icons displayed. They are off by Default.
View
9 config/profile.lua
@@ -1006,6 +1006,15 @@ P['unitframe'] = {
['useFilter'] = '',
['durationLimit'] = 0,
},
+ ['rdebuffs'] = {
+ ['enable'] = false,
+ ['fontsize'] = 10,
+ ['size'] = 22,
+ },
+ ['roleIcon'] = {
+ ['enable'] = false,
+ ['position'] = 'BOTTOM',
+ },
['buffIndicator'] = {
['enable'] = true,
['size'] = 6,
View
2 core/core.lua
@@ -460,7 +460,7 @@ function E:SendRecieve(event, prefix, message, channel, sender)
if event == "CHAT_MSG_ADDON" then
if sender == E.myname then return end
- if prefix == "ElvUIVC" and sender ~= 'Elv' and not string.find(sender, 'Elv-') then
+ if prefix == "ElvUIVC" and sender ~= 'Elv' and not string.find(sender, 'Elv%-') then
if tonumber(message) > tonumber(E.version) then
E:Print(L["Your version of ElvUI is out of date. You can download the latest version from www.curse.com"])
self:UnregisterEvent("CHAT_MSG_ADDON")
View
43 core/install.lua
@@ -168,7 +168,7 @@ local function SetupCVars()
SetCVar('lockActionBars', 1)
InterfaceOptionsActionBarsPanelPickupActionKeyDropDown:SetValue('SHIFT')
InterfaceOptionsActionBarsPanelPickupActionKeyDropDown:RefreshValue()
-
+
InstallStepComplete.message = L["CVars Set"]
InstallStepComplete:Show()
end
@@ -253,7 +253,7 @@ function E:SetupLayout(layout)
if not IsAddOnLoaded('Clique') then
E:Print(L['Using the healer layout it is highly recommended you download the addon Clique to work side by side with ElvUI.'])
end
-
+
E.db.unitframe.units.party.health.frequentUpdates = true;
E.db.unitframe.units.raid625.health.frequentUpdates = true;
E.db.unitframe.units.raid2640.health.frequentUpdates = true;
@@ -358,25 +358,28 @@ function E:SetupLayout(layout)
end
--Datatexts
- E:CopyTable(E.db.datatexts.panels, P.datatexts.panels)
- if layout == 'tank' then
- E.db.datatexts.panels.LeftChatDataPanel.left = 'Armor';
- E.db.datatexts.panels.LeftChatDataPanel.right = 'Avoidance';
- elseif layout == 'healer' or layout == 'dpsCaster' then
- E.db.datatexts.panels.LeftChatDataPanel.left = 'Spell/Heal Power';
- E.db.datatexts.panels.LeftChatDataPanel.right = 'Haste';
- else
- E.db.datatexts.panels.LeftChatDataPanel.left = 'Attack Power';
- E.db.datatexts.panels.LeftChatDataPanel.right = 'Crit Chance';
+ if not E.db.layoutSet then
+ E:CopyTable(E.db.datatexts.panels, P.datatexts.panels)
+ if layout == 'tank' then
+ E.db.datatexts.panels.LeftChatDataPanel.left = 'Armor';
+ E.db.datatexts.panels.LeftChatDataPanel.right = 'Avoidance';
+ elseif layout == 'healer' or layout == 'dpsCaster' then
+ E.db.datatexts.panels.LeftChatDataPanel.left = 'Spell/Heal Power';
+ E.db.datatexts.panels.LeftChatDataPanel.right = 'Haste';
+ else
+ E.db.datatexts.panels.LeftChatDataPanel.left = 'Attack Power';
+ E.db.datatexts.panels.LeftChatDataPanel.right = 'Crit Chance';
+ end
+
+ if InstallStepComplete then
+ InstallStepComplete.message = L["Layout Set"]
+ InstallStepComplete:Show()
+ end
end
E.db.layoutSet = layout
E:UpdateAll()
- if InstallStepComplete then
- InstallStepComplete.message = L["Layout Set"]
- InstallStepComplete:Show()
- end
end
local function InstallComplete()
@@ -474,13 +477,13 @@ local function SetPage(PageNum)
f.Desc2:SetText(L["This will change the layout of your unitframes, raidframes, and datatexts."])
f.Desc3:SetText(L["Importance: |cffD3CF00Medium|r"])
InstallRoleOptionTank:Show()
- InstallRoleOptionTank:SetScript('OnClick', function() E:SetupLayout('tank') end)
+ InstallRoleOptionTank:SetScript('OnClick', function() E.db.layoutSet = nil; E:SetupLayout('tank') end)
InstallRoleOptionHealer:Show()
- InstallRoleOptionHealer:SetScript('OnClick', function() E:SetupLayout('healer') end)
+ InstallRoleOptionHealer:SetScript('OnClick', function() E.db.layoutSet = nil; E:SetupLayout('healer') end)
InstallRoleOptionMeleeDPS:Show()
- InstallRoleOptionMeleeDPS:SetScript('OnClick', function() E:SetupLayout('dpsMelee') end)
+ InstallRoleOptionMeleeDPS:SetScript('OnClick', function() E.db.layoutSet = nil; E:SetupLayout('dpsMelee') end)
InstallRoleOptionCasterDPS:Show()
- InstallRoleOptionCasterDPS:SetScript('OnClick', function() E:SetupLayout('dpsCaster') end)
+ InstallRoleOptionCasterDPS:SetScript('OnClick', function() E.db.layoutSet = nil; E:SetupLayout('dpsCaster') end)
elseif PageNum == 6 then
f.SubTitle:SetText(L["Installation Complete"])
f.Desc1:SetText(L["You are now finished with the installation process. Bonus Hint: If you wish to access blizzard micro menu, middle click on the minimap. If you don't have a middle click button then hold down shift and right click the minimap. If you are in need of technical support please visit us at www.tukui.org."])
View
4 core/pixelperfect.lua
@@ -4,9 +4,9 @@ local E, L, P, G = unpack(select(2, ...)); --Inport: Engine, Locales, ProfileDB,
local scale
function E:UIScale(event)
if self.db.general.autoscale then
- scale = min(1, 768/self.screenheight);
+ scale = max(0.64, min(1, 768/self.screenheight));
else
- scale = min(1, GetCVar('uiScale') or UIParent:GetScale() or 768/self.screenheight);
+ scale = max(0.64, min(1, GetCVar('uiScale') or UIParent:GetScale() or 768/self.screenheight));
end
if self.screenwidth < 1600 then
View
7 modules/actionbars/Bind.lua
@@ -53,9 +53,10 @@ function AB:BindListener(key)
then return; end
if key == "MiddleButton" then key = "BUTTON3"; end
- if key == "Button4" then key = "BUTTON4"; end
- if key == "Button5" then key = "BUTTON5"; end
-
+ if key:find('Button%d') then
+ key = key:upper()
+ end
+
local alt = IsAltKeyDown() and "ALT-" or "";
local ctrl = IsControlKeyDown() and "CTRL-" or "";
local shift = IsShiftKeyDown() and "SHIFT-" or "";
View
19 modules/skins/blizzard/bgmap.lua
@@ -13,7 +13,7 @@ local function LoadSkin()
BattlefieldMinimap:CreateBackdrop('Default')
BattlefieldMinimap.backdrop:Point('BOTTOMRIGHT', -4, 2)
-
+ BattlefieldMinimap:SetFrameStrata('LOW')
BattlefieldMinimapCloseButton:ClearAllPoints()
BattlefieldMinimapCloseButton:SetPoint("TOPRIGHT", -4, 0)
S:HandleCloseButton(BattlefieldMinimapCloseButton)
@@ -23,6 +23,7 @@ local function LoadSkin()
BattlefieldMinimap:EnableMouse(true)
BattlefieldMinimap:SetMovable(true)
+ BattlefieldMinimap.backdrop:SetAlpha(1.0 - BattlefieldMinimapOptions.opacity)
BattlefieldMinimap:SetScript("OnMouseUp", function(self, btn)
if btn == "LeftButton" then
@@ -45,27 +46,35 @@ local function LoadSkin()
end
end)
+
hooksecurefunc('BattlefieldMinimap_UpdateOpacity', function(opacity)
- local opacity = opacity or OpacityFrameSlider:GetValue();
local alpha = 1.0 - BattlefieldMinimapOptions.opacity;
BattlefieldMinimap.backdrop:SetAlpha(alpha)
end)
-
+ local oldAlpha
BattlefieldMinimap:HookScript('OnEnter', function()
+ oldAlpha = BattlefieldMinimapOptions.opacity;
BattlefieldMinimap_UpdateOpacity(0)
end)
BattlefieldMinimap:HookScript('OnLeave', function()
- BattlefieldMinimap_UpdateOpacity(OpacityFrameSlider:GetValue())
+ if oldAlpha then
+ BattlefieldMinimap_UpdateOpacity(oldAlpha)
+ oldAlpha = nil;
+ end
end)
BattlefieldMinimapCloseButton:HookScript('OnEnter', function()
+ oldAlpha = BattlefieldMinimapOptions.opacity;
BattlefieldMinimap_UpdateOpacity(0)
end)
BattlefieldMinimapCloseButton:HookScript('OnLeave', function()
- BattlefieldMinimap_UpdateOpacity(OpacityFrameSlider:GetValue())
+ if oldAlpha then
+ BattlefieldMinimap_UpdateOpacity(oldAlpha)
+ oldAlpha = nil;
+ end
end)
end
View
13 modules/unitframes/construct_elements.lua
@@ -36,7 +36,7 @@ function UF:Construct_TargetGlow(frame)
frame.shadow = nil
x:SetFrameStrata('BACKGROUND')
x:Hide();
-
+
return x
end
@@ -202,7 +202,7 @@ function UF:Construct_Castbar(self, direction)
UF['fontstrings'][castbar.Text] = true
castbar.Text:SetPoint("LEFT", castbar, "LEFT", 4, 0)
castbar.Text:SetTextColor(0.84, 0.75, 0.65)
-
+
castbar.Spark = castbar:CreateTexture(nil, 'ARTWORK')
castbar.Spark:SetBlendMode('ADD')
castbar.Spark:SetVertexColor(1, 1, 1)
@@ -499,6 +499,10 @@ function UF:Construct_DebuffHighlight(frame)
frame.DebuffHighlightFilter = true
frame.DebuffHighlightAlpha = 0.45
+ if frame.Health then
+ dbh:SetParent(frame.Health)
+ end
+
return dbh
end
@@ -572,6 +576,11 @@ function UF:Construct_HealComm(frame)
ohpb:SetStatusBarColor(0, 1, 0, 0.25)
mhpb:SetFrameLevel(mhpb:GetFrameLevel())
+ if frame.Health then
+ ohpb:SetParent(frame.Health)
+ mhpb:SetParent(frame.Health)
+ end
+
return {
myBar = mhpb,
otherBar = ohpb,
View
41 modules/unitframes/groups/raid2640.lua
@@ -22,6 +22,8 @@ function UF:Construct_Raid2640Frames(unitGroup)
self.AuraWatch = UF:Construct_AuraWatch(self)
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
self.ResurrectIcon = UF:Construct_ResurectionIcon(self)
+ self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
+ self.LFDRole = UF:Construct_RoleIcon(self)
self.TargetGlow = UF:Construct_TargetGlow(self)
table.insert(self.__elements, UF.UpdateThreat)
@@ -389,6 +391,45 @@ function UF:Update_Raid2640Frames(frame, db)
end
end
+ --RaidDebuffs
+ do
+ local rdebuffs = frame.RaidDebuffs
+ if db.rdebuffs.enable then
+ if not frame:IsElementEnabled('RaidDebuffs') then
+ frame:EnableElement('RaidDebuffs')
+ end
+
+ rdebuffs:Size(db.rdebuffs.size)
+
+ rdebuffs.count:FontTemplate(nil, db.rdebuffs.fontsize, 'OUTLINE')
+ rdebuffs.time:FontTemplate(nil, db.rdebuffs.fontsize, 'OUTLINE')
+ else
+ if frame:IsElementEnabled('RaidDebuffs') then
+ frame:DisableElement('RaidDebuffs')
+ rdebuffs:Hide()
+ end
+ end
+ end
+
+ --Role Icon
+ do
+ local role = frame.LFDRole
+ if db.roleIcon.enable then
+ if not frame:IsElementEnabled('LFDRole') then
+ frame:EnableElement('LFDRole')
+ end
+
+ local x, y = self:GetPositionOffset(db.roleIcon.position, 1)
+ role:ClearAllPoints()
+ role:Point(db.roleIcon.position, frame.Health, db.roleIcon.position, x, y)
+ else
+ if frame:IsElementEnabled('LFDRole') then
+ frame:DisableElement('LFDRole')
+ end
+ role:Hide()
+ end
+ end
+
--Debuff Highlight
do
local dbh = frame.DebuffHighlight
View
2 modules/unitframes/groups/raid625.lua
@@ -402,7 +402,7 @@ function UF:Update_Raid625Frames(frame, db)
frame:EnableElement('RaidDebuffs')
end
- rdebuffs:Size(UNIT_HEIGHT * 0.6)
+ rdebuffs:Size(db.rdebuffs.size)
rdebuffs.count:FontTemplate(nil, db.rdebuffs.fontsize, 'OUTLINE')
rdebuffs.time:FontTemplate(nil, db.rdebuffs.fontsize, 'OUTLINE')
View
55 modules/unitframes/options.lua
@@ -649,7 +649,6 @@ E.Options.args.unitframe.args.player = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['player'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -1249,7 +1248,6 @@ E.Options.args.unitframe.args.target = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['target'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -1786,7 +1784,6 @@ E.Options.args.unitframe.args.targettarget = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['targettarget'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -2138,7 +2135,6 @@ E.Options.args.unitframe.args.focus = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['focus'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -2608,7 +2604,6 @@ E.Options.args.unitframe.args.focustarget = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['focustarget'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -2960,7 +2955,6 @@ E.Options.args.unitframe.args.pet = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['pet'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -3318,7 +3312,6 @@ E.Options.args.unitframe.args.pettarget = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['pettarget'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -3670,7 +3663,6 @@ E.Options.args.unitframe.args.boss = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['boss'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -4158,7 +4150,6 @@ E.Options.args.unitframe.args.arena = {
type = 'toggle',
order = 1,
name = L['Enable'],
- set = function(info, value) E.db.unitframe.units['arena'][ info[#info] ] = value; StaticPopup_Show("CONFIG_RL"); end,
},
copyFrom = {
type = 'select',
@@ -6218,6 +6209,52 @@ E.Options.args.unitframe.args.raid2640 = {
min = 7, max = 22, step = 1,
},
},
+ },
+ roleIcon = {
+ order = 700,
+ type = 'group',
+ name = L['Role Icon'],
+ get = function(info) return E.db.unitframe.units['raid625']['roleIcon'][ info[#info] ] end,
+ set = function(info, value) E.db.unitframe.units['raid625']['roleIcon'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid625') end,
+ args = {
+ enable = {
+ type = 'toggle',
+ name = L['Enable'],
+ order = 1,
+ },
+ position = {
+ type = 'select',
+ order = 2,
+ name = L['Position'],
+ values = positionValues,
+ },
+ },
+ },
+ rdebuffs = {
+ order = 800,
+ type = 'group',
+ name = L['RaidDebuff Indicator'],
+ get = function(info) return E.db.unitframe.units['raid625']['rdebuffs'][ info[#info] ] end,
+ set = function(info, value) E.db.unitframe.units['raid625']['rdebuffs'][ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup('raid625') end,
+ args = {
+ enable = {
+ type = 'toggle',
+ name = L['Enable'],
+ order = 1,
+ },
+ size = {
+ type = 'range',
+ name = L['Size'],
+ order = 2,
+ min = 8, max = 35, step = 1,
+ },
+ fontsize = {
+ type = 'range',
+ name = L['Font Size'],
+ order = 3,
+ min = 7, max = 22, step = 1,
+ },
+ },
},
},
}
View
116 modules/unitframes/unitframes.lua
@@ -109,7 +109,7 @@ end
function UF:GarbageCollect()
collectgarbage('collect')
-
+
--This is a hackish way to disable all created timers except the UpdatePvPText one..
local timersList = AceTimer.selfs[self]
if timersList then
@@ -262,27 +262,25 @@ function UF:CreateAndUpdateUFGroup(group, numGroup)
self:UpdateColors()
for i=1, numGroup do
- if self.db['units'][group].enable then
- local unit = group..i
- if not self[unit] then
- self['handledgroupunits'][unit] = group;
-
- local frameName = E:StringTitle(unit)
- frameName = frameName:gsub('t(arget)', 'T%1')
- self[unit] = ElvUF:Spawn(unit, 'ElvUF_'..frameName)
- self[unit].index = i
- else
- self[unit]:Enable()
- end
+ local unit = group..i
+ local frameName = E:StringTitle(unit)
+ frameName = frameName:gsub('t(arget)', 'T%1')
+ if not self[unit] then
+ self['handledgroupunits'][unit] = group;
+ self[unit] = ElvUF:Spawn(unit, 'ElvUF_'..frameName)
+ self[unit].index = i
+ end
- local frameName = E:StringTitle(group)
- frameName = frameName:gsub('t(arget)', 'T%1')
- self[unit].Update = function()
- UF["Update_"..E:StringTitle(frameName).."Frames"](self, self[unit], self.db['units'][group])
- end
+ local frameName = E:StringTitle(group)
+ frameName = frameName:gsub('t(arget)', 'T%1')
+ self[unit].Update = function()
+ UF["Update_"..E:StringTitle(frameName).."Frames"](self, self[unit], self.db['units'][group])
+ end
+ if self.db['units'][group].enable then
+ self[unit]:Enable()
self[unit].Update()
- elseif self[unit] then
+ else
self[unit]:Disable()
end
end
@@ -293,41 +291,41 @@ function UF:CreateAndUpdateHeaderGroup(group, groupFilter, template)
self:UpdateColors()
- if self.db['units'][group].enable then
- local db = self.db['units'][group]
- if not self[group] then
- ElvUF:RegisterStyle("ElvUF_"..E:StringTitle(group), UF["Construct_"..E:StringTitle(group).."Frames"])
- ElvUF:SetActiveStyle("ElvUF_"..E:StringTitle(group))
-
- if template then
- self[group] = ElvUF:SpawnHeader("ElvUF_"..E:StringTitle(group), nil, 'raid', 'point', self.db['units'][group].point, 'oUF-initialConfigFunction', ([[self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)]]):format(db.width, db.height), 'template', template, 'groupFilter', groupFilter)
- else
- self[group] = ElvUF:SpawnHeader("ElvUF_"..E:StringTitle(group), nil, 'raid', 'point', self.db['units'][group].point, 'oUF-initialConfigFunction', ([[self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)]]):format(db.width, db.height), 'groupFilter', groupFilter)
- end
- self['handledheaders'][group] = self[group]
- self[group].groupName = group
+ local db = self.db['units'][group]
+ if not self[group] then
+ ElvUF:RegisterStyle("ElvUF_"..E:StringTitle(group), UF["Construct_"..E:StringTitle(group).."Frames"])
+ ElvUF:SetActiveStyle("ElvUF_"..E:StringTitle(group))
+
+ if template then
+ self[group] = ElvUF:SpawnHeader("ElvUF_"..E:StringTitle(group), nil, 'raid', 'point', self.db['units'][group].point, 'oUF-initialConfigFunction', ([[self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)]]):format(db.width, db.height), 'template', template, 'groupFilter', groupFilter)
+ else
+ self[group] = ElvUF:SpawnHeader("ElvUF_"..E:StringTitle(group), nil, 'raid', 'point', self.db['units'][group].point, 'oUF-initialConfigFunction', ([[self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)]]):format(db.width, db.height), 'groupFilter', groupFilter)
end
+ self['handledheaders'][group] = self[group]
+ self[group].groupName = group
+ end
- self[group].Update = function()
- local db = self.db['units'][group]
- UF["Update_"..E:StringTitle(group).."Header"](self, self[group], db)
+ self[group].Update = function()
+ local db = self.db['units'][group]
+ UF["Update_"..E:StringTitle(group).."Header"](self, self[group], db)
- for i=1, self[group]:GetNumChildren() do
- local child = select(i, self[group]:GetChildren())
- UF["Update_"..E:StringTitle(group).."Frames"](self, child, self.db['units'][group])
+ for i=1, self[group]:GetNumChildren() do
+ local child = select(i, self[group]:GetChildren())
+ UF["Update_"..E:StringTitle(group).."Frames"](self, child, self.db['units'][group])
- if _G[child:GetName()..'Pet'] then
- UF["Update_"..E:StringTitle(group).."Frames"](self, _G[child:GetName()..'Pet'], self.db['units'][group])
- end
+ if _G[child:GetName()..'Pet'] then
+ UF["Update_"..E:StringTitle(group).."Frames"](self, _G[child:GetName()..'Pet'], self.db['units'][group])
+ end
- if _G[child:GetName()..'Target'] then
- UF["Update_"..E:StringTitle(group).."Frames"](self, _G[child:GetName()..'Target'], self.db['units'][group])
- end
+ if _G[child:GetName()..'Target'] then
+ UF["Update_"..E:StringTitle(group).."Frames"](self, _G[child:GetName()..'Target'], self.db['units'][group])
end
end
+ end
+ if self.db['units'][group].enable then
self[group].Update()
- elseif self[group] then
+ else
self[group]:SetAttribute("showParty", false)
self[group]:SetAttribute("showRaid", false)
self[group]:SetAttribute("showSolo", false)
@@ -345,25 +343,21 @@ function UF:CreateAndUpdateUF(unit)
self:UpdateColors()
- if self.db['units'][unit].enable then
- if not self[unit] then
- local frameName = E:StringTitle(unit)
- frameName = frameName:gsub('t(arget)', 'T%1')
-
- self[unit] = ElvUF:Spawn(unit, 'ElvUF_'..frameName)
- self['handledunits'][unit] = unit
- else
- self[unit]:Enable()
- end
+ local frameName = E:StringTitle(unit)
+ frameName = frameName:gsub('t(arget)', 'T%1')
+ if not self[unit] then
+ self[unit] = ElvUF:Spawn(unit, 'ElvUF_'..frameName)
+ self['handledunits'][unit] = unit
+ end
- local frameName = E:StringTitle(unit)
- frameName = frameName:gsub('t(arget)', 'T%1')
- self[unit].Update = function()
- UF["Update_"..frameName.."Frame"](self, self[unit], self.db['units'][unit])
- end
+ self[unit].Update = function()
+ UF["Update_"..frameName.."Frame"](self, self[unit], self.db['units'][unit])
+ end
+ if self.db['units'][unit].enable then
+ self[unit]:Enable()
self[unit].Update()
- elseif self[unit] then
+ else
self[unit]:Disable()
end
end

0 comments on commit 0ec64a9

Please sign in to comment.