mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
test
This commit is contained in:
@@ -7,7 +7,6 @@ local format = string.format
|
|||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local hooksecurefunc = hooksecurefunc
|
|
||||||
|
|
||||||
local ICON_SIZE = 36 --the normal size for an icon (don't change this)
|
local ICON_SIZE = 36 --the normal size for an icon (don't change this)
|
||||||
local FONT_SIZE = 20 --the base font size to use at a scale of 1
|
local FONT_SIZE = 20 --the base font size to use at a scale of 1
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ local GameTooltip_Hide = GameTooltip_Hide
|
|||||||
local GetBindingKey = GetBindingKey
|
local GetBindingKey = GetBindingKey
|
||||||
local GetCurrentBindingSet = GetCurrentBindingSet
|
local GetCurrentBindingSet = GetCurrentBindingSet
|
||||||
local GetMacroInfo = GetMacroInfo
|
local GetMacroInfo = GetMacroInfo
|
||||||
local hooksecurefunc = hooksecurefunc
|
|
||||||
local IsAddOnLoaded = IsAddOnLoaded
|
local IsAddOnLoaded = IsAddOnLoaded
|
||||||
local IsAltKeyDown = IsAltKeyDown
|
local IsAltKeyDown = IsAltKeyDown
|
||||||
local IsControlKeyDown = IsControlKeyDown
|
local IsControlKeyDown = IsControlKeyDown
|
||||||
|
|||||||
@@ -42,16 +42,32 @@ function UF:Construct_PartyFrames()
|
|||||||
return self;
|
return self;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function UF:PartySmartVisibility()
|
||||||
|
if not self then self = this end
|
||||||
|
|
||||||
|
if GetNumRaidMembers() < 1 then
|
||||||
|
self:Show()
|
||||||
|
else
|
||||||
|
self:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function UF:Update_PartyHeader(header)
|
function UF:Update_PartyHeader(header)
|
||||||
if not header.positioned then
|
if not header.positioned then
|
||||||
header:ClearAllPoints()
|
header:ClearAllPoints()
|
||||||
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||||
|
|
||||||
E:CreateMover(header, header:GetName().."Mover", L["Party Frames"], nil, nil, nil, "ALL,PARTY")
|
E:CreateMover(header, header:GetName().."Mover", L["Party Frames"], nil, nil, nil, "ALL,PARTY")
|
||||||
|
|
||||||
|
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||||
|
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
|
header:SetScript("OnEvent", UF["PartySmartVisibility"])
|
||||||
|
|
||||||
header.positioned = true
|
header.positioned = true
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
|
UF.PartySmartVisibility(header)
|
||||||
|
end
|
||||||
|
|
||||||
function UF:Update_PartyFrames(frame, db)
|
function UF:Update_PartyFrames(frame, db)
|
||||||
frame.db = db
|
frame.db = db
|
||||||
|
|||||||
@@ -42,14 +42,31 @@ function UF:Construct_RaidFrames()
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function UF:RaidSmartVisibility()
|
||||||
|
if not self then self = this end
|
||||||
|
|
||||||
|
if GetNumRaidMembers() > 1 then
|
||||||
|
self:Show()
|
||||||
|
else
|
||||||
|
self:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function UF:Update_RaidHeader(header)
|
function UF:Update_RaidHeader(header)
|
||||||
if not header.positioned then
|
if not header.positioned then
|
||||||
header:ClearAllPoints()
|
header:ClearAllPoints()
|
||||||
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||||
|
|
||||||
E:CreateMover(header, header:GetName().."Mover", L["Raid Frames"], nil, nil, nil, "ALL,RAID")
|
E:CreateMover(header, header:GetName().."Mover", L["Raid Frames"], nil, nil, nil, "ALL,RAID")
|
||||||
|
|
||||||
|
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||||
|
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
|
header:SetScript("OnEvent", UF["RaidSmartVisibility"])
|
||||||
|
|
||||||
header.positioned = true
|
header.positioned = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
UF.RaidSmartVisibility(header)
|
||||||
end
|
end
|
||||||
|
|
||||||
function UF:Update_RaidFrames(frame, db)
|
function UF:Update_RaidFrames(frame, db)
|
||||||
|
|||||||
Reference in New Issue
Block a user