mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-18 10:40:48 +00:00
DPSMate integration
This commit is contained in:
+2
-1
@@ -24,8 +24,9 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("panel", "right", "center", "time")
|
pfUI:UpdateConfig("panel", "right", "center", "time")
|
||||||
pfUI:UpdateConfig("panel", "right", "right", "gold")
|
pfUI:UpdateConfig("panel", "right", "right", "gold")
|
||||||
pfUI:UpdateConfig("panel", "other", "minimap", "zone")
|
pfUI:UpdateConfig("panel", "other", "minimap", "zone")
|
||||||
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
|
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
|
||||||
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
||||||
|
pfUI:UpdateConfig("thirdparty", "dpsmate", "enable", "1")
|
||||||
pfUI:UpdateConfig("position", nil, nil, nil)
|
pfUI:UpdateConfig("position", nil, nil, nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+38
-1
@@ -21,7 +21,9 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
function pfUI.gui.SwitchTab(frame)
|
function pfUI.gui.SwitchTab(frame)
|
||||||
local elements = { pfUI.gui.global, pfUI.gui.uf , pfUI.gui.bar, pfUI.gui.panel, pfUI.gui.tooltip, pfUI.gui.castbar }
|
local elements = { pfUI.gui.global, pfUI.gui.uf , pfUI.gui.bar, pfUI.gui.panel, pfUI.gui.tooltip,
|
||||||
|
pfUI.gui.castbar, pfUI.gui.thirdparty }
|
||||||
|
|
||||||
for _, hide in pairs(elements) do
|
for _, hide in pairs(elements) do
|
||||||
hide:Hide()
|
hide:Hide()
|
||||||
end
|
end
|
||||||
@@ -353,6 +355,38 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
pfUI.gui.castbar.title:SetFontObject(GameFontWhite)
|
pfUI.gui.castbar.title:SetFontObject(GameFontWhite)
|
||||||
pfUI.gui.castbar.title:SetText("Castbar Settings")
|
pfUI.gui.castbar.title:SetText("Castbar Settings")
|
||||||
|
|
||||||
|
-- Thirdparty settings
|
||||||
|
pfUI.gui.thirdparty = CreateFrame("Frame", nil, pfUI.gui)
|
||||||
|
pfUI.gui.thirdparty:SetWidth(400)
|
||||||
|
pfUI.gui.thirdparty:SetHeight(320)
|
||||||
|
|
||||||
|
pfUI.gui.thirdparty:SetBackdrop(pfUI.backdrop)
|
||||||
|
pfUI.gui.thirdparty:SetBackdropColor(0,0,0,.50);
|
||||||
|
pfUI.gui.thirdparty:SetPoint("RIGHT",0,0)
|
||||||
|
|
||||||
|
pfUI.gui.thirdparty.switch = CreateFrame("Button", nil, pfUI.gui)
|
||||||
|
pfUI.gui.thirdparty.switch:ClearAllPoints()
|
||||||
|
pfUI.gui.thirdparty.switch:SetWidth(80)
|
||||||
|
pfUI.gui.thirdparty.switch:SetHeight(20)
|
||||||
|
pfUI.gui.thirdparty.switch:SetPoint("TOPLEFT", 0, -120)
|
||||||
|
pfUI.gui.thirdparty.switch:SetBackdrop(pfUI.backdrop)
|
||||||
|
pfUI.gui.thirdparty.switch.text = pfUI.gui.thirdparty.switch:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||||
|
pfUI.gui.thirdparty.switch.text:SetFont("Interface\\AddOns\\pfUI\\fonts\\arial.ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||||
|
pfUI.gui.thirdparty.switch.text:ClearAllPoints()
|
||||||
|
pfUI.gui.thirdparty.switch.text:SetAllPoints(pfUI.gui.thirdparty.switch)
|
||||||
|
pfUI.gui.thirdparty.switch.text:SetPoint("CENTER", 0, 0)
|
||||||
|
pfUI.gui.thirdparty.switch.text:SetFontObject(GameFontWhite)
|
||||||
|
pfUI.gui.thirdparty.switch.text:SetText("Thirdparty")
|
||||||
|
pfUI.gui.thirdparty.switch:SetScript("OnClick", function()
|
||||||
|
pfUI.gui.SwitchTab(pfUI.gui.thirdparty)
|
||||||
|
end)
|
||||||
|
|
||||||
|
pfUI.gui.thirdparty.title = pfUI.gui.thirdparty:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||||
|
pfUI.gui.thirdparty.title:SetFont("Interface\\AddOns\\pfUI\\fonts\\arial.ttf", pfUI_config.global.font_size + 2, "OUTLINE")
|
||||||
|
pfUI.gui.thirdparty.title:SetPoint("TOP", 0, -10)
|
||||||
|
pfUI.gui.thirdparty.title:SetFontObject(GameFontWhite)
|
||||||
|
pfUI.gui.thirdparty.title:SetText("Thirdparty Addons")
|
||||||
|
|
||||||
-- Reset Frames
|
-- Reset Frames
|
||||||
pfUI.gui.resetFrames = CreateFrame("Button", nil, pfUI.gui)
|
pfUI.gui.resetFrames = CreateFrame("Button", nil, pfUI.gui)
|
||||||
pfUI.gui.resetFrames:ClearAllPoints()
|
pfUI.gui.resetFrames:ClearAllPoints()
|
||||||
@@ -485,4 +519,7 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
-- castbar
|
-- castbar
|
||||||
pfUI.gui.CreateConfig(pfUI.gui.castbar, "Hide blizzards castbar:", pfUI_config.castbar.player, "hide_blizz")
|
pfUI.gui.CreateConfig(pfUI.gui.castbar, "Hide blizzards castbar:", pfUI_config.castbar.player, "hide_blizz")
|
||||||
|
|
||||||
|
-- thirdparty
|
||||||
|
pfUI.gui.CreateConfig(pfUI.gui.thirdparty, "DPSMate:", pfUI_config.thirdparty.dpsmate, "enable")
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
pfUI:RegisterModule("thirdparty", function ()
|
||||||
|
-- DPSMate Integration
|
||||||
|
-- Move DPSMate to right chat and let the chat-hide button toggle it
|
||||||
|
if DPSMate and pfUI_config.thirdparty.dpsmate.enable == "1" then
|
||||||
|
DPSMate_DPSMate:Hide()
|
||||||
|
|
||||||
|
pfUIhookDPSMate_Show = DPSMate_DPSMate.Show
|
||||||
|
function DPSMate_DPSMate.Show ()
|
||||||
|
pfUIhookDPSMate_Show(DPSMate_DPSMate)
|
||||||
|
DPSMate_DPSMate:SetAllPoints(pfUI.chat.right)
|
||||||
|
DPSMate_DPSMate:ClearAllPoints()
|
||||||
|
DPSMate_DPSMate:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", 3, -3)
|
||||||
|
DPSMate_DPSMate:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", -3, 3)
|
||||||
|
|
||||||
|
if DPSMate_DPSMate_ScrollFrame then
|
||||||
|
DPSMate_DPSMate_ScrollFrame:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", 3, -23)
|
||||||
|
DPSMate_DPSMate_ScrollFrame:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", -3, 3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
pfUI.panel.right.hide:SetScript("OnClick", function()
|
||||||
|
if DPSMate_DPSMate:IsShown() then
|
||||||
|
DPSMate_DPSMate:Hide()
|
||||||
|
else
|
||||||
|
DPSMate_DPSMate:Show()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
end
|
||||||
|
end)
|
||||||
Reference in New Issue
Block a user