mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-01 03:19:59 +00:00
thirdparty: add support for myroleplay
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user