thirdparty: add support for myroleplay

This commit is contained in:
shagu
2018-10-22 20:47:56 +02:00
parent 7a4953b1dc
commit 424b0b907c
3 changed files with 27 additions and 0 deletions
+1
View File
@@ -778,6 +778,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("thirdparty", "mrplow", "enable", "1")
pfUI:UpdateConfig("thirdparty", "flightmap", "enable", "1")
pfUI:UpdateConfig("thirdparty", "atlasloot", "enable", "1")
pfUI:UpdateConfig("thirdparty", "myroleplay", "enable", "1")
pfUI:UpdateConfig("thirdparty", "druidmana", "enable", "1")
pfUI:UpdateConfig("position", nil, nil, nil)
pfUI:UpdateConfig("disabled", nil, nil, nil)
+1
View File
@@ -1432,6 +1432,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(nil, this, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox")
CreateConfig(nil, this, "FlightMap", C.thirdparty.flightmap, "enable", "checkbox")
CreateConfig(nil, this, "AtlasLoot", C.thirdparty.atlasloot, "enable", "checkbox")
CreateConfig(nil, this, "MyRolePlay", C.thirdparty.myroleplay, "enable", "checkbox")
CreateConfig(nil, this, "DruidManaBar", C.thirdparty.druidmana, "enable", "checkbox")
this.setup = true
end
+25
View File
@@ -668,6 +668,31 @@ pfUI:RegisterModule("thirdparty", function ()
end
end)
HookAddonOrVariable("MyRolePlay", function()
if C.thirdparty.myroleplay.enable == "0" then return end
if pfUI.uf.target then
-- set mrp icon to target frame
mrpButtonIconFrame:SetParent(pfUI.uf.target)
mrpButtonIconFrame:SetFrameStrata("DIALOG")
mrpButtonIconFrame:SetWidth(20)
mrpButtonIconFrame:SetHeight(20)
mrpButtonIconFrame:SetPoint("TOPRIGHT", pfUI.uf.target, "TOPRIGHT", 10, 10)
function _G.mrpMoveIcon()
mrpButtonIconFrame:SetPoint("TOPRIGHT", pfUI.uf.target, "TOPRIGHT", 10, 10)
end
end
if pfUI.uf.player then
-- set tooltip function for player frame
local oldfunc = pfUI.uf.player:GetScript("OnEnter")
pfUI.uf.player:SetScript("OnEnter", function()
oldfunc()
mrpDisplayTooltip("player", "PLAYER")
end)
end
end)
HookAddonOrVariable("DruidManaBarBackground", function()
if C.thirdparty.druidmana.enable == "0" then return end
DruidManaBar:SetParent(UIParent)