big update Unitframes

update #56
fix #38
fix #69
This commit is contained in:
Crum
2018-12-07 23:27:23 -06:00
parent f157e7d01f
commit 93f5762a44
38 changed files with 6942 additions and 2763 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* ... - the arguments accompanying the event
--]]
return (self.ComboPoints.Override or Update) (self, ...)
return (self.ComboPoints.Override or Update) (self, unpack(arg))
end
local function ForceUpdate(element)
+2 -3
View File
@@ -13,8 +13,7 @@
<Script file="tags.lua"/>
<Script file="masterlooterindicator.lua"/>
<Script file="assistantindicator.lua"/>
<!--<Script file="combopoints.lua"/>
<Script file="raidroleindicator.lua"/>
<Script file="combopoints.lua"/>
<!-- <Script file="raidroleindicator.lua"/> -->
<Script file="happinessindicator.lua"/>
-->
</Ui>
@@ -81,7 +81,7 @@ local function Path(self, ...)
* event - the event triggering the update (string)
* ... - the arguments accompanying the event
--]]
return (self.HappinessIndicator.Override or Update) (self, ...)
return (self.HappinessIndicator.Override or Update) (self, unpack(arg))
end
local function ForceUpdate(element)
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

+1 -1
View File
@@ -1,4 +1,4 @@
local E, L, V, P, G = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local mod = E:GetModule("NamePlates");
local LSM = LibStub("LibSharedMedia-3.0");
@@ -1,4 +1,4 @@
local E, L, V, P, G = unpack(ElvUI) --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local E, L, V, P, G = unpack(ElvUI) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames")
--Cache global variables
+15 -1
View File
@@ -1,4 +1,4 @@
local E, L, V, P, G = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
@@ -56,6 +56,11 @@ function UF:Construct_Castbar(frame, moverName)
castbar.Spark:SetBlendMode("ADD")
castbar.Spark:SetVertexColor(1, 1, 1)
--Set to castbar.SafeZone
castbar.LatencyTexture = castbar:CreateTexture(nil, "OVERLAY")
castbar.LatencyTexture:SetTexture(E.media.blankTex)
castbar.LatencyTexture:SetVertexColor(0.69, 0.31, 0.31, 0.75)
castbar.bg = castbar:CreateTexture(nil, "BORDER")
castbar.bg:Hide()
@@ -97,6 +102,15 @@ function UF:Configure_Castbar(frame)
castbar.Holder:GetScript("OnSizeChanged")(castbar.Holder)
end
--Latency
if db.castbar.latency then
castbar.SafeZone = castbar.LatencyTexture
castbar.LatencyTexture:Show()
else
castbar.SafeZone = nil
castbar.LatencyTexture:Hide()
end
--Icon
if db.castbar.icon then
castbar.Icon = castbar.ButtonIcon
@@ -0,0 +1,269 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
local ns = oUF
local ElvUF = ns.oUF
assert(ElvUF, "ElvUI was unable to locate oUF.")
--Cache global variables
--Lua functions
local select = select
local floor = math.floor
local find, format, sub, gsub = string.find, string.format, string.sub, string.gsub
--WoW API / Variables
local CreateFrame = CreateFrame
function UF:Configure_ClassBar(frame)
if not frame.VARIABLES_SET then return end
local bars = frame[frame.ClassBar]
if not bars then return end
local db = frame.db
bars.Holder = frame.ClassBarHolder
bars.origParent = frame
--Fix height in case it is lower than the theme allows, or in case it's higher than 30px when not detached
if (not self.thinBorders and not E.PixelMode) and frame.CLASSBAR_HEIGHT > 0 and frame.CLASSBAR_HEIGHT < 7 then --A height of 7 means 6px for borders and just 1px for the actual power statusbar
frame.CLASSBAR_HEIGHT = 7
if db.classbar then db.classbar.height = 7 end
UF.ToggleResourceBar(bars) --Trigger update to health if needed
elseif (self.thinBorders or E.PixelMode) and frame.CLASSBAR_HEIGHT > 0 and frame.CLASSBAR_HEIGHT < 3 then --A height of 3 means 2px for borders and just 1px for the actual power statusbar
frame.CLASSBAR_HEIGHT = 3
if db.classbar then db.classbar.height = 3 end
UF.ToggleResourceBar(bars) --Trigger update to health if needed
elseif (not frame.CLASSBAR_DETACHED and frame.CLASSBAR_HEIGHT > 30) then
frame.CLASSBAR_HEIGHT = 10
if db.classbar then db.classbar.height = 10 end
--Override visibility if Classbar is DruidAltMana in order to fix a bug when Auto Hide is enabled, height is higher than 30 and it goes from detached to not detached
local overrideVisibility = frame.ClassBar == "DruidAltMana"
UF.ToggleResourceBar(bars, overrideVisibility) --Trigger update to health if needed
end
--We don't want to modify the original frame.CLASSBAR_WIDTH value, as it bugs out when the classbar gains more buttons
local CLASSBAR_WIDTH = frame.CLASSBAR_WIDTH
local color = E.db.unitframe.colors.borderColor
bars.backdrop:SetBackdropBorderColor(color.r, color.g, color.b)
if frame.USE_MINI_CLASSBAR and not frame.CLASSBAR_DETACHED then
bars:ClearAllPoints()
E:Point(bars, "CENTER", frame.Health.backdrop, "TOP", 0, 0)
if frame.ClassBar == "DruidAltMana" then
CLASSBAR_WIDTH = CLASSBAR_WIDTH * 2/3
else
CLASSBAR_WIDTH = CLASSBAR_WIDTH * (frame.MAX_CLASS_BAR - 1) / frame.MAX_CLASS_BAR
end
bars:SetParent(frame)
bars:SetFrameLevel(50) --RaisedElementParent uses 100, we want it lower than this
if bars.Holder and bars.Holder.mover then
bars.Holder.mover:SetScale(0.0001)
bars.Holder.mover:SetAlpha(0)
end
elseif not frame.CLASSBAR_DETACHED then
bars:ClearAllPoints()
if frame.ORIENTATION == "RIGHT" then
E:Point(bars, "BOTTOMRIGHT", frame.Health.backdrop, "TOPRIGHT", -frame.BORDER, frame.SPACING*3)
else
E:Point(bars, "BOTTOMLEFT", frame.Health.backdrop, "TOPLEFT", frame.BORDER, frame.SPACING*3)
end
bars:SetParent(frame)
bars:SetFrameLevel(frame:GetFrameLevel() + 5)
if bars.Holder and bars.Holder.mover then
bars.Holder.mover:SetScale(0.0001)
bars.Holder.mover:SetAlpha(0)
end
else --Detached
CLASSBAR_WIDTH = db.classbar.detachedWidth - ((frame.BORDER + frame.SPACING)*2)
bars.Holder:Size(db.classbar.detachedWidth, db.classbar.height)
if not bars.Holder.mover then
bars:Width(CLASSBAR_WIDTH)
bars:Height(frame.CLASSBAR_HEIGHT - ((frame.BORDER+frame.SPACING)*2))
bars:ClearAllPoints()
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
E:CreateMover(bars.Holder, "ClassBarMover", L["Classbar"], nil, nil, nil, "ALL,SOLO")
else
bars:ClearAllPoints()
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
bars.Holder.mover:SetScale(1)
bars.Holder.mover:SetAlpha(1)
end
if db.classbar.parent == "UIPARENT" then
bars:SetParent(E.UIParent)
else
bars:SetParent(frame)
end
if not db.classbar.strataAndLevel.useCustomStrata then
bars:SetFrameStrata("LOW")
else
bars:SetFrameStrata(db.classbar.strataAndLevel.frameStrata)
end
if not db.classbar.strataAndLevel.useCustomLevel then
bars:SetFrameLevel(frame:GetFrameLevel() + 5)
else
bars:SetFrameLevel(db.classbar.strataAndLevel.frameLevel)
end
end
bars:Width(CLASSBAR_WIDTH)
bars:Height(frame.CLASSBAR_HEIGHT - ((frame.BORDER + frame.SPACING)*2))
if frame.ClassBar == "DruidAltMana" then
if frame.CLASSBAR_DETACHED and db.classbar.verticalOrientation then
bars:SetOrientation("VERTICAL")
else
bars:SetOrientation("HORIZONTAL")
end
end
if frame.USE_CLASSBAR then
if frame.DruidAltMana and not frame:IsElementEnabled("DruidAltMana") then
frame:EnableElement("DruidAltMana")
end
else
if frame.DruidAltMana and frame:IsElementEnabled("DruidAltMana") then
frame:DisableElement("DruidAltMana")
end
end
end
local function ToggleResourceBar(bars, overrideVisibility)
local frame = bars.origParent or bars:GetParent()
local db = frame.db
if not db then return end
frame.CLASSBAR_SHOWN = bars:IsShown()
local height
if db.classbar then
height = db.classbar.height
elseif db.combobar then
height = db.combobar.height
end
if bars.text then
if frame.CLASSBAR_SHOWN then
bars.text:SetAlpha(1)
else
bars.text:SetAlpha(0)
end
end
frame.CLASSBAR_HEIGHT = (frame.USE_CLASSBAR and (frame.CLASSBAR_SHOWN and height) or 0)
frame.CLASSBAR_YOFFSET = (not frame.USE_CLASSBAR or not frame.CLASSBAR_SHOWN or frame.CLASSBAR_DETACHED) and 0 or (frame.USE_MINI_CLASSBAR and ((frame.SPACING+(frame.CLASSBAR_HEIGHT/2))) or (frame.CLASSBAR_HEIGHT - (frame.BORDER-frame.SPACING)))
if not frame.CLASSBAR_DETACHED then --Only update when necessary
UF:Configure_HealthBar(frame)
UF:Configure_Portrait(frame, true) --running :Hide on portrait makes the frame all funky
end
end
UF.ToggleResourceBar = ToggleResourceBar
-------------------------------------------------------------
-- DRUID
-------------------------------------------------------------
function UF:Construct_DruidAltMana(frame)
local druidAltMana = CreateFrame("StatusBar", "DruidAltMana", frame)
druidAltMana:SetFrameLevel(druidAltMana:GetFrameLevel() + 1)
druidAltMana.colorPower = true
druidAltMana.PostUpdate = UF.PostUpdateDruidAltMana
druidAltMana.PostUpdateVisibility = UF.PostVisibilityDruidAltMana
druidAltMana:CreateBackdrop("Default")
UF["statusbars"][druidAltMana] = true
druidAltMana:SetStatusBarTexture(E["media"].blankTex)
druidAltMana.bg = druidAltMana:CreateTexture(nil, "BORDER")
druidAltMana.bg:SetAllPoints(druidAltMana)
druidAltMana.bg:SetTexture(E["media"].blankTex)
druidAltMana.bg.multiplier = 0.3
druidAltMana.text = druidAltMana:CreateFontString(nil, "OVERLAY")
UF:Configure_FontString(druidAltMana.text)
druidAltMana:SetScript("OnShow", ToggleResourceBar)
druidAltMana:SetScript("OnHide", ToggleResourceBar)
return druidAltMana
end
function UF:PostUpdateDruidAltMana(_, min, max, event)
local frame = self.origParent or self:GetParent()
local db = frame.db
if frame.USE_CLASSBAR and ((min ~= max or (not db.classbar.autoHide)) and (event ~= "ElementDisable")) then
if db.classbar.additionalPowerText then
local powerValue = frame.Power.value
local powerValueText = powerValue:GetText()
local powerValueParent = powerValue:GetParent()
local powerTextPosition = db.power.position
local color = ElvUF["colors"].power[0]
color = E:RGBToHex(color[1], color[2], color[3])
--Attempt to remove |cFFXXXXXX color codes in order to determine if power text is really empty
if powerValueText then
local _, endIndex = find(powerValueText, "|cff")
if endIndex then
endIndex = endIndex + 7 --Add hex code
powerValueText = sub(powerValueText, endIndex)
powerValueText = gsub(powerValueText, "%s+", "")
end
end
self.text:ClearAllPoints()
if not frame.CLASSBAR_DETACHED then
self.text:SetParent(powerValueParent)
if (powerValueText and (powerValueText ~= "" and powerValueText ~= " ")) then
if find(powerTextPosition, "RIGHT") then
E:Point(self.text, "RIGHT", powerValue, "LEFT", 3, 0)
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(min / max * 100)))
elseif find(powerTextPosition, "LEFT") then
E:Point(self.text, "LEFT", powerValue, "RIGHT", -3, 0)
self.text:SetText(format("|cffD7BEA5 -|r"..color.." %d%%|r", floor(min / max * 100)))
else
if select(4, powerValue:GetPoint()) <= 0 then
E:Point(self.text, "LEFT", powerValue, "RIGHT", -3, 0)
self.text:SetText(format(" |cffD7BEA5-|r"..color.." %d%%|r", floor(min / max * 100)))
else
E:Point(self.text, "RIGHT", powerValue, "LEFT", 3, 0)
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(min / max * 100)))
end
end
else
E:Point(self.text, powerValue:GetPoint())
self.text:SetText(format(color.."%d%%|r", floor(min / max * 100)))
end
else
self.text:SetParent(self)
E:Point(self.text, "CENTER", self)
self.text:SetText(format(color.."%d%%|r", floor(min / max * 100)))
end
else --Text disabled
self.text:SetText()
end
self:Show()
else --Bar disabled
self.text:SetText()
self:Hide()
end
end
function UF:PostVisibilityDruidAltMana(enabled, stateChanged)
local frame = self.origParent or self:GetParent()
if stateChanged then
ToggleResourceBar(frame[frame.ClassBar])
UF:Configure_ClassBar(frame)
UF:Configure_HealthBar(frame)
UF:Configure_Power(frame)
UF:Configure_InfoPanel(frame, true) --2nd argument is to prevent it from setting template, which removes threat border
end
end
@@ -1,11 +1,6 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
--WoW API / Variables
function UF:Construct_CombatIndicator(frame)
local combat = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
combat:SetWidth(19)
@@ -0,0 +1,277 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--WoW API / Variables
local CreateFrame = CreateFrame
local GetBonusBarOffset = GetBonusBarOffset
local GetComboPoints = GetComboPoints
local MAX_COMBO_POINTS = MAX_COMBO_POINTS
local CombobarDetached
function UF:CombobarDetachedUpdate()
if E.myclass ~= "DRUID" then return end
if ElvUF_Target.CLASSBAR_DETACHED and UF.db.units.target.combobar.parent == "UIPARENT" then
if not CombobarDetached then
CombobarDetached = CreateFrame("Frame", nil, UIParent)
CombobarDetached:RegisterEvent("PLAYER_ENTERING_WORLD")
CombobarDetached:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
CombobarDetached:SetScript("OnEvent", function(self, event, unit)
print(self, event, unit)
if event == "PLAYER_ENTERING_WORLD" then
E:ShapeshiftDelayedUpdate(ElvUF_Target.ComboPoints.Override, ElvUF_Target)
end
ElvUF_Target.ComboPoints.Override(ElvUF_Target, event, unit)
end)
end
CombobarDetached:Show()
elseif CombobarDetached then
CombobarDetached:Hide()
end
end
function UF:Construct_Combobar(frame)
local ComboPoints = CreateFrame("Frame", nil, frame)
E:CreateBackdrop(ComboPoints, "Default", nil, nil, UF.thinBorders, true)
ComboPoints.Override = UF.UpdateComboDisplay
for i = 1, MAX_COMBO_POINTS do
ComboPoints[i] = CreateFrame("StatusBar", frame:GetName().."ComboBarButton"..i, ComboPoints)
UF["statusbars"][ComboPoints[i]] = true
ComboPoints[i]:SetStatusBarTexture(E.media.blankTex)
ComboPoints[i]:SetAlpha(0.15)
E:CreateBackdrop(ComboPoints[i], "Default", nil, nil, UF.thinBorders, true)
ComboPoints[i].backdrop:SetParent(ComboPoints)
end
if E.myclass == "DRUID" then
frame:RegisterEvent("UPDATE_SHAPESHIFT_FORM", UF.UpdateComboDisplay)
frame:RegisterEvent("PLAYER_ENTERING_WORLD", function()
E:ShapeshiftDelayedUpdate(ElvUF_Target.ComboPoints.Override, ElvUF_Target)
end)
self:CombobarDetachedUpdate()
end
ComboPoints:SetScript("OnShow", UF.ToggleResourceBar)
ComboPoints:SetScript("OnHide", UF.ToggleResourceBar)
return ComboPoints
end
function UF:Configure_ComboPoints(frame)
if not frame.VARIABLES_SET then return end
local ComboPoints = frame.ComboPoints
if not ComboPoints then return end
local db = frame.db
ComboPoints.Holder = frame.ComboPointsHolder
ComboPoints.origParent = frame
if (not self.thinBorders and not E.PixelMode) and frame.CLASSBAR_HEIGHT > 0 and frame.CLASSBAR_HEIGHT < 7 then --A height of 7 means 6px for borders and just 1px for the actual power statusbar
frame.CLASSBAR_HEIGHT = 7
if db.combobar then db.combobar.height = 7 end
UF.ToggleResourceBar(ComboPoints) --Trigger update to health if needed
elseif (self.thinBorders or E.PixelMode) and frame.CLASSBAR_HEIGHT > 0 and frame.CLASSBAR_HEIGHT < 3 then --A height of 3 means 2px for borders and just 1px for the actual power statusbar
frame.CLASSBAR_HEIGHT = 3
if db.combobar then db.combobar.height = 3 end
UF.ToggleResourceBar(ComboPoints) --Trigger update to health if needed
elseif (not frame.CLASSBAR_DETACHED and frame.CLASSBAR_HEIGHT > 30) then
frame.CLASSBAR_HEIGHT = 10
if db.combobar then db.combobar.height = 10 end
UF.ToggleResourceBar(ComboPoints) --Trigger update to health if needed
end
local CLASSBAR_WIDTH = frame.CLASSBAR_WIDTH
local color = E.db.unitframe.colors.borderColor
ComboPoints.backdrop:SetBackdropBorderColor(color.r, color.g, color.b)
color = self.db.colors.classResources.bgColor
ComboPoints.backdrop:SetBackdropColor(color.r, color.g, color.b)
if frame.USE_MINI_CLASSBAR and not frame.CLASSBAR_DETACHED then
ComboPoints:ClearAllPoints()
E:Point(ComboPoints, "CENTER", frame.Health.backdrop, "TOP", 0, 0)
CLASSBAR_WIDTH = CLASSBAR_WIDTH * (frame.MAX_CLASS_BAR - 1) / frame.MAX_CLASS_BAR
ComboPoints:SetParent(frame)
ComboPoints:SetFrameLevel(50) --RaisedElementParent uses 100, we want it lower than this
if ComboPoints.Holder and ComboPoints.Holder.mover then
ComboPoints.Holder.mover:SetScale(0.0001)
ComboPoints.Holder.mover:SetAlpha(0)
end
elseif not frame.CLASSBAR_DETACHED then
ComboPoints:ClearAllPoints()
if frame.ORIENTATION == "RIGHT" then
E:Point(ComboPoints, "BOTTOMRIGHT", frame.Health.backdrop, "TOPRIGHT", -frame.BORDER, frame.SPACING*3)
else
E:Point(ComboPoints, "BOTTOMLEFT", frame.Health.backdrop, "TOPLEFT", frame.BORDER, frame.SPACING*3)
end
ComboPoints:SetParent(frame)
ComboPoints:SetFrameLevel(frame:GetFrameLevel() + 5)
if ComboPoints.Holder and ComboPoints.Holder.mover then
ComboPoints.Holder.mover:SetScale(0.0001)
ComboPoints.Holder.mover:SetAlpha(0)
end
else --Detached
CLASSBAR_WIDTH = db.combobar.detachedWidth - ((frame.BORDER + frame.SPACING)*2)
E:Size(ComboPoints.Holder, db.combobar.detachedWidth, db.combobar.height)
if not ComboPoints.Holder.mover then
E:Width(ComboPoints, CLASSBAR_WIDTH)
E:Height(ComboPoints, frame.CLASSBAR_HEIGHT - ((frame.BORDER + frame.SPACING)*2))
ComboPoints:ClearAllPoints()
E:Point(ComboPoints, "BOTTOMLEFT", ComboPoints.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
E:CreateMover(ComboPoints.Holder, "ComboBarMover", L["Combobar"], nil, nil, nil, "ALL,SOLO")
else
ComboPoints:ClearAllPoints()
E:Point(ComboPoints, "BOTTOMLEFT", ComboPoints.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
ComboPoints.Holder.mover:SetScale(1)
ComboPoints.Holder.mover:SetAlpha(1)
end
if db.combobar.parent == "UIPARENT" then
ComboPoints:SetParent(E.UIParent)
else
ComboPoints:SetParent(frame)
end
if not db.combobar.strataAndLevel.useCustomStrata then
ComboPoints:SetFrameStrata("LOW")
else
ComboPoints:SetFrameStrata(db.combobar.strataAndLevel.frameStrata)
end
if not db.combobar.strataAndLevel.useCustomLevel then
ComboPoints:SetFrameLevel(frame:GetFrameLevel() + 5)
else
ComboPoints:SetFrameLevel(db.combobar.strataAndLevel.frameLevel)
end
end
E:Width(ComboPoints, CLASSBAR_WIDTH)
E:Height(ComboPoints, frame.CLASSBAR_HEIGHT - ((frame.BORDER + frame.SPACING)*2))
for i = 1, frame.MAX_CLASS_BAR do
ComboPoints[i]:SetStatusBarColor(unpack(ElvUF.colors.ComboPoints[i]))
color = E.db.unitframe.colors.borderColor
ComboPoints[i].backdrop:SetBackdropBorderColor(color.r, color.g, color.b)
color = self.db.colors.classResources.bgColor
ComboPoints[i].backdrop:SetBackdropColor(color.r, color.g, color.b)
E:Height(ComboPoints[i], ComboPoints:GetHeight())
ComboPoints[i]:Hide()
ComboPoints[i].backdrop:Hide()
if frame.USE_MINI_CLASSBAR then
if frame.CLASSBAR_DETACHED and db.combobar.orientation == "VERTICAL" then
ComboPoints[i]:SetWidth(CLASSBAR_WIDTH)
ComboPoints.Holder:SetHeight(((frame.CLASSBAR_HEIGHT + db.combobar.spacing)* frame.MAX_CLASS_BAR) - db.combobar.spacing) -- fix the holder height
elseif frame.CLASSBAR_DETACHED and db.combobar.orientation == "HORIZONTAL" then
ComboPoints[i]:SetWidth((CLASSBAR_WIDTH - ((db.combobar.spacing + (frame.BORDER*2 + frame.SPACING*2))*(frame.MAX_CLASS_BAR - 1)))/frame.MAX_CLASS_BAR)
ComboPoints.Holder:SetHeight(frame.CLASSBAR_HEIGHT)
else
ComboPoints[i]:SetWidth((CLASSBAR_WIDTH - ((5 + (frame.BORDER*2 + frame.SPACING*2))*(frame.MAX_CLASS_BAR - 1)))/frame.MAX_CLASS_BAR) --Width accounts for 5px spacing between each button, excluding borders
ComboPoints.Holder:SetHeight(frame.CLASSBAR_HEIGHT) -- set the holder height to default
end
elseif i ~= MAX_COMBO_POINTS then
E:Width(ComboPoints[i], (CLASSBAR_WIDTH - ((frame.MAX_CLASS_BAR - 1)*(frame.BORDER-frame.SPACING))) / frame.MAX_CLASS_BAR) --combobar width minus total width of dividers between each button, divided by number of buttons
end
ComboPoints[i]:ClearAllPoints()
if i == 1 then
E:Point(ComboPoints[i], "LEFT", ComboPoints)
else
if frame.USE_MINI_CLASSBAR then
if frame.CLASSBAR_DETACHED and db.combobar.orientation == "VERTICAL" then
E:Point(ComboPoints[i], "BOTTOM", ComboPoints[i - 1], "TOP", 0, (db.combobar.spacing + frame.BORDER*2 + frame.SPACING*2))
elseif frame.CLASSBAR_DETACHED and db.combobar.orientation == "HORIZONTAL" then
E:Point(ComboPoints[i], "LEFT", ComboPoints[i - 1], "RIGHT", (db.combobar.spacing + frame.BORDER*2 + frame.SPACING*2), 0) --5px spacing between borders of each button(replaced with Detached Spacing option)
else
E:Point(ComboPoints[i], "LEFT", ComboPoints[i - 1], "RIGHT", (5 + frame.BORDER*2 + frame.SPACING*2), 0) --5px spacing between borders of each button
end
elseif i == frame.MAX_CLASS_BAR then
E:Point(ComboPoints[i], "LEFT", ComboPoints[i - 1], "RIGHT", frame.BORDER-frame.SPACING, 0)
E:Point(ComboPoints[i], "RIGHT", ComboPoints)
else
E:Point(ComboPoints[i], "LEFT", ComboPoints[i - 1], "RIGHT", frame.BORDER-frame.SPACING, 0)
end
end
if not frame.USE_MINI_CLASSBAR then
ComboPoints[i].backdrop:Hide()
else
ComboPoints[i].backdrop:Show()
end
ComboPoints[i]:Show()
end
if not frame.USE_MINI_CLASSBAR then
ComboPoints.backdrop:Show()
else
ComboPoints.backdrop:Hide()
end
self:CombobarDetachedUpdate()
if frame.USE_CLASSBAR and not frame:IsElementEnabled("ComboPoints") then
frame:EnableElement("ComboPoints")
ComboPoints:Show()
elseif not frame.USE_CLASSBAR and frame:IsElementEnabled("ComboPoints") then
frame:DisableElement("ComboPoints")
ComboPoints:Hide()
end
if not frame:IsShown() then
ComboPoints:ForceUpdate()
end
end
function UF:UpdateComboDisplay(event, unit)
if unit == "pet" then return end
local db = self.db
if not db then return end
local element = self.ComboPoints
if db.combobar.enable then
if E.myclass ~= "ROGUE" and (E.myclass ~= "DRUID" or (E.myclass == "DRUID" and GetBonusBarOffset() ~= 1)) then
element:Hide()
UF.ToggleResourceBar(element)
else
local cp = GetComboPoints("player", "target")
if cp == 0 and db.combobar.autoHide then
element:Hide()
UF.ToggleResourceBar(element)
else
element:Show()
for i = 1, MAX_COMBO_POINTS do
if i <= cp then
element[i]:SetAlpha(1)
else
element[i]:SetAlpha(0.2)
end
end
UF.ToggleResourceBar(element)
end
end
else
element:Hide()
UF.ToggleResourceBar(element)
end
end
@@ -0,0 +1,52 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
local pairs = pairs
function UF:Configure_CustomTexts(frame)
local db = frame.db
--Make sure CustomTexts are hidden if they don't exist in current profile
for objectName, object in pairs(frame.customTexts) do
if (not db.customTexts) or (db.customTexts and not db.customTexts[objectName]) then
object:Hide()
frame.customTexts[objectName] = nil
end
end
if db.customTexts then
local customFont = UF.LSM:Fetch("font", UF.db.font)
for objectName in pairs(db.customTexts) do
if not frame.customTexts[objectName] then
frame.customTexts[objectName] = frame.RaisedElementParent:CreateFontString(nil, "OVERLAY")
end
local objectDB = db.customTexts[objectName]
if objectDB.font then
customFont = UF.LSM:Fetch("font", objectDB.font)
end
local attachPoint = self:GetObjectAnchorPoint(frame, objectDB.attachTextTo)
E:FontTemplate(frame.customTexts[objectName], customFont, objectDB.size or UF.db.fontSize, objectDB.fontOutline or UF.db.fontOutline)
frame.customTexts[objectName]:SetJustifyH(objectDB.justifyH or "CENTER")
frame.customTexts[objectName]:ClearAllPoints()
E:Point(frame.customTexts[objectName], objectDB.justifyH or "CENTER", attachPoint, objectDB.justifyH or "CENTER", objectDB.xOffset, objectDB.yOffset)
--This takes care of custom texts that were added before the enable option was added.
if objectDB.enable == nil then
objectDB.enable = true
end
if objectDB.enable then
frame:Tag(frame.customTexts[objectName], objectDB.text_format or "")
frame.customTexts[objectName]:Show()
else
frame:Untag(frame.customTexts[objectName])
frame.customTexts[objectName]:Hide()
end
end
end
end
@@ -0,0 +1,59 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
function UF:Construct_DebuffHighlight(frame)
local dbh = frame:CreateTexture(nil, "OVERLAY")
E:SetInside(dbh, frame.Health.backdrop)
dbh:SetTexture(E.media.blankTex)
dbh:SetVertexColor(0, 0, 0, 0)
dbh:SetBlendMode("ADD")
frame.DebuffHighlightFilter = true
frame.DebuffHighlightAlpha = 0.45
frame.DebuffHighlightFilterTable = E.global.unitframe.DebuffHighlightColors
E:CreateShadow(frame, "Default")
local x = frame.shadow
frame.shadow = nil
x:Hide()
frame.DBHGlow = x
if frame.Health then
dbh:SetParent(frame.Health)
frame.DBHGlow:SetParent(frame.Health)
end
dbh.PostUpdate = UF.PostUpdate_DebuffHighlight
return dbh
end
function UF:Configure_DebuffHighlight(frame)
if E.db.unitframe.debuffHighlighting ~= "NONE" then
frame:EnableElement("DebuffHighlight")
frame.DebuffHighlightFilterTable = E.global.unitframe.DebuffHighlightColors
if E.db.unitframe.debuffHighlighting == "GLOW" then
frame.DebuffHighlightBackdrop = true
if frame.ThreatIndicator then
frame.DBHGlow:SetAllPoints(frame.ThreatIndicator.glow)
elseif frame.TargetGlow then
frame.DBHGlow:SetAllPoints(frame.TargetGlow)
end
else
frame.DebuffHighlightBackdrop = false
end
else
frame:DisableElement("DebuffHighlight")
end
end
function UF:PostUpdate_DebuffHighlight(object, debuffType, texture, wasFiltered, style, color)
if debuffType and not wasFiltered then
color = UF.db.colors.debuffHighlight[debuffType]
if object.DebuffHighlightBackdrop and object.DBHGlow then
object.DBHGlow:SetBackdropBorderColor(color.r, color.g, color.b, color.a)
else
object.DebuffHighlight:SetVertexColor(color.r, color.g, color.b, color.a)
end
end
end
+38 -47
View File
@@ -1,12 +1,18 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
local ns = oUF
local ElvUF = ns.oUF
assert(ElvUF, "ElvUI was unable to locate oUF.")
--Cache global variables
--Lua functions
local _G = _G
local pairs = pairs
local select = select
local assert = assert
local tinsert = table.insert
--WoW API / Variables
local CreateFrame = CreateFrame
local UnitIsUnit = UnitIsUnit
local UnitReaction = UnitReaction
@@ -67,7 +73,7 @@ function UF:FrameGlow_ClassGlowPosition(frame, powerName, glow, offset, fromScri
UF:FrameGlow_HookPowerBar(frame, power, powerName, glow, offset)
end
local portrait = (frame.USE_PORTRAIT and not frame.PORTRAIT_WIDTH == 0) and (frame.Portrait and frame.Portrait.backdrop)
local portrait = (frame.USE_PORTRAIT and not frame.USE_PORTRAIT_OVERLAY) and (frame.Portrait and frame.Portrait.backdrop)
if powerName == "HappinessIndicator" and (power and power.backdrop and power:IsVisible()) then
if frame.ORIENTATION == "RIGHT" then
@@ -79,21 +85,11 @@ function UF:FrameGlow_ClassGlowPosition(frame, powerName, glow, offset, fromScri
end
else
if (power and power.backdrop and power:IsVisible()) and (not (frame.CLASSBAR_DETACHED or frame.USE_MINI_CLASSBAR)) then
if frame.ORIENTATION == "RIGHT" then
glow:SetPoint("TOPLEFT", power.backdrop, -offset, offset)
glow:SetPoint("TOPRIGHT", portrait or power.backdrop, offset, offset)
else
glow:SetPoint("TOPLEFT", portrait or power.backdrop, -offset, offset)
glow:SetPoint("TOPRIGHT", power.backdrop, offset, offset)
end
glow:SetPoint("TOPLEFT", (frame.ORIENTATION == "LEFT" and portrait) or power.backdrop, -offset, offset)
glow:SetPoint("TOPRIGHT", (frame.ORIENTATION == "RIGHT" and portrait) or power.backdrop, offset, offset)
elseif frame.Health and frame.Health.backdrop then
if frame.ORIENTATION == "RIGHT" then
glow:SetPoint("TOPLEFT", frame.Health.backdrop, -offset, offset)
glow:SetPoint("TOPRIGHT", portrait or frame.Health.backdrop, offset, offset)
else
glow:SetPoint("TOPLEFT", portrait or frame.Health.backdrop, -offset, offset)
glow:SetPoint("TOPRIGHT", frame.Health.backdrop, offset, offset)
end
glow:SetPoint("TOPLEFT", (frame.ORIENTATION == "LEFT" and portrait) or frame.Health.backdrop, -offset, offset)
glow:SetPoint("TOPRIGHT", (frame.ORIENTATION == "RIGHT" and portrait) or frame.Health.backdrop, offset, offset)
end
end
end
@@ -101,23 +97,18 @@ end
function UF:FrameGlow_PositionGlow(frame, mainGlow, powerGlow)
if not (frame and frame.VARIABLES_SET) then return end
local additionalPower = frame.AdditionalPower
local runes = frame.Runes
local infoPanel = frame.InfoPanel
local druidMana = frame.DruidAltMana
local comboPoints = frame.ComboPoints
local happiness = frame.HappinessIndicator
local power = frame.Power and frame.Power.backdrop
local health = frame.Health and frame.Health.backdrop
local portrait = (frame.USE_PORTRAIT and not frame.PORTRAIT_WIDTH ~= 0) and (frame.Portrait and frame.Portrait.backdrop)
local portrait = (frame.USE_PORTRAIT and not frame.USE_PORTRAIT_OVERLAY) and (frame.Portrait and frame.Portrait.backdrop)
local offset = (E.PixelMode and E.mult*3) or E.mult*4 -- edgeSize is 3
mainGlow:ClearAllPoints()
if frame.ORIENTATION == "RIGHT" then
mainGlow:SetPoint("TOPLEFT", health, -offset, offset)
mainGlow:SetPoint("TOPRIGHT", portrait or health, offset, offset)
else
mainGlow:SetPoint("TOPLEFT", portrait or health, -offset, offset)
mainGlow:SetPoint("TOPRIGHT", health, offset, offset)
end
mainGlow:SetPoint("TOPLEFT", (frame.ORIENTATION == "LEFT" and portrait) or health, -offset, offset)
mainGlow:SetPoint("TOPRIGHT", (frame.ORIENTATION == "RIGHT" and portrait) or health, offset, offset)
if frame.USE_POWERBAR_OFFSET or frame.USE_MINI_POWERBAR then
mainGlow:SetPoint("BOTTOMLEFT", health, -offset, -offset)
@@ -136,10 +127,8 @@ function UF:FrameGlow_PositionGlow(frame, mainGlow, powerGlow)
powerGlow:SetPoint("BOTTOMRIGHT", power, offset, -offset)
end
if additionalPower then
UF:FrameGlow_ClassGlowPosition(frame, "AdditionalPower", mainGlow, offset)
elseif runes then
UF:FrameGlow_ClassGlowPosition(frame, "Runes", mainGlow, offset)
if druidMana then
UF:FrameGlow_ClassGlowPosition(frame, "DruidAltMana", mainGlow, offset)
elseif comboPoints then
UF:FrameGlow_ClassGlowPosition(frame, "ComboPoints", mainGlow, offset)
elseif happiness then
@@ -174,15 +163,7 @@ function UF:FrameGlow_CreateGlow(frame, mouse)
if not frame.Highlight then
frame.Highlight = CreateFrame("Frame", nil, frame)
frame.Highlight:Hide()
HookScript(frame, "OnEnter", function()
frame.isHighlight = true
UF:FrameGlow_CheckMouseover(frame)
end)
HookScript(frame, "OnLeave", function()
frame.isHighlight = false
UF:FrameGlow_CheckMouseover(frame)
end)
HookScript(frame.Highlight, "OnEvent", function()
if event == "UPDATE_MOUSEOVER_UNIT" then
UF:FrameGlow_CheckMouseover(frame)
@@ -190,6 +171,23 @@ function UF:FrameGlow_CreateGlow(frame, mouse)
UF:FrameGlow_CheckTarget(frame)
end
end)
HookScript(frame, "OnEnter", function()
frame.isHighlight = true
for _, frame in ipairs(ElvUF.objects) do
if frame.unit then
UF:FrameGlow_CheckMouseover(frame)
end
end
end)
HookScript(frame, "OnLeave", function()
frame.isHighlight = false
for _, frame in ipairs(ElvUF.objects) do
if frame.unit then
UF:FrameGlow_CheckMouseover(frame)
end
end
end)
end
mainGlow.powerGlow = powerGlow
@@ -337,7 +335,6 @@ function UF:FrameGlow_CheckMouseover(frame, onEnter)
frame.Highlight.texture:Hide()
end
end
if (shouldShow == "both" or shouldShow == "texture") and frame.Highlight.texture and not frame.Highlight.texture:IsShown() then
frame.Highlight.texture:Show()
end
@@ -371,7 +368,6 @@ function UF:Construct_HighlightGlow(frame, glow)
end
end)
frame.Highlight:Show()
frame.Highlight:SetScript("OnUpdate", function()
if this.elapsed and this.elapsed > 0.1 then
if not UF:FrameGlow_MouseOnUnit(frame) then
@@ -429,11 +425,6 @@ function UF:FrameGlow_UpdateFrames()
UF:FrameGlow_ConfigureGlow(self[unit], unit, dbTexture)
end
-- arena{1-5}, boss{1-5}
for unit in pairs(self.groupunits) do
UF:FrameGlow_ConfigureGlow(self[unit], unit, dbTexture)
end
-- assist, tank, party, raid, raid40, raidpet
for groupName in pairs(self.headers) do
assert(self[groupName], "UF FrameGlow: Invalid group specified.")
@@ -457,4 +448,4 @@ function UF:FrameGlow_UpdateFrames()
end
end
end
end
end
@@ -1,9 +1,6 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
--WoW API / Variables
local CreateFrame = CreateFrame
@@ -0,0 +1,128 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
local CreateFrame = CreateFrame
function UF:Construct_Happiness(frame)
local HappinessIndicator = CreateFrame("Statusbar", nil, frame)
HappinessIndicator.backdrop = CreateFrame("Frame", nil, HappinessIndicator)
UF["statusbars"][HappinessIndicator] = true
E:SetTemplate(HappinessIndicator.backdrop, "Default", nil, nil, self.thinBorders, true)
HappinessIndicator.backdrop:SetFrameLevel(HappinessIndicator:GetFrameLevel() - 1)
E:SetInside(HappinessIndicator, HappinessIndicator.backdrop)
HappinessIndicator:SetOrientation("VERTICAL")
HappinessIndicator:SetMinMaxValues(0, 100)
HappinessIndicator:SetFrameLevel(50)
HappinessIndicator.bg = HappinessIndicator:CreateTexture(nil, "BORDER")
HappinessIndicator.bg:SetAllPoints(HappinessIndicator)
HappinessIndicator.bg:SetTexture(E.media.blankTex)
HappinessIndicator.bg.multiplier = 0.3
HappinessIndicator.Override = UF.HappinessOverride
return HappinessIndicator
end
function UF:Configure_Happiness(frame)
if not frame.VARIABLES_SET then return end
local HappinessIndicator = frame.HappinessIndicator
local db = frame.db
frame.HAPPINESS_WIDTH = HappinessIndicator and frame.HAPPINESS_SHOWN and (db.happiness.width + (frame.BORDER*3)) or 0
if db.happiness.enable then
if not frame:IsElementEnabled("HappinessIndicator") then
frame:EnableElement("HappinessIndicator")
end
HappinessIndicator.backdrop:ClearAllPoints()
if db.power.enable and not frame.USE_MINI_POWERBAR and not frame.USE_INSET_POWERBAR and not frame.POWERBAR_DETACHED and not frame.USE_POWERBAR_OFFSET then
if frame.ORIENTATION == "RIGHT" then
E:Point(HappinessIndicator.backdrop, "BOTTOMRIGHT", frame.Power, "BOTTOMLEFT", -frame.BORDER + (frame.BORDER - frame.SPACING*3), -frame.BORDER)
E:Point(HappinessIndicator.backdrop, "TOPLEFT", frame.Health, "TOPLEFT", -frame.HAPPINESS_WIDTH, frame.BORDER)
else
E:Point(HappinessIndicator.backdrop, "BOTTOMLEFT", frame.Power, "BOTTOMRIGHT", frame.BORDER + (-frame.BORDER + frame.SPACING*3), -frame.BORDER)
E:Point(HappinessIndicator.backdrop, "TOPRIGHT", frame.Health, "TOPRIGHT", frame.HAPPINESS_WIDTH, frame.BORDER)
end
else
if frame.ORIENTATION == "RIGHT" then
E:Point(HappinessIndicator.backdrop, "BOTTOMRIGHT", frame.Health, "BOTTOMLEFT", -frame.BORDER + (frame.BORDER - frame.SPACING*3), -frame.BORDER)
E:Point(HappinessIndicator.backdrop, "TOPLEFT", frame.Health, "TOPLEFT", -frame.HAPPINESS_WIDTH, frame.BORDER)
else
E:Point(HappinessIndicator.backdrop, "BOTTOMLEFT", frame.Health, "BOTTOMRIGHT", frame.BORDER + (-frame.BORDER + frame.SPACING*3), -frame.BORDER)
E:Point(HappinessIndicator.backdrop, "TOPRIGHT", frame.Health, "TOPRIGHT", frame.HAPPINESS_WIDTH, frame.BORDER)
end
end
else
if frame:IsElementEnabled("HappinessIndicator") then
frame:DisableElement("HappinessIndicator")
end
end
end
function UF:HappinessOverride(event, unit)
if not unit or self.unit ~= unit then return end
local db = self.db
if not db then return end
local element = self.HappinessIndicator
if element.PreUpdate then
element:PreUpdate()
end
local _, hunterPet = HasPetUI()
local happiness, damagePercentage = GetPetHappiness()
local value, r, g, b
if hunterPet and happiness then
if damagePercentage == 75 then
value = 33
r, g, b = 0.8, 0.2, 0.1
elseif damagePercentage == 100 then
value = 66
r, g, b = 1, 1, 0
elseif damagePercentage == 125 then
value = 100
r, g, b = 0, 0.8, 0
end
element:SetValue(value)
element:SetStatusBarColor(r, g, b)
element.bg:SetVertexColor(r, g, b, 0.15)
if damagePercentage == 125 and db.happiness.autoHide then
element:Hide()
else
element:Show()
end
else
return element:Hide()
end
local isShown = element:IsShown()
local stateChanged
if (self.HAPPINESS_SHOWN and not isShown) or (not self.HAPPINESS_SHOWN and isShown) then
stateChanged = true
end
self.HAPPINESS_SHOWN = isShown
if stateChanged then
UF:Configure_Happiness(self)
UF:Configure_HealthBar(self)
UF:Configure_Power(self)
UF:Configure_InfoPanel(self, true)
end
if element.PostUpdate then
return element:PostUpdate(unit, happiness, damagePercentage)
end
end
+5 -5
View File
@@ -99,10 +99,10 @@ function UF:Configure_HealthBar(frame)
--Position
health:ClearAllPoints()
if frame.ORIENTATION == "LEFT" then
health:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -frame.BORDER - frame.SPACING, -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
health:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -frame.BORDER - frame.SPACING - (frame.HAPPINESS_WIDTH or 0), -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
if frame.USE_POWERBAR_OFFSET then
health:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -frame.BORDER - frame.SPACING - frame.POWERBAR_OFFSET, -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
health:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -frame.BORDER - frame.SPACING - frame.POWERBAR_OFFSET - (frame.HAPPINESS_WIDTH or 0), -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET"TOPLEFT", frame, "TOPLEFT", frame.BORDER + frame.SPACING + (frame.HAPPINESS_WIDTH or 0), -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
health:SetWidth(frame.UNIT_WIDTH - (frame.PORTRAIT_WIDTH + frame.BORDER + frame.SPACING) - (frame.BORDER + frame.SPACING + frame.POWERBAR_OFFSET))
health:SetHeight(frame.UNIT_HEIGHT - (frame.BORDER + frame.SPACING + frame.POWERBAR_OFFSET) - (frame.BORDER + frame.SPACING + frame.CLASSBAR_YOFFSET))
elseif frame.POWERBAR_DETACHED or not frame.USE_POWERBAR or frame.USE_INSET_POWERBAR then
@@ -116,10 +116,10 @@ function UF:Configure_HealthBar(frame)
health:SetHeight(frame.UNIT_HEIGHT - (frame.BORDER + frame.SPACING + frame.CLASSBAR_YOFFSET) - (frame.BORDER + frame.SPACING + frame.BOTTOM_OFFSET))
end
elseif frame.ORIENTATION == "RIGHT" then
health:SetPoint("TOPLEFT", frame, "TOPLEFT", frame.BORDER + frame.SPACING, -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
health:SetPoint("TOPLEFT", frame, "TOPLEFT", frame.BORDER + frame.SPACING + (frame.HAPPINESS_WIDTH or 0), -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
if frame.USE_POWERBAR_OFFSET then
health:SetPoint("TOPLEFT", frame, "TOPLEFT", frame.BORDER + frame.SPACING + frame.POWERBAR_OFFSET, -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
health:SetPoint("TOPLEFT", frame, "TOPLEFT", frame.BORDER + frame.SPACING + frame.POWERBAR_OFFSET + (frame.HAPPINESS_WIDTH or 0), -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
health:SetWidth(frame.UNIT_WIDTH - (frame.PORTRAIT_WIDTH + frame.BORDER + frame.SPACING) - (frame.BORDER + frame.SPACING + frame.POWERBAR_OFFSET))
health:SetHeight(frame.UNIT_HEIGHT - (frame.BORDER + frame.SPACING + frame.POWERBAR_OFFSET) - (frame.BORDER + frame.SPACING + frame.CLASSBAR_YOFFSET))
elseif frame.POWERBAR_DETACHED or not frame.USE_POWERBAR or frame.USE_INSET_POWERBAR then
@@ -133,7 +133,7 @@ function UF:Configure_HealthBar(frame)
health:SetHeight(frame.UNIT_HEIGHT - (frame.BORDER + frame.SPACING + frame.CLASSBAR_YOFFSET) - (frame.BORDER + frame.SPACING + frame.BOTTOM_OFFSET))
end
elseif frame.ORIENTATION == "MIDDLE" then
health:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -frame.BORDER - frame.SPACING, -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
health:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -frame.BORDER - frame.SPACING - (frame.HAPPINESS_WIDTH or 0), -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
if frame.USE_POWERBAR_OFFSET then
health:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -frame.BORDER - frame.SPACING - frame.POWERBAR_OFFSET, -frame.BORDER - frame.SPACING - frame.CLASSBAR_YOFFSET)
@@ -22,16 +22,16 @@ function UF:Configure_InfoPanel(frame, noTemplateChange)
if frame.ORIENTATION == "RIGHT" then
frame.InfoPanel:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -frame.BORDER - frame.SPACING, frame.BORDER + frame.SPACING)
if frame.USE_POWERBAR and not frame.USE_INSET_POWERBAR and not frame.POWERBAR_DETACHED then
frame.InfoPanel:SetPoint("TOPLEFT", frame.Power.backdrop, "BOTTOMLEFT", frame.BORDER, -(frame.SPACING*3))
frame.InfoPanel:SetPoint("TOPLEFT", frame.Power.backdrop, "BOTTOMLEFT", frame.BORDER - (frame.HAPPINESS_WIDTH or 0), -(frame.SPACING*3))
else
frame.InfoPanel:SetPoint("TOPLEFT", frame.Health.backdrop, "BOTTOMLEFT", frame.BORDER, -(frame.SPACING*3))
frame.InfoPanel:SetPoint("TOPLEFT", frame.Health.backdrop, "BOTTOMLEFT", frame.BORDER - (frame.HAPPINESS_WIDTH or 0), -(frame.SPACING*3))
end
else
frame.InfoPanel:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
if frame.USE_POWERBAR and not frame.USE_INSET_POWERBAR and not frame.POWERBAR_DETACHED then
frame.InfoPanel:SetPoint("TOPRIGHT", frame.Power.backdrop, "BOTTOMRIGHT", -frame.BORDER, -(frame.SPACING*3))
frame.InfoPanel:SetPoint("TOPRIGHT", frame.Power.backdrop, "BOTTOMRIGHT", -frame.BORDER + (frame.HAPPINESS_WIDTH or 0), -(frame.SPACING*3))
else
frame.InfoPanel:SetPoint("TOPRIGHT", frame.Health.backdrop, "BOTTOMRIGHT", -frame.BORDER, -(frame.SPACING*3))
frame.InfoPanel:SetPoint("TOPRIGHT", frame.Health.backdrop, "BOTTOMRIGHT", -frame.BORDER + (frame.HAPPINESS_WIDTH or 0), -(frame.SPACING*3))
end
end
@@ -2,17 +2,25 @@
<Script file="AuraBars.lua"/>
<Script file="Auras.lua"/>
<Script file="Castbar.lua"/>
<Script file="Classbars.lua"/>
<Script file="CombatIndicator.lua"/>
<Script file="ComboPoints.lua"/>
<Script file="CustomText.lua"/>
<Script file="DebuffHighlight.lua"/>
<Script file="GPS.lua"/>
<Script file="Happiness.lua"/>
<Script file="Health.lua"/>
<Script file="Name.lua"/>
<Script file="Portrait.lua"/>
<Script file="Power.lua"/>
<Script file="InfoPanel.lua"/>
<Script file="PvPIcon.lua"/>
<Script file="PvPIndicator.lua"/>
<Script file="RaidIcon.lua"/>
<Script file="RaidRoleIcons.lua"/>
<Script file="Range.lua"/>
<Script file="ReadyCheckIcon.lua"/>
<Script file="RestingIndicator.lua"/>
<Script file="ResurrectionIcon.lua"/>
<Script file="FrameGlow.lua"/>
</Ui>
+69 -71
View File
@@ -1,119 +1,117 @@
local E, L, V, P, G = unpack(ElvUI);
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
local CreateFrame = CreateFrame;
--WoW API / Variables
local CreateFrame = CreateFrame
function UF:Construct_Portrait(frame, type)
local portrait;
if(type == "texture") then
local backdrop = CreateFrame("Frame", nil, frame);
portrait = frame:CreateTexture(nil, "OVERLAY");
portrait:SetTexCoord(0.15, 0.85, 0.15, 0.85);
E:SetOutside(backdrop, portrait);
backdrop:SetFrameLevel(frame:GetFrameLevel());
E:SetTemplate(backdrop, "Default");
portrait.backdrop = backdrop;
local portrait
if type == "texture" then
local backdrop = CreateFrame("Frame", nil, frame)
portrait = frame:CreateTexture(nil, "OVERLAY")
portrait:SetTexCoord(0.15, 0.85, 0.15, 0.85)
E:SetOutside(backdrop, portrait)
backdrop:SetFrameLevel(frame:GetFrameLevel())
E:SetTemplate(backdrop, "Default")
portrait.backdrop = backdrop
else
portrait = CreateFrame("PlayerModel", nil, frame);
portrait = CreateFrame("PlayerModel", nil, frame)
E:CreateBackdrop(portrait, "Default", nil, nil, self.thinBorders, true)
end
portrait.PostUpdate = self.PortraitUpdate;
portrait.PostUpdate = self.PortraitUpdate
portrait.overlay = CreateFrame("Frame", nil, frame);
portrait.overlay:SetFrameLevel(frame.Health:GetFrameLevel() + 5);
portrait.overlay = CreateFrame("Frame", nil, frame)
portrait.overlay:SetFrameLevel(frame.Health:GetFrameLevel() + 5) --Set to "frame.Health:GetFrameLevel()" if you don"t want portrait cut off.
return portrait;
return portrait
end
function UF:Configure_Portrait(frame, dontHide)
if(not frame.VARIABLES_SET) then return; end
local db = frame.db;
if(frame.Portrait and not dontHide) then
frame.Portrait:Hide();
frame.Portrait:ClearAllPoints();
frame.Portrait.backdrop:Hide();
if not frame.VARIABLES_SET then return end
local db = frame.db
if frame.Portrait and not dontHide then
frame.Portrait:Hide()
frame.Portrait:ClearAllPoints()
frame.Portrait.backdrop:Hide()
end
frame.Portrait = db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D;
frame.Portrait = db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D
local portrait = frame.Portrait;
if(frame.USE_PORTRAIT) then
if(not frame:IsElementEnabled("Portrait")) then
frame:EnableElement("Portrait", frame.unit);
local portrait = frame.Portrait
if frame.USE_PORTRAIT then
if not frame:IsElementEnabled("Portrait") then
frame:EnableElement("Portrait")
end
local color = E.db.unitframe.colors.borderColor
portrait.backdrop:SetBackdropBorderColor(color.r, color.g, color.b)
portrait:ClearAllPoints();
portrait.backdrop:ClearAllPoints();
if(frame.USE_PORTRAIT_OVERLAY) then
if(db.portrait.style == "3D") then
portrait:SetFrameLevel(frame.Health:GetFrameLevel() + 1);
portrait:ClearAllPoints()
portrait.backdrop:ClearAllPoints()
if frame.USE_PORTRAIT_OVERLAY then
if db.portrait.style == "3D" then
portrait:SetFrameLevel(frame.Health:GetFrameLevel())
else
portrait:SetParent(frame.Health);
portrait:SetParent(frame.Health)
end
--portrait:SetAllPoints(frame.Health);
portrait:SetWidth(frame.Health:GetWidth())
portrait:SetHeight(frame.Health:GetHeight())
portrait:SetPoint("TOPLEFT", frame.Health, "TOPLEFT", 0, -frame.BORDER)
portrait:SetAlpha(0.35);
if(not dontHide) then
portrait:Show();
portrait:SetAllPoints(frame.Health)
portrait:SetAlpha(0.35)
if not dontHide then
portrait:Show()
end
portrait.backdrop:Hide();
portrait.backdrop:Hide()
else
portrait:SetAlpha(1);
if(not dontHide) then
portrait:Show();
portrait:SetAlpha(1)
if not dontHide then
portrait:Show()
end
portrait.backdrop:Show();
if(db.portrait.style == "3D") then
portrait:SetFrameLevel(frame.Health:GetFrameLevel() - 4);
portrait.backdrop:Show()
if db.portrait.style == "3D" then
portrait:SetFrameLevel(frame.Health:GetFrameLevel() - 4) --Make sure portrait is behind Health and Power
else
portrait:SetParent(frame.Health);
portrait:SetParent(frame)
end
if(frame.ORIENTATION == "LEFT") then
portrait.backdrop:SetPoint("TOPLEFT", frame, "TOPLEFT", frame.SPACING, frame.USE_MINI_CLASSBAR and -(frame.CLASSBAR_YOFFSET+frame.SPACING) or -frame.SPACING);
if frame.ORIENTATION == "LEFT" then
E:Point(portrait.backdrop, "TOPLEFT", frame, "TOPLEFT", frame.SPACING, frame.USE_MINI_CLASSBAR and -(frame.CLASSBAR_YOFFSET+frame.SPACING) or -frame.SPACING)
if(frame.USE_MINI_POWERBAR or frame.USE_POWERBAR_OFFSET or not frame.USE_POWERBAR or frame.USE_INSET_POWERBAR or frame.POWERBAR_DETACHED) then
portrait.backdrop:SetPoint("BOTTOMRIGHT", frame.Health.backdrop, "BOTTOMLEFT", frame.BORDER - frame.SPACING*3, 0);
if frame.USE_MINI_POWERBAR or frame.USE_POWERBAR_OFFSET or not frame.USE_POWERBAR or frame.USE_INSET_POWERBAR or frame.POWERBAR_DETACHED then
E:Point(portrait.backdrop, "BOTTOMRIGHT", frame.Health.backdrop, "BOTTOMLEFT", frame.BORDER - frame.SPACING*3, 0)
else
portrait.backdrop:SetPoint("BOTTOMRIGHT", frame.Power.backdrop, "BOTTOMLEFT", frame.BORDER - frame.SPACING*3, 0);
E:Point(portrait.backdrop, "BOTTOMRIGHT", frame.Power.backdrop, "BOTTOMLEFT", frame.BORDER - frame.SPACING*3, 0)
end
elseif(frame.ORIENTATION == "RIGHT") then
portrait.backdrop:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -frame.SPACING, frame.USE_MINI_CLASSBAR and -(frame.CLASSBAR_YOFFSET+frame.SPACING) or -frame.SPACING);
elseif frame.ORIENTATION == "RIGHT" then
E:Point(portrait.backdrop, "TOPRIGHT", frame, "TOPRIGHT", -frame.SPACING, frame.USE_MINI_CLASSBAR and -(frame.CLASSBAR_YOFFSET+frame.SPACING) or -frame.SPACING)
if(frame.USE_MINI_POWERBAR or frame.USE_POWERBAR_OFFSET or not frame.USE_POWERBAR or frame.USE_INSET_POWERBAR or frame.POWERBAR_DETACHED) then
portrait.backdrop:SetPoint("BOTTOMLEFT", frame.Health.backdrop, "BOTTOMRIGHT", -frame.BORDER + frame.SPACING*3, 0);
if frame.USE_MINI_POWERBAR or frame.USE_POWERBAR_OFFSET or not frame.USE_POWERBAR or frame.USE_INSET_POWERBAR or frame.POWERBAR_DETACHED then
E:Point(portrait.backdrop, "BOTTOMLEFT", frame.Health.backdrop, "BOTTOMRIGHT", -frame.BORDER + frame.SPACING*3, 0)
else
portrait.backdrop:SetPoint("BOTTOMLEFT", frame.Power.backdrop, "BOTTOMRIGHT", -frame.BORDER + frame.SPACING*3, 0);
E:Point(portrait.backdrop, "BOTTOMLEFT", frame.Power.backdrop, "BOTTOMRIGHT", -frame.BORDER + frame.SPACING*3, 0)
end
end
E:SetInside(portrait, portrait.backdrop, frame.BORDER);
E:SetInside(portrait, portrait.backdrop, frame.BORDER)
end
else
if(frame:IsElementEnabled("Portrait")) then
frame:DisableElement("Portrait");
portrait:Hide();
portrait.backdrop:Hide();
if frame:IsElementEnabled("Portrait") then
frame:DisableElement("Portrait")
portrait:Hide()
portrait.backdrop:Hide()
end
end
end
function UF:PortraitUpdate()
local db = self:GetParent().db;
if(not db) then return; end
local db = self:GetParent().db
if not db then return end
local portrait = db.portrait;
if(portrait.enable and self:GetParent().USE_PORTRAIT_OVERLAY) then
self:SetAlpha(0);
self:SetAlpha(0.35);
local portrait = db.portrait
if portrait.enable and self:GetParent().USE_PORTRAIT_OVERLAY then
self:SetAlpha(0)
self:SetAlpha(0.35)
else
self:SetAlpha(1)
end
end
end
+6 -6
View File
@@ -132,17 +132,17 @@ function UF:Configure_Power(frame)
power.backdrop:SetFrameLevel(49)
elseif frame.USE_POWERBAR_OFFSET then
if frame.ORIENTATION == "LEFT" then
power:SetPoint("TOPRIGHT", frame.Health, "TOPRIGHT", frame.POWERBAR_OFFSET, -frame.POWERBAR_OFFSET)
power:SetPoint("TOPRIGHT", frame.Health, "TOPRIGHT", frame.POWERBAR_OFFSET + frame.HAPPINESS_WIDTH, -frame.POWERBAR_OFFSET)
power:SetWidth(frame.UNIT_WIDTH - (frame.PORTRAIT_WIDTH + frame.BORDER + frame.SPACING) - (frame.BORDER + frame.SPACING + frame.POWERBAR_OFFSET))
power:SetHeight(frame.UNIT_HEIGHT - (frame.BORDER + frame.SPACING + frame.POWERBAR_OFFSET) - (frame.BORDER + frame.SPACING + frame.CLASSBAR_YOFFSET))
elseif frame.ORIENTATION == "MIDDLE" then
power:SetPoint("TOPLEFT", frame, "TOPLEFT", frame.BORDER + frame.SPACING, -frame.POWERBAR_OFFSET -frame.CLASSBAR_YOFFSET)
power:SetWidth(frame.UNIT_WIDTH - frame.PORTRAIT_WIDTH - ((frame.BORDER + frame.SPACING) * 2))
power:SetHeight(frame.UNIT_HEIGHT - (frame.POWERBAR_OFFSET + frame.CLASSBAR_YOFFSET) - frame.BORDER)
power:SetPoint("TOPLEFT", frame, "TOPLEFT", frame.BORDER + frame.SPACING, -frame.POWERBAR_OFFSET -frame.CLASSBAR_YOFFSET)
else
power:SetPoint("TOPLEFT", frame.Health, "TOPLEFT", -frame.POWERBAR_OFFSET - frame.HAPPINESS_WIDTH, -frame.POWERBAR_OFFSET)
power:SetWidth(frame.UNIT_WIDTH - frame.PORTRAIT_WIDTH - frame.POWERBAR_OFFSET)
power:SetHeight(frame.UNIT_HEIGHT - frame.POWERBAR_OFFSET)
power:SetPoint("TOPLEFT", frame.Health, "TOPLEFT", -frame.POWERBAR_OFFSET, -frame.POWERBAR_OFFSET)
end
power:SetFrameLevel(frame.Health:GetFrameLevel() -5) --Health uses 10
power.backdrop:SetFrameLevel(frame.Health:GetFrameLevel() - 6)
@@ -158,14 +158,14 @@ function UF:Configure_Power(frame)
if frame.ORIENTATION == "LEFT" then
power:SetWidth(frame.POWERBAR_WIDTH - frame.BORDER*2)
power:SetPoint("RIGHT", frame, "BOTTOMRIGHT", -(frame.BORDER*2 + 4), ((frame.POWERBAR_HEIGHT-frame.BORDER)/2))
power:SetPoint("RIGHT", frame, "BOTTOMRIGHT", -(frame.BORDER*2 + 4) -frame.HAPPINESS_WIDTH, ((frame.POWERBAR_HEIGHT-frame.BORDER)/2))
elseif frame.ORIENTATION == "RIGHT" then
power:SetWidth(frame.POWERBAR_WIDTH - frame.BORDER*2)
power:SetPoint("LEFT", frame, "BOTTOMLEFT", (frame.BORDER*2 + 4), ((frame.POWERBAR_HEIGHT-frame.BORDER)/2))
power:SetPoint("LEFT", frame, "BOTTOMLEFT", (frame.BORDER*2 + 4) +frame.HAPPINESS_WIDTH, ((frame.POWERBAR_HEIGHT-frame.BORDER)/2))
else
power:SetWidth(frame.UNIT_WIDTH - ((frame.BORDER*2 + 4) * 2))
power:SetHeight(frame.POWERBAR_HEIGHT - frame.BORDER*2)
power:SetPoint("LEFT", frame, "BOTTOMLEFT", (frame.BORDER*2 + 4), ((frame.POWERBAR_HEIGHT-frame.BORDER)/2))
power:SetPoint("RIGHT", frame, "BOTTOMRIGHT", -(frame.BORDER*2 + 4) -frame.HAPPINESS_WIDTH, ((frame.POWERBAR_HEIGHT-frame.BORDER)/2))
end
power:SetFrameLevel(50)
@@ -0,0 +1,67 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
function UF:Construct_PvPIcon(frame)
local PvPIndicator = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "ARTWORK")
E:Size(PvPIndicator, 30, 30)
PvPIndicator:SetPoint("CENTER", frame, "CENTER")
PvPIndicator.Override = UF.UpdateOverridePvP
return PvPIndicator
end
function UF:Configure_PVPIcon(frame)
local PvPIndicator = frame.PvPIndicator
PvPIndicator:ClearAllPoints()
E:Point(PvPIndicator, frame.db.pvpIcon.anchorPoint, frame.Health, frame.db.pvpIcon.anchorPoint, frame.db.pvpIcon.xOffset, frame.db.pvpIcon.yOffset)
local scale = frame.db.pvpIcon.scale or 1
E:Size(PvPIndicator, 30 * scale)
if frame.db.pvpIcon.enable and not frame:IsElementEnabled("PvPIndicator") then
frame:EnableElement("PvPIndicator")
elseif not frame.db.pvpIcon.enable and frame:IsElementEnabled("PvPIndicator") then
frame:DisableElement("PvPIndicator")
end
end
function UF:UpdateOverridePvP(event, unit)
if not unit or self.unit ~= unit then return end
local element = self.PvPIndicator
if element.PreUpdate then
element:PreUpdate()
end
local status
local factionGroup = UnitFactionGroup(unit)
if UnitIsPVPFreeForAll(unit) then
element:SetTexture("Interface\\TargetingFrame\\UI-PVP-FFA")
element:SetTexCoord(0, 0.65625, 0, 0.65625)
status = "ffa"
elseif factionGroup and UnitIsPVP(unit) then
element:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\PVP-Icons")
if factionGroup == "Alliance" then
element:SetTexCoord(0.545, 0.935, 0.070, 0.940)
else
element:SetTexCoord(0.100, 0.475, 0.070, 0.940)
end
status = factionGroup
end
if status then
element:Show()
else
element:Hide()
end
if element.PostUpdate then
return element:PostUpdate(unit, status)
end
end
@@ -1,4 +1,4 @@
local E, L, V, P, G = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
function UF:Construct_RaidIcon(frame)
@@ -1,12 +1,13 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
--WoW API / Variables
local CreateFrame = CreateFrame
local ns = oUF
local ElvUF = ns.oUF
assert(ElvUF, "ElvUI was unable to locate oUF.")
function UF:Construct_RaidRoleFrames(frame)
local anchor = CreateFrame("Frame", nil, frame.RaisedElementParent)
frame.LeaderIndicator = anchor:CreateTexture(nil, "OVERLAY")
@@ -39,7 +40,7 @@ function UF:Configure_RaidRoleIcons(frame)
frame:EnableElement("MasterLooterIndicator")
frame:EnableElement("AssistantIndicator")
end
raidRoleFrameAnchor:ClearAllPoints()
if frame.db.raidRoleIcons.position == "TOPLEFT" then
raidRoleFrameAnchor:SetPoint("LEFT", frame.Health, "TOPLEFT", 2, 0)
+5 -5
View File
@@ -1,4 +1,4 @@
local E, L, V, P, G = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
function UF:Construct_Range()
@@ -11,14 +11,14 @@ end
function UF:Configure_Range(frame)
local range = frame.Range
if frame.db.rangeCheck then
if not frame:IsElementEnabled('Range') then
frame:EnableElement('Range')
if not frame:IsElementEnabled("Range") then
frame:EnableElement("Range")
end
range.outsideAlpha = E.db.unitframe.OORAlpha
else
if frame:IsElementEnabled('Range') then
frame:DisableElement('Range')
if frame:IsElementEnabled("Range") then
frame:DisableElement("Range")
end
end
end
@@ -0,0 +1,28 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
function UF:Construct_ReadyCheckIcon(frame)
local tex = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
E:Size(tex, 12)
E:Point(tex, "BOTTOM", frame.Health, "BOTTOM", 0, 2)
return tex
end
function UF:Configure_ReadyCheckIcon(frame)
local ReadyCheckIndicator = frame.ReadyCheckIndicator
local db = frame.db
if db.readycheckIcon.enable then
if not frame:IsElementEnabled("ReadyCheckIndicator") then
frame:EnableElement("ReadyCheckIndicator")
end
local attachPoint = self:GetObjectAnchorPoint(frame, db.readycheckIcon.attachTo)
ReadyCheckIndicator:ClearAllPoints()
E:Point(ReadyCheckIndicator, db.readycheckIcon.position, attachPoint, db.readycheckIcon.position, db.readycheckIcon.xOffset, db.readycheckIcon.yOffset)
E:Size(ReadyCheckIndicator, db.readycheckIcon.size)
else
frame:DisableElement("ReadyCheckIndicator")
end
end
@@ -1,40 +1,54 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
--WoW API / Variables
local RestingTextures = {
["DEFAULT"] = [[Interface\CharacterFrame\UI-StateIcon]],
["RESTING"] = [[Interface\AddOns\ElvUI\media\textures\resting]],
["RESTING1"] = [[Interface\AddOns\ElvUI\media\textures\resting1]]
}
function UF:Construct_RestingIndicator(frame)
local resting = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
resting:SetWidth(22)
resting:SetHeight(22)
return resting
return frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
end
function UF:Configure_RestingIndicator(frame)
if not frame.VARIABLES_SET then return end
local rIcon = frame.RestingIndicator
local db = frame.db
if db.restIcon then
local Icon = frame.RestingIndicator
local db = frame.db.RestIcon
if db.enable then
if not frame:IsElementEnabled("RestingIndicator") then
frame:EnableElement("RestingIndicator")
end
rIcon:ClearAllPoints()
if frame.ORIENTATION == "RIGHT" then
rIcon:SetPoint("CENTER", frame.Health, "TOPLEFT", -3, 6)
if db.defaultColor then
Icon:SetVertexColor(1, 1, 1, 1)
Icon:SetDesaturated(false)
else
if frame.USE_PORTRAIT and not frame.USE_PORTRAIT_OVERLAY then
rIcon:SetPoint("CENTER", frame.Portrait, "TOPLEFT", -3, 6)
else
rIcon:SetPoint("CENTER", frame.Health, "TOPLEFT", -3, 6)
end
Icon:SetVertexColor(db.color.r, db.color.g, db.color.b, db.color.a)
Icon:SetDesaturated(true)
end
if db.texture == "CUSTOM" and db.customTexture then
Icon:SetTexture(db.customTexture)
Icon:SetTexCoord(0, 1, 0, 1)
elseif db.texture ~= "DEFAULT" and RestingTextures[db.texture] then
Icon:SetTexture(RestingTextures[db.texture])
Icon:SetTexCoord(0, 1, 0, 1)
else
Icon:SetTexture(RestingTextures.DEFAULT)
Icon:SetTexCoord(0, .5, 0, .421875)
end
E:Size(Icon, db.size)
Icon:ClearAllPoints()
if frame.ORIENTATION ~= "RIGHT" and (frame.USE_PORTRAIT and not frame.USE_PORTRAIT_OVERLAY) then
E:Point(Icon, "CENTER", frame.Portrait, db.anchorPoint, db.xOffset, db.yOffset)
else
E:Point(Icon, "CENTER", frame.Health, db.anchorPoint, db.xOffset, db.yOffset)
end
elseif frame:IsElementEnabled("RestingIndicator") then
frame:DisableElement("RestingIndicator")
rIcon:Hide()
end
end
@@ -0,0 +1,34 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
function UF:Construct_ResurrectionIcon(frame)
local tex = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
tex:SetTexture([[Interface\AddOns\ElvUI\media\textures\Raid-Icon-Rez]])
E:Point(tex, "CENTER", frame.Health, "CENTER")
E:Size(tex, 30)
tex:SetDrawLayer("OVERLAY", 7)
return tex
end
function UF:Configure_ResurrectionIcon(frame)
local RI = frame.ResurrectIndicator
local db = frame.db
if db.resurrectIcon.enable then
if not frame:IsElementEnabled("ResurrectIndicator") then
frame:EnableElement("ResurrectIndicator")
end
RI:Show()
E:Size(RI, db.resurrectIcon.size)
local attachPoint = self:GetObjectAnchorPoint(frame, db.resurrectIcon.attachToObject)
RI:ClearAllPoints()
E:Point(RI, db.resurrectIcon.attachTo, attachPoint, db.resurrectIcon.attachTo, db.resurrectIcon.xOffset, db.resurrectIcon.yOffset)
else
if frame:IsElementEnabled("ResurrectIndicator") then
frame:DisableElement("ResurrectIndicator")
end
RI:Hide()
end
end
+5 -3
View File
@@ -1,8 +1,10 @@
local E, L, V, P, G = unpack(ElvUI)
local UF = E:GetModule("UnitFrames")
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
local _G = _G
--WoW API / Variables
local CreateFrame = CreateFrame
local ns = oUF
-2
View File
@@ -1,8 +1,6 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
--WoW API / Variables
local CreateFrame = CreateFrame
+7 -4
View File
@@ -8,7 +8,7 @@ UF.LSM = LSM
local _G = _G
local select, pairs, type, unpack, assert, tostring = select, pairs, type, unpack, assert, tostring
local min = math.min
local tinsert = table.insert
local tremove, tinsert = table.remove, table.insert
local find, gsub, format = string.find, string.gsub, string.format
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
@@ -25,11 +25,13 @@ ElvUF = ns.oUF
assert(ElvUF, "ElvUI was unable to locate oUF.")
UF.headerstoload = {}
UF.unitgroupstoload = {}
UF.unitstoload = {}
UF.groupPrototype = {}
UF.headerPrototype = {}
UF.headers = {}
UF.groupunits = {}
UF.units = {}
UF.statusbars = {}
@@ -202,6 +204,7 @@ function UF:Construct_UF(frame, unit)
end
frame.SHADOW_SPACING = 3
frame.HAPPINESS_WIDTH = 0
frame.CLASSBAR_YOFFSET = 0 --placeholder
frame.BOTTOM_OFFSET = 0 --placeholder
@@ -301,12 +304,12 @@ function UF:UpdateColors()
ElvUF.colors.power[2] = E:GetColorTable(db.power.FOCUS);
ElvUF.colors.power[3] = E:GetColorTable(db.power.ENERGY);
--[[ElvUF.colors.ComboPoints = {}
ElvUF.colors.ComboPoints = {}
ElvUF.colors.ComboPoints[1] = E:GetColorTable(db.classResources.comboPoints[1])
ElvUF.colors.ComboPoints[2] = E:GetColorTable(db.classResources.comboPoints[2])
ElvUF.colors.ComboPoints[3] = E:GetColorTable(db.classResources.comboPoints[3])
ElvUF.colors.ComboPoints[4] = E:GetColorTable(db.classResources.comboPoints[4])
ElvUF.colors.ComboPoints[5] = E:GetColorTable(db.classResources.comboPoints[5])]]
ElvUF.colors.ComboPoints[5] = E:GetColorTable(db.classResources.comboPoints[5])
ElvUF.colors.reaction[1] = bad
ElvUF.colors.reaction[2] = bad
@@ -1092,4 +1095,4 @@ local function InitializeCallback()
UF:Initialize()
end
E:RegisterInitialModule(UF:GetName(), InitializeCallback)
E:RegisterInitialModule(UF:GetName(), InitializeCallback)
+18 -8
View File
@@ -12,19 +12,20 @@ assert(ElvUF, "ElvUI was unable to locate oUF.")
function UF:Construct_PetFrame(frame)
frame.Health = self:Construct_HealthBar(frame, true, true, "RIGHT")
frame.Health.frequentUpdates = true
frame.Power = self:Construct_PowerBar(frame, true, true, "LEFT")
frame.Power.frequentUpdates = true
frame.Name = self:Construct_NameText(frame)
frame.Portrait3D = self:Construct_Portrait(frame, "model")
frame.Portrait2D = self:Construct_Portrait(frame, "texture")
frame.Buffs = self:Construct_Buffs(frame)
frame.Debuffs = self:Construct_Debuffs(frame)
frame.InfoPanel = self:Construct_InfoPanel(frame)
frame.Range = self:Construct_Range(frame)
if E.myclass == "HUNTER" then
frame.HappinessIndicator = self:Construct_Happiness(frame)
end
frame.MouseGlow = self:Construct_MouseGlow(frame)
frame.TargetGlow = self:Construct_TargetGlow(frame)
frame.InfoPanel = self:Construct_InfoPanel(frame)
frame.customTexts = {}
E:Point(frame, "BOTTOM", E.UIParent, "BOTTOM", 0, 118)
E:CreateMover(frame, frame:GetName().."Mover", L["Pet Frame"], nil, nil, nil, "ALL,SOLO")
@@ -56,6 +57,9 @@ function UF:Update_PetFrame(frame, db)
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
frame.HAPPINESS_SHOWN = frame.HappinessIndicator and frame.HappinessIndicator:IsShown()
frame.HAPPINESS_WIDTH = frame.HAPPINESS_SHOWN and (db.happiness.width + (frame.BORDER*2)) or 0
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
frame.VARIABLES_SET = true
@@ -64,7 +68,6 @@ function UF:Update_PetFrame(frame, db)
frame.colors = ElvUF.colors
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight())
@@ -82,8 +85,15 @@ function UF:Update_PetFrame(frame, db)
UF:Configure_Auras(frame, "Buffs")
UF:Configure_Auras(frame, "Debuffs")
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
UF:Configure_Range(frame)
if E.myclass == "HUNTER" then
UF:Configure_Happiness(frame)
end
UF:Configure_CustomTexts(frame)
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
tinsert(UF.unitstoload, "pet")
tinsert(UF.unitstoload, "pet")
+40 -8
View File
@@ -4,6 +4,8 @@ local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
local _G = _G
--WoW API / Variables
local CreateFrame = CreateFrame
local ns = oUF
local ElvUF = ns.oUF
@@ -14,25 +16,40 @@ local CAN_HAVE_CLASSBAR = E.myclass == "DRUID"
function UF:Construct_PlayerFrame(frame)
frame.Health = self:Construct_HealthBar(frame, true, true, "RIGHT")
frame.Health.frequentUpdates = true
frame.Power = self:Construct_PowerBar(frame, true, true, "LEFT")
frame.Power.frequentUpdates = true
frame.Name = self:Construct_NameText(frame)
frame.Portrait3D = self:Construct_Portrait(frame, "model")
frame.Portrait2D = self:Construct_Portrait(frame, "texture")
frame.Buffs = self:Construct_Buffs(frame)
frame.Debuffs = self:Construct_Debuffs(frame)
frame.Castbar = self:Construct_Castbar(frame, L["Player Castbar"])
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
if CAN_HAVE_CLASSBAR then
frame.ClassBarHolder = CreateFrame("Frame", nil, frame)
E:Point(frame.ClassBarHolder, "BOTTOM", E.UIParent, "BOTTOM", 0, 150)
end
if E.myclass == "DRUID" then
frame.DruidAltMana = self:Construct_DruidAltMana(frame)
frame.ClassBar = "DruidAltMana"
end
frame.MouseGlow = self:Construct_MouseGlow(frame)
frame.TargetGlow = self:Construct_TargetGlow(frame)
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
frame.RaidRoleFramesAnchor = self:Construct_RaidRoleFrames(frame)
frame.RestingIndicator = self:Construct_RestingIndicator(frame)
frame.CombatIndicator = self:Construct_CombatIndicator(frame)
frame.PvPText = self:Construct_PvPIndicator(frame)
frame.DebuffHighlight = self:Construct_DebuffHighlight(frame)
frame.InfoPanel = self:Construct_InfoPanel(frame)
frame.PvPIndicator = self:Construct_PvPIcon(frame)
frame.CombatFade = true
frame.customTexts = {}
frame:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOM", -413, 68)
E:CreateMover(frame, frame:GetName().."Mover", L["Player Frame"], nil, nil, nil, "ALL,SOLO")
E:Point(frame, "BOTTOMLEFT", E.UIParent, "BOTTOM", -413, 68)
E:CreateMover(frame, frame:GetName().."Mover", L["Player Frame"], nil, nil, nil, "ALL,SOLO", nil, "unitframe,player,generalGroup")
frame.unitframeType = "player"
end
@@ -61,7 +78,7 @@ function UF:Update_PlayerFrame(frame, db)
frame.CAN_HAVE_CLASSBAR = CAN_HAVE_CLASSBAR
frame.MAX_CLASS_BAR = frame.MAX_CLASS_BAR or UF.classMaxResourceBar[E.myclass] or 0
frame.USE_CLASSBAR = db.classbar.enable and frame.CAN_HAVE_CLASSBAR
frame.CLASSBAR_SHOWN = frame.CAN_HAVE_CLASSBAR and frame.ClassBar and frame[frame.ClassBar]:IsShown()
frame.CLASSBAR_SHOWN = frame.CAN_HAVE_CLASSBAR and frame[frame.ClassBar]:IsShown()
frame.CLASSBAR_DETACHED = db.classbar.detachFromFrame
frame.USE_MINI_CLASSBAR = db.classbar.fill == "spaced" and frame.USE_CLASSBAR
frame.CLASSBAR_HEIGHT = frame.USE_CLASSBAR and db.classbar.height or 0
@@ -81,7 +98,6 @@ function UF:Update_PlayerFrame(frame, db)
frame.colors = ElvUF.colors
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight())
@@ -107,8 +123,24 @@ function UF:Update_PlayerFrame(frame, db)
UF:Configure_Castbar(frame)
UF:Configure_ClassBar(frame)
if db.combatfade and not frame:IsElementEnabled("CombatFade") then
frame:EnableElement("CombatFade")
elseif not db.combatfade and frame:IsElementEnabled("CombatFade") then
frame:DisableElement("CombatFade")
end
UF:Configure_DebuffHighlight(frame)
UF:Configure_RaidIcon(frame)
UF:Configure_PVPIcon(frame)
UF:Configure_RaidRoleIcons(frame)
UF:Configure_CustomTexts(frame)
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
+30 -4
View File
@@ -4,6 +4,8 @@ local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
local _G = _G
--WoW API / Variables
local CreateFrame = CreateFrame
local ns = oUF
local ElvUF = ns.oUF
@@ -12,21 +14,31 @@ assert(ElvUF, "ElvUI was unable to locate oUF.")
function UF:Construct_TargetFrame(frame)
frame.Health = self:Construct_HealthBar(frame, true, true, "RIGHT")
frame.Health.frequentUpdates = true
frame.Power = self:Construct_PowerBar(frame, true, true, "LEFT")
frame.Power.frequentUpdates = true
frame.Name = self:Construct_NameText(frame)
frame.Portrait3D = self:Construct_Portrait(frame, "model")
frame.Portrait2D = self:Construct_Portrait(frame, "texture")
frame.Buffs = self:Construct_Buffs(frame)
frame.Debuffs = self:Construct_Debuffs(frame)
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
frame.Castbar = self:Construct_Castbar(frame, L["Target Castbar"])
frame.Castbar.SafeZone = nil
frame.Castbar.LatencyTexture:Hide()
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
frame.ComboPointsHolder = CreateFrame("Frame", nil, frame)
E:Point(frame.ComboPointsHolder, "BOTTOM", E.UIParent, "BOTTOM", 0, 200)
frame.ComboPoints = self:Construct_Combobar(frame)
frame.DebuffHighlight = self:Construct_DebuffHighlight(frame)
frame.GPS = self:Construct_GPS(frame)
frame.InfoPanel = self:Construct_InfoPanel(frame)
frame.MouseGlow = self:Construct_MouseGlow(frame)
frame.TargetGlow = self:Construct_TargetGlow(frame)
frame.AuraBars = self:Construct_AuraBarHeader(frame)
frame.Range = self:Construct_Range(frame)
frame.PvPIndicator = self:Construct_PvPIcon(frame)
frame.customTexts = {}
E:Point(frame, "BOTTOMRIGHT", E.UIParent, "BOTTOM", 413, 68)
E:CreateMover(frame, frame:GetName().."Mover", L["Target Frame"], nil, nil, nil, "ALL,SOLO")
@@ -94,10 +106,24 @@ function UF:Update_TargetFrame(frame, db)
UF:Configure_Auras(frame, "Buffs")
UF:Configure_Auras(frame, "Debuffs")
UF:Configure_Castbar(frame)
UF:Configure_ComboPoints(frame)
UF:Configure_DebuffHighlight(frame)
UF:Configure_GPS(frame)
UF:Configure_RaidIcon(frame)
UF:Configure_AuraBars(frame)
UF:Configure_Range(frame)
UF:Configure_PVPIcon(frame)
UF:Configure_CustomTexts(frame)
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
@@ -16,13 +16,18 @@ function UF:Construct_TargetTargetFrame(frame)
frame.Portrait3D = self:Construct_Portrait(frame, "model")
frame.Portrait2D = self:Construct_Portrait(frame, "texture")
frame.Buffs = self:Construct_Buffs(frame)
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
frame.Debuffs = self:Construct_Debuffs(frame)
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
frame.Range = self:Construct_Range(frame)
-- frame.ThreatIndicator = self:Construct_Threat(frame)
frame.InfoPanel = self:Construct_InfoPanel(frame)
frame.MouseGlow = self:Construct_MouseGlow(frame)
frame.TargetGlow = self:Construct_TargetGlow(frame)
frame.customTexts = {}
E:Point(frame, "BOTTOM", E.UIParent, "BOTTOM", 0, 75)
E:CreateMover(frame, frame:GetName().."Mover", L["TargetTarget Frame"], nil, nil, nil, "ALL,SOLO")
frame.unitframeType = "targettarget";
frame.unitframeType = "targettarget"
end
function UF:Update_TargetTargetFrame(frame, db)
@@ -58,7 +63,6 @@ function UF:Update_TargetTargetFrame(frame, db)
frame.colors = ElvUF.colors
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
frame:RegisterForClicks("LeftButtonUp", "RightButtonUp")
E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight())
@@ -72,13 +76,19 @@ function UF:Update_TargetTargetFrame(frame, db)
UF:Configure_Portrait(frame)
-- UF:Configure_Threat(frame)
UF:EnableDisable_Auras(frame)
UF:Configure_Auras(frame, "Buffs")
UF:Configure_Auras(frame, "Debuffs")
UF:Configure_Range(frame)
UF:Configure_RaidIcon(frame)
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + self.db["units"].player.castbar.height))
UF:Configure_CustomTexts(frame)
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + self.db.units.player.castbar.height))
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
@@ -1,6 +1,8 @@
local E, L, V, P, G = unpack(ElvUI)
local UF = E:GetModule("UnitFrames")
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule("UnitFrames");
--Cache global variables
--Lua functions
local _G = _G
local ns = oUF
@@ -24,7 +26,7 @@ function UF:Construct_TargetTargetTargetFrame(frame)
frame.customTexts = {}
E:Point(frame, "BOTTOM", E.UIParent, "BOTTOM", 0, 160)
E:CreateMover(frame, frame:GetName().."Mover", L["TargetTargetTarget Frame"], nil, nil, nil, "ALL,SOLO", nil, "unitframe,targettargettarget,generalGroup")
E:CreateMover(frame, frame:GetName().."Mover", L["TargetTargetTarget Frame"], nil, nil, nil, "ALL,SOLO")
frame.unitframeType = "targettargettarget"
end
@@ -60,7 +62,7 @@ function UF:Update_TargetTargetTargetFrame(frame, db)
frame.colors = ElvUF.colors
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "RightButtonDown" or "LeftButtonUp" or "RightButtonUp")
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight())
@@ -84,7 +86,7 @@ function UF:Update_TargetTargetTargetFrame(frame, db)
UF:Configure_RaidIcon(frame)
-- UF:Configure_CustomTexts(frame)
UF:Configure_CustomTexts(frame)
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + self.db.units.player.castbar.height))
frame:UpdateAllElements("ElvUI_UpdateAllElements")
+1136 -178
View File
File diff suppressed because it is too large Load Diff