mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update CaptureBar
This commit is contained in:
@@ -11,56 +11,43 @@ local pvpHolder = CreateFrame("Frame", "PvPHolder", E.UIParent)
|
|||||||
function B:WorldStateAlwaysUpFrame_Update()
|
function B:WorldStateAlwaysUpFrame_Update()
|
||||||
local captureBar
|
local captureBar
|
||||||
for i = 1, NUM_EXTENDED_UI_FRAMES do
|
for i = 1, NUM_EXTENDED_UI_FRAMES do
|
||||||
captureBar = _G["WorldStateCaptureBar" .. i]
|
captureBar = _G["WorldStateCaptureBar"..i]
|
||||||
|
|
||||||
if captureBar and captureBar:IsShown() then
|
if captureBar and captureBar:IsShown() then
|
||||||
captureBar:ClearAllPoints()
|
captureBar:ClearAllPoints()
|
||||||
captureBar:SetPoint("TOP", WorldStateAlwaysUpFrame, "BOTTOM", 0, -80)
|
E:Point(captureBar, "TOP", pvpHolder, "BOTTOM", 0, -75)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
WorldStateAlwaysUpFrame:ClearAllPoints()
|
|
||||||
WorldStateAlwaysUpFrame:SetPoint("CENTER", pvpHolder, "CENTER", 0, 10)
|
|
||||||
|
|
||||||
if AlwaysUpFrame1 then
|
|
||||||
AlwaysUpFrame1:ClearAllPoints()
|
|
||||||
AlwaysUpFrame1:SetPoint("CENTER", WorldStateAlwaysUpFrame, "CENTER", 0, 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
if AlwaysUpFrame2 then
|
|
||||||
AlwaysUpFrame2:SetPoint("TOP", AlwaysUpFrame1, "BOTTOM", 0, -5)
|
|
||||||
end
|
|
||||||
|
|
||||||
local offset = 0
|
|
||||||
|
|
||||||
for i = 1, NUM_ALWAYS_UP_UI_FRAMES do
|
for i = 1, NUM_ALWAYS_UP_UI_FRAMES do
|
||||||
local frameText = _G["AlwaysUpFrame"..i.."Text"]
|
local frame = _G["AlwaysUpFrame"..i]
|
||||||
local frameIcon = _G["AlwaysUpFrame"..i.."Icon"]
|
local text = _G["AlwaysUpFrame"..i.."Text"]
|
||||||
local frameIcon2 = _G["AlwaysUpFrame"..i.."DynamicIconButton"]
|
local icon = _G["AlwaysUpFrame"..i.."Icon"]
|
||||||
|
local dynamic = _G["AlwaysUpFrame"..i.."DynamicIconButton"]
|
||||||
|
|
||||||
frameText:ClearAllPoints()
|
if frame then
|
||||||
frameText:SetPoint("CENTER", WorldStateAlwaysUpFrame, "CENTER", 0, offset)
|
if i == 1 then
|
||||||
frameText:SetJustifyH("CENTER")
|
frame:ClearAllPoints()
|
||||||
|
E:Point(frame, "CENTER", pvpHolder, "CENTER", 0, 5)
|
||||||
|
end
|
||||||
|
|
||||||
frameIcon:ClearAllPoints()
|
text:ClearAllPoints()
|
||||||
frameIcon:SetPoint("CENTER", frameText, "LEFT", -7, -9)
|
E:Point(text, "CENTER", frame, "CENTER", 0, 0)
|
||||||
frameIcon:SetWidth(38)
|
|
||||||
frameIcon:SetHeight(38)
|
|
||||||
|
|
||||||
frameIcon2:ClearAllPoints()
|
icon:ClearAllPoints()
|
||||||
frameIcon2:SetPoint("LEFT", frameText, "RIGHT", 5, 0)
|
E:Point(icon, "CENTER", text, "LEFT", -10, -9)
|
||||||
frameIcon2:SetWidth(38)
|
|
||||||
frameIcon2:SetHeight(38)
|
|
||||||
|
|
||||||
offset = offset - 25
|
dynamic:ClearAllPoints()
|
||||||
|
E:Point(dynamic, "LEFT", text, "RIGHT", 5, 0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function B:PositionCaptureBar()
|
function B:PositionCaptureBar()
|
||||||
self:SecureHook("WorldStateAlwaysUpFrame_Update")
|
self:SecureHook("WorldStateAlwaysUpFrame_Update")
|
||||||
|
|
||||||
pvpHolder:SetWidth(30)
|
E:Size(pvpHolder, 30, 70)
|
||||||
pvpHolder:SetHeight(70)
|
E:Point(pvpHolder, "TOP", E.UIParent, "TOP", 0, -4)
|
||||||
pvpHolder:SetPoint("TOP", E.UIParent, "TOP", 0, -4)
|
|
||||||
|
|
||||||
E:CreateMover(pvpHolder, "PvPMover", L["PvP"], nil, nil, nil, "ALL")
|
E:CreateMover(pvpHolder, "PvPMover", L["PvP"], nil, nil, nil, "ALL")
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user