mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-02 19:50:02 +00:00
add wim integration
This commit is contained in:
@@ -27,6 +27,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
|
||||
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
||||
pfUI:UpdateConfig("thirdparty", "dpsmate", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "wim", "enable", "1")
|
||||
pfUI:UpdateConfig("position", nil, nil, nil)
|
||||
end
|
||||
|
||||
|
||||
@@ -521,5 +521,6 @@ pfUI:RegisterModule("gui", function ()
|
||||
|
||||
-- thirdparty
|
||||
pfUI.gui.CreateConfig(pfUI.gui.thirdparty, "DPSMate:", pfUI_config.thirdparty.dpsmate, "enable")
|
||||
pfUI.gui.CreateConfig(pfUI.gui.thirdparty, "WIM:", pfUI_config.thirdparty.wim, "enable")
|
||||
|
||||
end)
|
||||
|
||||
@@ -54,4 +54,72 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
-- WIM Integration
|
||||
-- Change the appearance of WIM windows to match pfUI
|
||||
if pfUI_config.thirdparty.wim.enable == "1" then
|
||||
|
||||
local pfUIhookWIM = CreateFrame("Frame", nil)
|
||||
pfUIhookWIM:RegisterEvent("ADDON_LOADED")
|
||||
pfUIhookWIM:SetScript("OnEvent", function()
|
||||
if not pfUIhookWIM_PostMessage and WIM_PostMessage then
|
||||
pfUIhookWIM_PostMessage = WIM_PostMessage
|
||||
WIM_PostMessage = function(user, msg, ttype, from, raw_msg)
|
||||
pfUIhookWIM_PostMessage(user, msg, ttype, from, raw_msg)
|
||||
getglobal("WIM_msgFrame" .. user):SetBackdrop(pfUI.backdrop)
|
||||
getglobal("WIM_msgFrame" .. user .. "From"):ClearAllPoints()
|
||||
getglobal("WIM_msgFrame" .. user .. "From"):SetPoint("TOP", 0, -10)
|
||||
|
||||
getglobal("WIM_msgFrame" .. user).avatar = CreateFrame("Frame", nil, getglobal("WIM_msgFrame" .. user))
|
||||
getglobal("WIM_msgFrame" .. user).avatar:SetAllPoints(getglobal("WIM_msgFrame" .. user))
|
||||
getglobal("WIM_msgFrame" .. user .. "ClassIcon"):SetTexCoord(.3, .7, .3, .7)
|
||||
getglobal("WIM_msgFrame" .. user .. "ClassIcon"):SetParent(getglobal("WIM_msgFrame" .. user).avatar)
|
||||
getglobal("WIM_msgFrame" .. user .. "ClassIcon"):ClearAllPoints()
|
||||
getglobal("WIM_msgFrame" .. user .. "ClassIcon"):SetPoint("TOPLEFT", 10 , -10)
|
||||
getglobal("WIM_msgFrame" .. user .. "ClassIcon"):SetWidth(26)
|
||||
getglobal("WIM_msgFrame" .. user .. "ClassIcon"):SetHeight(26)
|
||||
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"):SetPoint("TOPLEFT", getglobal("WIM_msgFrame" .. user), "TOPLEFT", 10, -45)
|
||||
getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"):SetPoint("BOTTOMRIGHT", getglobal("WIM_msgFrame" .. user), "BOTTOMRIGHT", -32, 32)
|
||||
getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"):SetFont(STANDARD_TEXT_FONT, 12)
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetBackdrop(pfUI.backdrop)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):ClearAllPoints()
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetPoint("TOPLEFT", getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"), "BOTTOMLEFT", 0, -2)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetPoint("TOPRIGHT", getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"), "BOTTOMRIGHT", 0, -2)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetTextInsets(5, 5, 5, 5)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetHeight(24)
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "MsgBox"):GetRegions()}) do
|
||||
if i==6 then v:SetTexture(.1,.1,.1,.5) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton1"):SetBackdrop(pfUI.backdrop)
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton1"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton2"):SetBackdrop(pfUI.backdrop)
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton2"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton3"):SetBackdrop(pfUI.backdrop)
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton3"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton4"):SetBackdrop(pfUI.backdrop)
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton4"):GetRegions()}) do
|
||||
if i >= 2 and i < 7then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton5"):SetBackdrop(pfUI.backdrop)
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton5"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user