mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
load oUF_GPS (in-progress)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
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
|
||||
|
||||
function UF:Construct_GPS(frame)
|
||||
local gps = CreateFrame("Frame", nil, frame)
|
||||
gps:SetFrameLevel(frame:GetFrameLevel() + 50)
|
||||
-- gps:Hide()
|
||||
|
||||
gps.Texture = gps:CreateTexture("OVERLAY")
|
||||
gps.Texture:SetTexture([[Interface\AddOns\ElvUI\media\textures\arrow.tga]])
|
||||
gps.Texture:SetBlendMode("BLEND")
|
||||
gps.Texture:SetVertexColor(214/255, 41/255, 41/255)
|
||||
gps.Texture:SetAllPoints()
|
||||
|
||||
return gps
|
||||
end
|
||||
|
||||
function UF:Configure_GPS(frame)
|
||||
local GPS = frame.GPS
|
||||
if frame.db.GPSArrow.enable then
|
||||
if not frame:IsElementEnabled("GPS") then
|
||||
frame:EnableElement("GPS")
|
||||
end
|
||||
|
||||
E:Size(GPS, frame.db.GPSArrow.size)
|
||||
GPS.onMouseOver = frame.db.GPSArrow.onMouseOver
|
||||
GPS.outOfRange = frame.db.GPSArrow.outOfRange
|
||||
|
||||
E:Point(GPS, "CENTER", frame, "CENTER", frame.db.GPSArrow.xOffset, frame.db.GPSArrow.yOffset)
|
||||
else
|
||||
if frame:IsElementEnabled("GPS") then
|
||||
frame:DisableElement("GPS")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2,6 +2,7 @@
|
||||
<Script file="AuraBars.lua"/>
|
||||
<Script file="Auras.lua"/>
|
||||
<Script file="CombatIndicator.lua"/>
|
||||
<Script file="GPS.lua"/>
|
||||
<Script file="Health.lua"/>
|
||||
<Script file="Name.lua"/>
|
||||
<Script file="Portrait.lua"/>
|
||||
|
||||
@@ -5,9 +5,6 @@ local _G = _G
|
||||
local tinsert = table.insert
|
||||
|
||||
local CreateFrame = CreateFrame
|
||||
local InCombatLockdown = InCombatLockdown
|
||||
local UnregisterStateDriver = UnregisterStateDriver
|
||||
local RegisterStateDriver = RegisterStateDriver
|
||||
local IsInInstance = IsInInstance
|
||||
|
||||
local ns = oUF
|
||||
@@ -33,6 +30,7 @@ function UF:Construct_PartyFrames()
|
||||
self.RaidRoleFramesAnchor = UF:Construct_RaidRoleFrames(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
|
||||
self.GPS = UF:Construct_GPS(self)
|
||||
self.unitframeType = "party"
|
||||
|
||||
UF:Update_StatusBars()
|
||||
@@ -114,6 +112,8 @@ function UF:Update_PartyFrames(frame, db)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_GPS(frame)
|
||||
|
||||
UF:Configure_RaidRoleIcons(frame)
|
||||
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
|
||||
@@ -23,6 +23,7 @@ function UF:Construct_TargetFrame(frame)
|
||||
frame.Buffs = self:Construct_Buffs(frame)
|
||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
|
||||
frame.GPS = self:Construct_GPS(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.AuraBars = self:Construct_AuraBarHeader(frame)
|
||||
|
||||
@@ -88,6 +89,8 @@ function UF:Update_TargetFrame(frame, db)
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
|
||||
UF:Configure_GPS(frame)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
|
||||
|
||||
Reference in New Issue
Block a user