mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
local ns = oUF
|
local ns = oUF
|
||||||
local oUF = ns.oUF
|
local oUF = ns.oUF
|
||||||
|
|
||||||
|
local pairs = pairs
|
||||||
|
|
||||||
|
local UIFrameFadeIn, UIFrameFadeOut = UIFrameFadeIn, UIFrameFadeOut
|
||||||
local UnitAffectingCombat = UnitAffectingCombat
|
local UnitAffectingCombat = UnitAffectingCombat
|
||||||
local UnitHealth, UnitHealthMax = UnitHealth, UnitHealthMax
|
local UnitHealth, UnitHealthMax = UnitHealth, UnitHealthMax
|
||||||
local UnitExists = UnitExists
|
local UnitExists = UnitExists
|
||||||
@@ -10,7 +13,7 @@ local frames, allFrames = {}, {}
|
|||||||
local showStatus
|
local showStatus
|
||||||
|
|
||||||
local CheckForReset = function()
|
local CheckForReset = function()
|
||||||
for frame, unit in pairs(allFrames) do
|
for frame in pairs(allFrames) do
|
||||||
if frame.fadeInfo and frame.fadeInfo.reset then
|
if frame.fadeInfo and frame.fadeInfo.reset then
|
||||||
frame:SetAlpha(1)
|
frame:SetAlpha(1)
|
||||||
frame.fadeInfo.reset = nil
|
frame.fadeInfo.reset = nil
|
||||||
@@ -19,7 +22,6 @@ local CheckForReset = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local FadeFramesInOut = function(fade, unit)
|
local FadeFramesInOut = function(fade, unit)
|
||||||
local E = unpack(ElvUI)
|
|
||||||
for frame, unit in pairs(frames) do
|
for frame, unit in pairs(frames) do
|
||||||
if not UnitExists(unit) then return end
|
if not UnitExists(unit) then return end
|
||||||
if fade then
|
if fade then
|
||||||
@@ -31,7 +33,7 @@ local FadeFramesInOut = function(fade, unit)
|
|||||||
UIFrameFadeOut(frame, 0.15)
|
UIFrameFadeOut(frame, 0.15)
|
||||||
frame.fadeInfo.finishedFunc = CheckForReset
|
frame.fadeInfo.finishedFunc = CheckForReset
|
||||||
else
|
else
|
||||||
showStatus = false;
|
showStatus = false
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -48,8 +50,6 @@ local Update = function(self, arg1, arg2)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local E = unpack(ElvUI)
|
|
||||||
|
|
||||||
if not frames[self] then
|
if not frames[self] then
|
||||||
UIFrameFadeIn(self, 0.15)
|
UIFrameFadeIn(self, 0.15)
|
||||||
self.fadeInfo.reset = true
|
self.fadeInfo.reset = true
|
||||||
@@ -81,7 +81,7 @@ local Enable = function(self, unit)
|
|||||||
allFrames[self] = self.unit
|
allFrames[self] = self.unit
|
||||||
|
|
||||||
if unit == "player" then
|
if unit == "player" then
|
||||||
showStatus = false;
|
showStatus = false
|
||||||
end
|
end
|
||||||
|
|
||||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", Update)
|
self:RegisterEvent("PLAYER_ENTERING_WORLD", Update)
|
||||||
@@ -95,8 +95,8 @@ local Enable = function(self, unit)
|
|||||||
self:RegisterEvent("UNIT_MODEL_CHANGED", Update)
|
self:RegisterEvent("UNIT_MODEL_CHANGED", Update)
|
||||||
|
|
||||||
if not self.CombatFadeHooked then
|
if not self.CombatFadeHooked then
|
||||||
HookScript(self, "OnEnter", function(self) Update(self, true) end)
|
HookScript(self, "OnEnter", function() Update(self, true) end)
|
||||||
HookScript(self, "OnLeave", function(self) Update(self, false) end)
|
HookScript(self, "OnLeave", function() Update(self, false) end)
|
||||||
self.CombatFadeHooked = true
|
self.CombatFadeHooked = true
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ function UF:Configure_ClassBar(frame)
|
|||||||
E:Size(bars.Holder, db.classbar.detachedWidth, db.classbar.height)
|
E:Size(bars.Holder, db.classbar.detachedWidth, db.classbar.height)
|
||||||
|
|
||||||
if not bars.Holder.mover then
|
if not bars.Holder.mover then
|
||||||
bars:SerWidth(CLASSBAR_WIDTH)
|
bars:SetWidth(CLASSBAR_WIDTH)
|
||||||
bars:SetHeight(frame.CLASSBAR_HEIGHT - ((frame.BORDER+frame.SPACING)*2))
|
bars:SetHeight(frame.CLASSBAR_HEIGHT - ((frame.BORDER+frame.SPACING)*2))
|
||||||
bars:ClearAllPoints()
|
bars:ClearAllPoints()
|
||||||
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
|
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
|
||||||
|
|||||||
Reference in New Issue
Block a user