mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 05:20:49 +00:00
thirdparty: move dpsmate to multiclient support
This commit is contained in:
@@ -159,87 +159,6 @@ pfUI:RegisterModule("thirdparty-vanilla", "vanilla", function()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
HookAddonOrVariable("DPSMate", function()
|
|
||||||
local docktable = { "dpsmate", "DPSMate", "DPSMate_DPSMate",
|
|
||||||
function() -- single
|
|
||||||
DPSMate_DPSMate:ClearAllPoints()
|
|
||||||
DPSMate_DPSMate:SetAllPoints(pfUI.chat.right)
|
|
||||||
DPSMate_DPSMate:SetWidth(pfUI.chat.right:GetWidth())
|
|
||||||
DPSMate_DPSMate_ScrollFrame:ClearAllPoints()
|
|
||||||
DPSMate_DPSMate_ScrollFrame:SetWidth(pfUI.chat.right:GetWidth())
|
|
||||||
DPSMate_DPSMate_ScrollFrame:SetPoint("TOPLEFT", DPSMate_DPSMate_Head, "BOTTOMLEFT", 0, 0)
|
|
||||||
DPSMate_DPSMate_ScrollFrame:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, pfUI.panel.right:GetHeight())
|
|
||||||
DPSMate_DPSMate_ScrollFrame_Child:SetWidth(pfUI.chat.right:GetWidth())
|
|
||||||
DPSMate_DPSMate_Resize:Hide()
|
|
||||||
end,
|
|
||||||
function() -- dual
|
|
||||||
DPSMate_DPSMate:ClearAllPoints()
|
|
||||||
DPSMate_DPSMate:SetPoint("TOPLEFT", pfUI.chat.right, "TOP", 0, 0)
|
|
||||||
DPSMate_DPSMate:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, 0)
|
|
||||||
DPSMate_DPSMate:SetWidth(pfUI.chat.right:GetWidth() / 2)
|
|
||||||
DPSMate_DPSMate_ScrollFrame:ClearAllPoints()
|
|
||||||
DPSMate_DPSMate_ScrollFrame:SetWidth(pfUI.chat.right:GetWidth() / 2)
|
|
||||||
DPSMate_DPSMate_ScrollFrame:SetPoint("TOPLEFT", DPSMate_DPSMate_Head, "BOTTOMLEFT", 0, 0)
|
|
||||||
DPSMate_DPSMate_ScrollFrame:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, pfUI.panel.right:GetHeight())
|
|
||||||
DPSMate_DPSMate_ScrollFrame_Child:SetWidth(pfUI.chat.right:GetWidth() / 2)
|
|
||||||
DPSMate_DPSMate_Resize:Hide()
|
|
||||||
end,
|
|
||||||
function() -- show
|
|
||||||
DPSMate_DPSMate:Show()
|
|
||||||
end,
|
|
||||||
function() -- hide
|
|
||||||
DPSMate_DPSMate:Hide()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
pfUI.thirdparty.meters:RegisterMeter("damage", docktable)
|
|
||||||
|
|
||||||
if C.thirdparty.dpsmate.skin == "1" then
|
|
||||||
if DPSMateSettings then
|
|
||||||
-- set DPSMate appearance to match pfUI
|
|
||||||
for w in pairs(DPSMateSettings["windows"]) do
|
|
||||||
DPSMateSettings["windows"][w]["titlebarheight"] = 20
|
|
||||||
DPSMateSettings["windows"][w]["titlebarfontsize"] = 12
|
|
||||||
DPSMateSettings["windows"][w]["titlebarfont"] = "Accidental Presidency"
|
|
||||||
DPSMateSettings["windows"][w]["titlebaropacity"] = 0
|
|
||||||
|
|
||||||
DPSMateSettings["windows"][w]["titlebarfontcolor"][1] = 1
|
|
||||||
DPSMateSettings["windows"][w]["titlebarfontcolor"][2] = 1
|
|
||||||
DPSMateSettings["windows"][w]["titlebarfontcolor"][3] = 1
|
|
||||||
|
|
||||||
DPSMateSettings["windows"][w]["barheight"] = 11
|
|
||||||
DPSMateSettings["windows"][w]["barfontsize"] = 13
|
|
||||||
DPSMateSettings["windows"][w]["bartexture"] = "normTex"
|
|
||||||
DPSMateSettings["windows"][w]["barfont"] = "Accidental Presidency"
|
|
||||||
|
|
||||||
DPSMateSettings["windows"][w]["opacity"] = 1
|
|
||||||
DPSMateSettings["windows"][w]["contentbgtexture"] = "Solid Background"
|
|
||||||
DPSMateSettings["windows"][w]["bgopacity"] = 0
|
|
||||||
DPSMateSettings["windows"][w]["borderopacity"] = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
if DPSMate.UpdatePointer then
|
|
||||||
DPSMate:UpdatePointer()
|
|
||||||
end
|
|
||||||
DPSMate:InitializeFrames()
|
|
||||||
|
|
||||||
for k, val in pairs(DPSMateSettings["windows"]) do
|
|
||||||
local frame = _G["DPSMate_"..val["name"]]
|
|
||||||
CreateBackdrop(frame, nil, nil, (C.thirdparty.chatbg == "1" and .8))
|
|
||||||
CreateBackdropShadow(frame)
|
|
||||||
|
|
||||||
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
|
|
||||||
local r, g, b, a = strsplit(",", C.chat.global.background)
|
|
||||||
frame.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
|
||||||
|
|
||||||
local r, g, b, a = strsplit(",", C.chat.global.border)
|
|
||||||
frame.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
HookAddonOrVariable("SW_Stats", function()
|
HookAddonOrVariable("SW_Stats", function()
|
||||||
local docktable = { "swstats", "TODO", "SW_BarFrame1",
|
local docktable = { "swstats", "TODO", "SW_BarFrame1",
|
||||||
function() -- single
|
function() -- single
|
||||||
|
|||||||
@@ -205,4 +205,88 @@ pfUI:RegisterModule("thirdparty", "vanilla:tbc", function()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- DPSMate Damage Meter
|
||||||
|
-- Vanilla: https://github.com/Geigerkind/DPSMate
|
||||||
|
-- TBC: https://github.com/Geigerkind/DPSMateTBC
|
||||||
|
HookAddonOrVariable("DPSMate", function()
|
||||||
|
local docktable = { "dpsmate", "DPSMate", "DPSMate_DPSMate",
|
||||||
|
function() -- single
|
||||||
|
DPSMate_DPSMate:ClearAllPoints()
|
||||||
|
DPSMate_DPSMate:SetAllPoints(pfUI.chat.right)
|
||||||
|
DPSMate_DPSMate:SetWidth(pfUI.chat.right:GetWidth())
|
||||||
|
DPSMate_DPSMate_ScrollFrame:ClearAllPoints()
|
||||||
|
DPSMate_DPSMate_ScrollFrame:SetWidth(pfUI.chat.right:GetWidth())
|
||||||
|
DPSMate_DPSMate_ScrollFrame:SetPoint("TOPLEFT", DPSMate_DPSMate_Head, "BOTTOMLEFT", 0, 0)
|
||||||
|
DPSMate_DPSMate_ScrollFrame:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, pfUI.panel.right:GetHeight())
|
||||||
|
DPSMate_DPSMate_ScrollFrame_Child:SetWidth(pfUI.chat.right:GetWidth())
|
||||||
|
DPSMate_DPSMate_Resize:Hide()
|
||||||
|
end,
|
||||||
|
function() -- dual
|
||||||
|
DPSMate_DPSMate:ClearAllPoints()
|
||||||
|
DPSMate_DPSMate:SetPoint("TOPLEFT", pfUI.chat.right, "TOP", 0, 0)
|
||||||
|
DPSMate_DPSMate:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, 0)
|
||||||
|
DPSMate_DPSMate:SetWidth(pfUI.chat.right:GetWidth() / 2)
|
||||||
|
DPSMate_DPSMate_ScrollFrame:ClearAllPoints()
|
||||||
|
DPSMate_DPSMate_ScrollFrame:SetWidth(pfUI.chat.right:GetWidth() / 2)
|
||||||
|
DPSMate_DPSMate_ScrollFrame:SetPoint("TOPLEFT", DPSMate_DPSMate_Head, "BOTTOMLEFT", 0, 0)
|
||||||
|
DPSMate_DPSMate_ScrollFrame:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, pfUI.panel.right:GetHeight())
|
||||||
|
DPSMate_DPSMate_ScrollFrame_Child:SetWidth(pfUI.chat.right:GetWidth() / 2)
|
||||||
|
DPSMate_DPSMate_Resize:Hide()
|
||||||
|
end,
|
||||||
|
function() -- show
|
||||||
|
DPSMate_DPSMate:Show()
|
||||||
|
end,
|
||||||
|
function() -- hide
|
||||||
|
DPSMate_DPSMate:Hide()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
pfUI.thirdparty.meters:RegisterMeter("damage", docktable)
|
||||||
|
|
||||||
|
if C.thirdparty.dpsmate.skin == "1" then
|
||||||
|
if DPSMateSettings then
|
||||||
|
-- set DPSMate appearance to match pfUI
|
||||||
|
for w in pairs(DPSMateSettings["windows"]) do
|
||||||
|
DPSMateSettings["windows"][w]["titlebarheight"] = 20
|
||||||
|
DPSMateSettings["windows"][w]["titlebarfontsize"] = 12
|
||||||
|
DPSMateSettings["windows"][w]["titlebarfont"] = "Accidental Presidency"
|
||||||
|
DPSMateSettings["windows"][w]["titlebaropacity"] = 0
|
||||||
|
|
||||||
|
DPSMateSettings["windows"][w]["titlebarfontcolor"][1] = 1
|
||||||
|
DPSMateSettings["windows"][w]["titlebarfontcolor"][2] = 1
|
||||||
|
DPSMateSettings["windows"][w]["titlebarfontcolor"][3] = 1
|
||||||
|
|
||||||
|
DPSMateSettings["windows"][w]["barheight"] = 11
|
||||||
|
DPSMateSettings["windows"][w]["barfontsize"] = 13
|
||||||
|
DPSMateSettings["windows"][w]["bartexture"] = "normTex"
|
||||||
|
DPSMateSettings["windows"][w]["barfont"] = "Accidental Presidency"
|
||||||
|
|
||||||
|
DPSMateSettings["windows"][w]["opacity"] = 1
|
||||||
|
DPSMateSettings["windows"][w]["contentbgtexture"] = "Solid Background"
|
||||||
|
DPSMateSettings["windows"][w]["bgopacity"] = 0
|
||||||
|
DPSMateSettings["windows"][w]["borderopacity"] = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if DPSMate.UpdatePointer then
|
||||||
|
DPSMate:UpdatePointer()
|
||||||
|
end
|
||||||
|
DPSMate:InitializeFrames()
|
||||||
|
|
||||||
|
for k, val in pairs(DPSMateSettings["windows"]) do
|
||||||
|
local frame = _G["DPSMate_"..val["name"]]
|
||||||
|
CreateBackdrop(frame, nil, nil, (C.thirdparty.chatbg == "1" and .8))
|
||||||
|
CreateBackdropShadow(frame)
|
||||||
|
|
||||||
|
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
|
||||||
|
local r, g, b, a = strsplit(",", C.chat.global.background)
|
||||||
|
frame.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||||
|
|
||||||
|
local r, g, b, a = strsplit(",", C.chat.global.border)
|
||||||
|
frame.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user