api: use C for config

This commit is contained in:
shagu
2017-02-26 20:42:08 +01:00
parent e20e4ef385
commit 1766dd4ba0
30 changed files with 603 additions and 603 deletions
+47 -47
View File
@@ -1,7 +1,7 @@
pfUI:RegisterModule("actionbar", function ()
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.actionbars ~= "-1" then
default_border = pfUI_config.appearance.border.actionbars
local default_border = C.appearance.border.default
if C.appearance.border.actionbars ~= "-1" then
default_border = C.appearance.border.actionbars
end
-- override wow ui functions
@@ -44,7 +44,7 @@ pfUI:RegisterModule("actionbar", function ()
if pfBonusBar then pfBonusBar:Hide() end
end)
if pfUI_config.bars.glowrange == "1" then
if C.bars.glowrange == "1" then
pfUI.api.Hook("ActionButton_OnUpdate", function(elapsed)
-- Handle range indicator
if ( this.rangeTimer ) then
@@ -52,7 +52,7 @@ pfUI:RegisterModule("actionbar", function ()
if ( this.rangeTimer <= 0.1 ) then
if ( IsActionInRange( ActionButton_GetPagedID(this)) == 0 ) then
if not this.a then
this.r,this.g,this.b,this.a = pfUI.api.strsplit(",", pfUI_config.bars.rangecolor)
this.r,this.g,this.b,this.a = pfUI.api.strsplit(",", C.bars.rangecolor)
end
_G[this:GetName() .. 'Icon']:SetVertexColor(this.r, this.g, this.b, this.a)
elseif IsUsableAction(ActionButton_GetPagedID(this)) then
@@ -114,25 +114,25 @@ pfUI:RegisterModule("actionbar", function ()
pfUI.bars.autohide = CreateFrame("Frame", nil, UIParent)
pfUI.bars.autohide:RegisterEvent("PLAYER_ENTERING_WORLD")
pfUI.bars.autohide:SetScript("OnEvent", function()
if pfUI_config.bars.hide_actionmain == "1" then
if C.bars.hide_actionmain == "1" then
pfUI.api:CreateAutohide(pfUI.bars.actionmain)
end
if pfUI_config.bars.hide_bottomleft == "1" then
if C.bars.hide_bottomleft == "1" then
pfUI.api:CreateAutohide(pfUI.bars.bottomleft)
end
if pfUI_config.bars.hide_bottomright == "1" then
if C.bars.hide_bottomright == "1" then
pfUI.api:CreateAutohide(pfUI.bars.bottomright)
end
if pfUI_config.bars.hide_right == "1" then
if C.bars.hide_right == "1" then
pfUI.api:CreateAutohide(pfUI.bars.right)
end
if pfUI_config.bars.hide_tworight == "1" then
if C.bars.hide_tworight == "1" then
pfUI.api:CreateAutohide(pfUI.bars.tworight)
end
if pfUI_config.bars.hide_shapeshift == "1" then
if C.bars.hide_shapeshift == "1" then
pfUI.api:CreateAutohide(pfUI.bars.shapeshift)
end
if pfUI_config.bars.hide_pet == "1" then
if C.bars.hide_pet == "1" then
pfUI.api:CreateAutohide(pfUI.bars.pet)
end
end)
@@ -148,7 +148,7 @@ pfUI:RegisterModule("actionbar", function ()
PetActionBarFrame:SetParent(pfUI.bars.pet)
pfUI.bars:SetScript("OnEvent", function()
pfUI.api:BarLayoutSize(pfUI.bars.actionmain, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.actionmain.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarLayoutSize(pfUI.bars.actionmain, NUM_ACTIONBAR_BUTTONS, C.bars.actionmain.formfactor, C.bars.icon_size, default_border)
pfUI.bars.actionmain:SetWidth(pfUI.bars.actionmain._size[1])
pfUI.bars.actionmain:SetHeight(pfUI.bars.actionmain._size[2])
@@ -161,10 +161,10 @@ pfUI:RegisterModule("actionbar", function ()
end
pfUI.bars.pet:SetPoint("BOTTOM", anchor, "TOP", 0, default_border * 3)
pfUI.api:UpdateMovable(pfUI.bars.pet)
pfUI.api:BarLayoutSize(pfUI.bars.pet, NUM_PET_ACTION_SLOTS, pfUI_config.bars.pet.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarLayoutSize(pfUI.bars.pet, NUM_PET_ACTION_SLOTS, C.bars.pet.formfactor, C.bars.icon_size, default_border)
pfUI.bars.pet:SetWidth(pfUI.bars.pet._size[1])
pfUI.bars.pet:SetHeight(pfUI.bars.pet._size[2])
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.pet, default_border) end
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.pet, default_border) end
PetActionBarFrame:ClearAllPoints()
PetActionBarFrame:Hide()
@@ -175,7 +175,7 @@ pfUI:RegisterModule("actionbar", function ()
b:SetFrameLevel(pfUI.bars.pet:GetFrameLevel() + 1)
b:SetParent(pfUI.bars.pet)
pfUI.api:CreateBackdrop(b, default_border)
pfUI.api:BarButtonAnchor(b, "PetActionButton", i, NUM_PET_ACTION_SLOTS, pfUI_config.bars.pet.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarButtonAnchor(b, "PetActionButton", i, NUM_PET_ACTION_SLOTS, C.bars.pet.formfactor, C.bars.icon_size, default_border)
b:SetPoint(unpack(b._anchor))
end
else
@@ -193,7 +193,7 @@ pfUI:RegisterModule("actionbar", function ()
b:ClearAllPoints()
b:SetParent(pfUI.bars.shapeshift)
pfUI.api:CreateBackdrop(b, default_border)
pfUI.api:BarButtonAnchor(b, "ShapeshiftButton", i, NUM_SHAPESHIFT_SLOTS, pfUI_config.bars.shapeshift.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarButtonAnchor(b, "ShapeshiftButton", i, NUM_SHAPESHIFT_SLOTS, C.bars.shapeshift.formfactor, C.bars.icon_size, default_border)
b:SetPoint(unpack(b._anchor))
if b:IsShown() then shapeshiftbuttons = shapeshiftbuttons + 1 end
end
@@ -204,8 +204,8 @@ pfUI:RegisterModule("actionbar", function ()
end
pfUI.bars.shapeshift:SetPoint("BOTTOM", anchor, "TOP", 0, default_border * 3)
pfUI.api:UpdateMovable(pfUI.bars.shapeshift)
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.shapeshift, default_border) end
pfUI.api:BarLayoutSize(pfUI.bars.shapeshift, shapeshiftbuttons, pfUI_config.bars.shapeshift.formfactor, pfUI_config.bars.icon_size, default_border)
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.shapeshift, default_border) end
pfUI.api:BarLayoutSize(pfUI.bars.shapeshift, shapeshiftbuttons, C.bars.shapeshift.formfactor, C.bars.icon_size, default_border)
pfUI.bars.shapeshift:SetWidth(pfUI.bars.shapeshift._size[1])
pfUI.bars.shapeshift:SetHeight(pfUI.bars.shapeshift._size[2])
else
@@ -219,7 +219,7 @@ pfUI:RegisterModule("actionbar", function ()
pfUI.bars.bottomleft:SetPoint("BOTTOM", pfUI.bars.actionmain, "TOP", 0, default_border)
pfUI.api:UpdateMovable(pfUI.bars.bottomleft)
pfUI.api:BarLayoutSize(pfUI.bars.bottomleft, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.bottomleft.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarLayoutSize(pfUI.bars.bottomleft, NUM_ACTIONBAR_BUTTONS, C.bars.bottomleft.formfactor, C.bars.icon_size, default_border)
pfUI.bars.bottomleft:SetWidth(pfUI.bars.bottomleft._size[1])
pfUI.bars.bottomleft:SetHeight(pfUI.bars.bottomleft._size[2])
@@ -239,7 +239,7 @@ pfUI:RegisterModule("actionbar", function ()
b:ClearAllPoints()
b:SetParent(tf)
pfUI.api:CreateBackdrop(b, default_border)
pfUI.api:BarButtonAnchor(b, "MultiBarBottomLeftButton", i, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.bottomleft.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarButtonAnchor(b, "MultiBarBottomLeftButton", i, NUM_ACTIONBAR_BUTTONS, C.bars.bottomleft.formfactor, C.bars.icon_size, default_border)
b:SetPoint(unpack(b._anchor))
end
end
@@ -255,9 +255,9 @@ pfUI:RegisterModule("actionbar", function ()
pfUI.bars.bottomright:SetFrameStrata("LOW")
pfUI.bars.bottomright:SetPoint("BOTTOMRIGHT", pfUI.bars.actionmain, "BOTTOMLEFT", -default_border*3, 0)
pfUI.api:UpdateMovable(pfUI.bars.bottomright)
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.bottomright, default_border) end
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.bottomright, default_border) end
pfUI.api:BarLayoutSize(pfUI.bars.bottomright, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.bottomright.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarLayoutSize(pfUI.bars.bottomright, NUM_ACTIONBAR_BUTTONS, C.bars.bottomright.formfactor, C.bars.icon_size, default_border)
pfUI.bars.bottomright:SetWidth(pfUI.bars.bottomright._size[1])
pfUI.bars.bottomright:SetHeight(pfUI.bars.bottomright._size[2])
@@ -277,7 +277,7 @@ pfUI:RegisterModule("actionbar", function ()
b:ClearAllPoints()
b:SetParent(tf)
pfUI.api:CreateBackdrop(b, default_border)
pfUI.api:BarButtonAnchor(b, "MultiBarBottomRightButton", i, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.bottomright.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarButtonAnchor(b, "MultiBarBottomRightButton", i, NUM_ACTIONBAR_BUTTONS, C.bars.bottomright.formfactor, C.bars.icon_size, default_border)
b:SetPoint(unpack(b._anchor))
end
end
@@ -290,9 +290,9 @@ pfUI:RegisterModule("actionbar", function ()
pfUI.bars.right:SetFrameStrata("LOW")
pfUI.bars.right:SetPoint("BOTTOMLEFT", pfUI.bars.actionmain, "BOTTOMRIGHT", default_border*3, 0)
pfUI.api:UpdateMovable(pfUI.bars.right)
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.right, default_border) end
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.right, default_border) end
pfUI.api:BarLayoutSize(pfUI.bars.right, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.right.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarLayoutSize(pfUI.bars.right, NUM_ACTIONBAR_BUTTONS, C.bars.right.formfactor, C.bars.icon_size, default_border)
pfUI.bars.right:SetWidth(pfUI.bars.right._size[1])
pfUI.bars.right:SetHeight(pfUI.bars.right._size[2])
@@ -312,7 +312,7 @@ pfUI:RegisterModule("actionbar", function ()
b:ClearAllPoints()
b:SetParent(tf)
pfUI.api:CreateBackdrop(b, default_border)
pfUI.api:BarButtonAnchor(b, "MultiBarRightButton", i, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.right.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarButtonAnchor(b, "MultiBarRightButton", i, NUM_ACTIONBAR_BUTTONS, C.bars.right.formfactor, C.bars.icon_size, default_border)
b:SetPoint(unpack(b._anchor))
end
end
@@ -326,8 +326,8 @@ pfUI:RegisterModule("actionbar", function ()
pfUI.bars.tworight:ClearAllPoints()
pfUI.bars.tworight:SetPoint("RIGHT", UIParent, "RIGHT", -5, 0)
pfUI.api:UpdateMovable(pfUI.bars.tworight)
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.tworight, default_border) end
pfUI.api:BarLayoutSize(pfUI.bars.tworight, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.tworight.formfactor, pfUI_config.bars.icon_size, default_border)
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.tworight, default_border) end
pfUI.api:BarLayoutSize(pfUI.bars.tworight, NUM_ACTIONBAR_BUTTONS, C.bars.tworight.formfactor, C.bars.icon_size, default_border)
pfUI.bars.tworight:SetWidth(pfUI.bars.tworight._size[1])
pfUI.bars.tworight:SetHeight(pfUI.bars.tworight._size[2])
@@ -347,7 +347,7 @@ pfUI:RegisterModule("actionbar", function ()
b:ClearAllPoints()
b:SetParent(tf)
pfUI.api:CreateBackdrop(b, default_border)
pfUI.api:BarButtonAnchor(b, "MultiBarLeftButton", i, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.tworight.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarButtonAnchor(b, "MultiBarLeftButton", i, NUM_ACTIONBAR_BUTTONS, C.bars.tworight.formfactor, C.bars.icon_size, default_border)
b:SetPoint(unpack(b._anchor))
end
end
@@ -366,13 +366,13 @@ pfUI:RegisterModule("actionbar", function ()
pfUI.bars.actionmain.share:SetPoint("BOTTOMLEFT", pfUI.bars.actionmain, "BOTTOMLEFT", 0, 0)
pfUI.bars.actionmain.share:SetPoint("TOPRIGHT", pfUI.bars.bottomleft, "TOPRIGHT", 0, 0)
pfUI.bars.actionmain.share:SetPoint("BOTTOMRIGHT", pfUI.bars.actionmain, "BOTTOMRIGHT", 0, 0)
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.actionmain.share, default_border) end
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.actionmain.share, default_border) end
end
else
-- give both their own backdrop
if pfUI.bars.actionmain.share then pfUI.bars.actionmain.share:Hide() end
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.actionmain, default_border) end
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.bottomleft, default_border) end
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.actionmain, default_border) end
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.bottomleft, default_border) end
end
end)
@@ -383,8 +383,8 @@ pfUI:RegisterModule("actionbar", function ()
function pfUI.bars.bottomleft:OnMove()
local _, a, _ = pfUI.bars.bottomleft:GetPoint()
if a ~= pfUI.bars.actionmain or not pfUI.bars.bottomleft:IsShown() or pfUI.bars.bottomleft:GetWidth() ~= a:GetWidth() or pfUI.bars.bottomleft:GetScale() ~= a:GetScale() then
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.actionmain, default_border) end
if pfUI_config.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.bottomleft, default_border) end
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.actionmain, default_border) end
if C.bars.background == "1" then pfUI.api:CreateBackdrop(pfUI.bars.bottomleft, default_border) end
if pfUI.bars.actionmain.share then pfUI.bars.actionmain.share:Hide() end
end
end
@@ -401,7 +401,7 @@ pfUI:RegisterModule("actionbar", function ()
b:ClearAllPoints()
b:SetParent(tf)
pfUI.api:CreateBackdrop(b, default_border)
pfUI.api:BarButtonAnchor(b, "ActionButton", i, NUM_ACTIONBAR_BUTTONS, pfUI_config.bars.actionmain.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarButtonAnchor(b, "ActionButton", i, NUM_ACTIONBAR_BUTTONS, C.bars.actionmain.formfactor, C.bars.icon_size, default_border)
b:SetPoint(unpack(b._anchor))
end
end
@@ -420,14 +420,14 @@ pfUI:RegisterModule("actionbar", function ()
b:ClearAllPoints()
b:SetParent(tf)
pfUI.api:CreateBackdrop(b, default_border)
pfUI.api:BarButtonAnchor(b, "BonusActionButton", i, NUM_BONUS_ACTION_SLOTS, pfUI_config.bars.actionmain.formfactor, pfUI_config.bars.icon_size, default_border)
pfUI.api:BarButtonAnchor(b, "BonusActionButton", i, NUM_BONUS_ACTION_SLOTS, C.bars.actionmain.formfactor, C.bars.icon_size, default_border)
b:SetPoint(unpack(b._anchor))
end
for i = 1, NUM_SHAPESHIFT_SLOTS do
local button = _G["ShapeshiftButton"..i]
button:SetWidth(pfUI_config.bars.icon_size)
button:SetHeight(pfUI_config.bars.icon_size)
button:SetWidth(C.bars.icon_size)
button:SetHeight(C.bars.icon_size)
local icon = _G["ShapeshiftButton"..i..'Icon']
icon:SetParent(button)
@@ -442,15 +442,15 @@ pfUI:RegisterModule("actionbar", function ()
local hotkey = _G["ShapeshiftButton"..i..'HotKey']
hotkey:SetAllPoints(button)
hotkey:SetFont(pfUI.font_square, pfUI_config.global.font_size -2, "OUTLINE")
hotkey:SetFont(pfUI.font_square, C.global.font_size -2, "OUTLINE")
hotkey:SetJustifyH("RIGHT")
hotkey:SetJustifyV("TOP")
end
for i = 1, NUM_PET_ACTION_SLOTS do
local button = _G["PetActionButton"..i]
button:SetWidth(pfUI_config.bars.icon_size)
button:SetHeight(pfUI_config.bars.icon_size)
button:SetWidth(C.bars.icon_size)
button:SetHeight(C.bars.icon_size)
button:Show()
local icon = _G["PetActionButton"..i..'Icon']
@@ -468,7 +468,7 @@ pfUI:RegisterModule("actionbar", function ()
border:SetAlpha(0)
local autocast = _G["PetActionButton"..i..'AutoCast']
autocast:SetScale(pfUI_config.bars.icon_size / 30)
autocast:SetScale(C.bars.icon_size / 30)
autocast:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0)
autocast:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 1, -1)
autocast:SetAlpha(.1)
@@ -481,8 +481,8 @@ pfUI:RegisterModule("actionbar", function ()
for i = 1, NUM_ACTIONBAR_BUTTONS do
for _, actionbutton in pairs(actionbars) do
local button = _G[actionbutton..i]
button:SetWidth(pfUI_config.bars.icon_size)
button:SetHeight(pfUI_config.bars.icon_size)
button:SetWidth(C.bars.icon_size)
button:SetHeight(C.bars.icon_size)
button:Show()
local texture = _G[actionbutton..i..'NormalTexture']
@@ -499,13 +499,13 @@ pfUI:RegisterModule("actionbar", function ()
local hotkey = _G[actionbutton..i..'HotKey']
hotkey:SetAllPoints(button)
hotkey:SetFont(pfUI.font_square, pfUI_config.global.font_size -2, "OUTLINE")
hotkey:SetFont(pfUI.font_square, C.global.font_size -2, "OUTLINE")
hotkey:SetJustifyH("RIGHT")
hotkey:SetJustifyV("TOP")
local name = _G[actionbutton..i..'Name']
name:SetAllPoints(button)
name:SetFont(pfUI.font_square, pfUI_config.global.font_size -2, "OUTLINE")
name:SetFont(pfUI.font_square, C.global.font_size -2, "OUTLINE")
name:SetJustifyH("CENTER")
name:SetJustifyV("BOTTOM")
end
+3 -3
View File
@@ -26,14 +26,14 @@ pfUI:RegisterModule("addons", function ()
-- title
pfUI.addons.caption = pfUI.addons:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.addons.caption:SetFont(pfUI.font_default, pfUI_config.global.font_size + 4, "OUTLINE")
pfUI.addons.caption:SetFont(pfUI.font_default, C.global.font_size + 4, "OUTLINE")
pfUI.addons.caption:SetTextColor(.2, 1, .8, 1)
pfUI.addons.caption:SetPoint("TOP", 0, -10)
pfUI.addons.caption:SetJustifyH("LEFT")
pfUI.addons.caption:SetText("Addon List")
pfUI.addons.close = CreateFrame("Button", "pfBagClose", pfUI.addons)
pfUI.addons.close:SetPoint("TOPRIGHT", -pfUI_config.appearance.border.default*2,-pfUI_config.appearance.border.default*2 )
pfUI.addons.close:SetPoint("TOPRIGHT", -C.appearance.border.default*2,-C.appearance.border.default*2 )
pfUI.api:CreateBackdrop(pfUI.addons.close)
pfUI.addons.close:SetHeight(15)
pfUI.addons.close:SetWidth(15)
@@ -80,7 +80,7 @@ pfUI:RegisterModule("addons", function ()
-- caption
frame.caption = frame:CreateFontString("Status", "LOW", "GameFontNormal")
frame.caption:SetFont(pfUI.font_default, pfUI_config.global.font_size + 2, "OUTLINE")
frame.caption:SetFont(pfUI.font_default, C.global.font_size + 2, "OUTLINE")
frame.caption:SetAllPoints(frame)
frame.caption:SetFontObject(GameFontWhite)
frame.caption:SetJustifyH("LEFT")
+15 -15
View File
@@ -1,7 +1,7 @@
pfUI:RegisterModule("bags", function ()
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.bags ~= "-1" then
default_border = pfUI_config.appearance.border.bags
local default_border = C.appearance.border.default
if C.appearance.border.bags ~= "-1" then
default_border = C.appearance.border.bags
end
-- overwrite some bag functions
@@ -170,10 +170,10 @@ pfUI:RegisterModule("bags", function ()
if pfUI.chat then
pfUI.bag.left:SetPoint("BOTTOMLEFT", pfUI.chat.left, "BOTTOMLEFT", 0, 0)
pfUI.bag.left:SetPoint("BOTTOMRIGHT", pfUI.chat.left, "BOTTOMRIGHT", 0, 0)
pfUI.bag.left:SetWidth(pfUI_config.chat.left.width * pfUI.chat.left:GetScale())
pfUI.bag.left:SetWidth(C.chat.left.width * pfUI.chat.left:GetScale())
else
pfUI.bag.left:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 5, 5)
pfUI.bag.left:SetWidth(pfUI_config.chat.left.width)
pfUI.bag.left:SetWidth(C.chat.left.width)
end
pfUI.bag.left:EnableMouse(1)
iterate = pfUI.BANK
@@ -183,10 +183,10 @@ pfUI:RegisterModule("bags", function ()
if pfUI.chat then
pfUI.bag.right:SetPoint("BOTTOMLEFT", pfUI.chat.right, "BOTTOMLEFT", 0, 0)
pfUI.bag.right:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, 0)
pfUI.bag.right:SetWidth(pfUI_config.chat.right.width * pfUI.chat.right:GetScale())
pfUI.bag.right:SetWidth(C.chat.right.width * pfUI.chat.right:GetScale())
else
pfUI.bag.right:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -5, 5)
pfUI.bag.right:SetWidth(pfUI_config.chat.right.width)
pfUI.bag.right:SetWidth(C.chat.right.width)
end
pfUI.bag.right:EnableMouse(1)
iterate = pfUI.BACKPACK
@@ -264,7 +264,7 @@ pfUI:RegisterModule("bags", function ()
local texture, count, locked, quality = GetContainerItemInfo(bag, slot)
-- running advanced item color scan
if pfUI_config.appearance.bags.borderonlygear == "0" and texture and quality and quality < 1 then
if C.appearance.bags.borderonlygear == "0" and texture and quality and quality < 1 then
local link = GetContainerItemLink(bag, slot)
if link then
local _, _, linkstr = string.find(link, "(item:%d+:%d+:%d+:%d+)")
@@ -289,7 +289,7 @@ pfUI:RegisterModule("bags", function ()
end
local count = _G[pfUI.bags[bag].slots[slot].frame:GetName() .. "Count"]
count:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
count:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
count:SetAllPoints()
count:SetJustifyH("RIGHT")
count:SetJustifyV("BOTTOM")
@@ -304,7 +304,7 @@ pfUI:RegisterModule("bags", function ()
border:SetTexture("")
-- detect backdrop border color
if quality and quality > tonumber(pfUI_config.appearance.bags.borderlimit) then
if quality and quality > tonumber(C.appearance.bags.borderlimit) then
pfUI.bags[bag].slots[slot].frame.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
else
local bagtype
@@ -437,7 +437,7 @@ pfUI:RegisterModule("bags", function ()
frame.bagslots.buy:SetWidth(pfUI.bag.button_size/5*4)
frame.bagslots.buy:SetText("+")
frame.bagslots.buy:SetTextColor(.5,.5,1,1)
frame.bagslots.buy:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.bagslots.buy:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.bagslots.buy:SetScript("OnEnter", function ()
frame.bagslots.buy:SetTextColor(1,1,1,1)
end)
@@ -490,7 +490,7 @@ pfUI:RegisterModule("bags", function ()
frame.bags:SetHeight(12)
frame.bags:SetWidth(12)
frame.bags:SetTextColor(1,1,.25,1)
frame.bags:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.bags:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.bags.texture = frame.bags:CreateTexture("pfBagArrowUp")
frame.bags.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\up")
frame.bags.texture:ClearAllPoints()
@@ -525,7 +525,7 @@ pfUI:RegisterModule("bags", function ()
frame.keys:SetHeight(12)
frame.keys:SetWidth(12)
frame.keys:SetTextColor(1,1,.25,1)
frame.keys:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.keys:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.keys.texture = frame.keys:CreateTexture("pfBagArrowUp")
frame.keys.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\key")
frame.keys.texture:ClearAllPoints()
@@ -569,7 +569,7 @@ pfUI:RegisterModule("bags", function ()
frame.search.edit:SetPoint("TOPLEFT", frame.search, "TOPLEFT", default_border*2, 0)
frame.search.edit:SetPoint("BOTTOMRIGHT", frame.search, "BOTTOMRIGHT", -default_border*2, 0)
frame.search.edit:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.search.edit:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.search.edit:SetAutoFocus(false)
frame.search.edit:SetText("Search")
frame.search.edit:SetTextColor(.5,.5,.5,1)
@@ -649,7 +649,7 @@ pfUI:RegisterModule("bags", function ()
frame.bags:SetHeight(12)
frame.bags:SetWidth(12)
frame.bags:SetTextColor(1,1,.25,1)
frame.bags:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.bags:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.bags.texture = frame.bags:CreateTexture("pfBagArrowUp")
frame.bags.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\up")
frame.bags.texture:ClearAllPoints()
+4 -4
View File
@@ -46,7 +46,7 @@ pfUI:RegisterModule("buff", function ()
TemporaryEnchantFrame:ClearAllPoints()
TemporaryEnchantFrame:SetPoint("TOPRIGHT", pfUI.minimap or Minimap, "TOPLEFT", -25,0)
if pfUI_config.global.hidewbuff == "1" then
if C.global.hidewbuff == "1" then
TemporaryEnchantFrame:Hide()
BuffFrame:SetPoint("TOPRIGHT", pfUI.minimap or Minimap, "TOPLEFT", -25,0)
else
@@ -55,7 +55,7 @@ pfUI:RegisterModule("buff", function ()
local icon = _G[buff:GetName().."Icon"]
local border = _G[buff:GetName().."Border"]
local text = _G[buff:GetName().."Duration"]
text:SetPoint("TOP", buff, "BOTTOM", 0 , -pfUI_config.appearance.border.default*2)
text:SetPoint("TOP", buff, "BOTTOM", 0 , -C.appearance.border.default*2)
local _, _, mainhand, _, _, offhand = GetWeaponEnchantInfo()
if buff then
@@ -93,7 +93,7 @@ pfUI:RegisterModule("buff", function ()
end
end
if pfUI_config.global.hidebuff == "1" then
if C.global.hidebuff == "1" then
BuffFrame:Hide()
else
-- buffs
@@ -112,7 +112,7 @@ pfUI:RegisterModule("buff", function ()
buff:SetPoint("TOPRIGHT", _G["BuffButton" .. i-1], "TOPLEFT", -7, 0)
end
pfUI.api:CreateBackdrop(buff)
text:SetPoint("TOP", buff, "BOTTOM", 0 , -pfUI_config.appearance.border.default*2)
text:SetPoint("TOP", buff, "BOTTOM", 0 , -C.appearance.border.default*2)
icon:SetTexCoord(.08, .92, .08, .92)
if border then
buff.backdrop:SetBackdropBorderColor(border:GetVertexColor())
+17 -17
View File
@@ -1,14 +1,14 @@
pfUI:RegisterModule("castbar", function ()
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.unitframes ~= "-1" then
default_border = pfUI_config.appearance.border.unitframes
local default_border = C.appearance.border.default
if C.appearance.border.unitframes ~= "-1" then
default_border = C.appearance.border.unitframes
end
pfUI.castbar = CreateFrame("Frame", "pfCastBar", UIParent)
-- hide blizzard
if pfUI_config.castbar.player.hide_blizz == "1" then
if C.castbar.player.hide_blizz == "1" then
CastingBarFrame:UnregisterAllEvents()
CastingBarFrame:Hide()
end
@@ -17,7 +17,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.player = CreateFrame("Frame", "pfPlayerCastbar", UIParent)
pfUI.castbar.player:SetFrameStrata("HIGH")
pfUI.api:CreateBackdrop(pfUI.castbar.player, default_border)
pfUI.castbar.player:SetHeight(pfUI_config.global.font_size + default_border)
pfUI.castbar.player:SetHeight(C.global.font_size + default_border)
if pfUI.uf.player then
pfUI.castbar.player:SetPoint("TOPLEFT",pfUI.uf.player,"BOTTOMLEFT",0,-default_border*2)
@@ -38,7 +38,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.player.bar:SetAllPoints(pfUI.castbar.player)
pfUI.castbar.player.bar:SetMinMaxValues(0, 100)
pfUI.castbar.player.bar:SetValue(20)
local r,g,b,a = pfUI.api.strsplit(",", pfUI_config.appearance.castbar.castbarcolor)
local r,g,b,a = pfUI.api.strsplit(",", C.appearance.castbar.castbarcolor)
pfUI.castbar.player.bar:SetStatusBarColor(r,g,b,a)
-- text left
@@ -49,7 +49,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.player.bar.left:SetNonSpaceWrap(false)
pfUI.castbar.player.bar.left:SetFontObject(GameFontWhite)
pfUI.castbar.player.bar.left:SetTextColor(1,1,1,1)
pfUI.castbar.player.bar.left:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.castbar.player.bar.left:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.castbar.player.bar.left:SetText("left")
pfUI.castbar.player.bar.left:SetJustifyH("left")
@@ -61,7 +61,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.player.bar.right:SetNonSpaceWrap(false)
pfUI.castbar.player.bar.right:SetFontObject(GameFontWhite)
pfUI.castbar.player.bar.right:SetTextColor(1,1,1,1)
pfUI.castbar.player.bar.right:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.castbar.player.bar.right:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.castbar.player.bar.right:SetText("right")
pfUI.castbar.player.bar.right:SetJustifyH("right")
@@ -145,7 +145,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.player.delay = 0
pfUI.castbar.player.spell = spell
pfUI.castbar.player.bar.left:SetText(spell)
local r,g,b,a = pfUI.api.strsplit(",", pfUI_config.appearance.castbar.castbarcolor)
local r,g,b,a = pfUI.api.strsplit(",", C.appearance.castbar.castbarcolor)
pfUI.castbar.player.bar:SetStatusBarColor(r,g,b,a)
pfUI.castbar.player.startTime = GetTime()
pfUI.castbar.player.maxValue = duration / 1000
@@ -173,7 +173,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.player.delay = 0
pfUI.castbar.player.spell = spell
pfUI.castbar.player.bar.left:SetText(spell)
local r,g,b,a = pfUI.api.strsplit(",", pfUI_config.appearance.castbar.channelcolor)
local r,g,b,a = pfUI.api.strsplit(",", C.appearance.castbar.channelcolor)
pfUI.castbar.player.bar:SetStatusBarColor(r,g,b,a)
pfUI.castbar.player.maxValue = nil
pfUI.castbar.player.startTime = GetTime()
@@ -242,7 +242,7 @@ pfUI:RegisterModule("castbar", function ()
end)
pfUI.castbar.player:SetScript("OnUpdate", function ()
if pfUI_config.castbar.player.hide_pfui == "1" then pfUI.castbar.player:Hide() return end
if C.castbar.player.hide_pfui == "1" then pfUI.castbar.player:Hide() return end
-- cast
if pfUI.castbar.player.casting then
@@ -305,7 +305,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.target = CreateFrame("Frame", "pfTargetCastbar", UIParent)
pfUI.castbar.target:SetFrameStrata("HIGH")
pfUI.api:CreateBackdrop(pfUI.castbar.target, default_border)
pfUI.castbar.target:SetHeight(pfUI_config.global.font_size + default_border)
pfUI.castbar.target:SetHeight(C.global.font_size + default_border)
if pfUI.uf.target then
pfUI.castbar.target:SetPoint("TOPLEFT",pfUI.uf.target,"BOTTOMLEFT",0,-default_border*2)
@@ -326,7 +326,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.target.bar:SetAllPoints(pfUI.castbar.target)
pfUI.castbar.target.bar:SetMinMaxValues(0, 100)
pfUI.castbar.target.bar:SetValue(20)
local r,g,b,a = pfUI.api.strsplit(",", pfUI_config.appearance.castbar.castbarcolor)
local r,g,b,a = pfUI.api.strsplit(",", C.appearance.castbar.castbarcolor)
pfUI.castbar.target.bar:SetStatusBarColor(r,g,b,a)
-- text left
@@ -337,7 +337,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.target.bar.left:SetNonSpaceWrap(false)
pfUI.castbar.target.bar.left:SetFontObject(GameFontWhite)
pfUI.castbar.target.bar.left:SetTextColor(1,1,1,1)
pfUI.castbar.target.bar.left:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.castbar.target.bar.left:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.castbar.target.bar.left:SetText("left")
pfUI.castbar.target.bar.left:SetJustifyH("left")
@@ -349,7 +349,7 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.target.bar.right:SetNonSpaceWrap(false)
pfUI.castbar.target.bar.right:SetFontObject(GameFontWhite)
pfUI.castbar.target.bar.right:SetTextColor(1,1,1,1)
pfUI.castbar.target.bar.right:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.castbar.target.bar.right:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.castbar.target.bar.right:SetText("right")
pfUI.castbar.target.bar.right:SetJustifyH("right")
@@ -412,7 +412,7 @@ pfUI:RegisterModule("castbar", function ()
local starttime = pfUI.castbar.target.casterDB[UnitName("target")].starttime or 0
local casttime = pfUI.castbar.target.casterDB[UnitName("target")].casttime or 0
if starttime + casttime > GetTime() then
if pfUI_config.castbar.target.hide_pfui == "1" then
if C.castbar.target.hide_pfui == "1" then
pfUI.castbar.target:Hide()
else
pfUI.castbar.target:Show()
@@ -478,7 +478,7 @@ pfUI:RegisterModule("castbar", function ()
local icon = pfLocaleSpells[pfUI.cache["locale"]][spell].icon
pfUI.castbar.target.casterDB[mob] = {cast = spell, starttime = GetTime(), casttime = casttime, icon = icon}
if UnitExists("target") and pfUI.castbar.target.casterDB[UnitName("target")] then
if pfUI_config.castbar.target.hide_pfui == "1" then
if C.castbar.target.hide_pfui == "1" then
pfUI.castbar.target:Hide()
else
pfUI.castbar.target:Show()
+48 -48
View File
@@ -13,35 +13,35 @@ pfUI:RegisterModule("chat", function ()
"This would set important or personal messages to the left chat\n" ..
"and world channels and lootinformation to the right chat.")
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.chat ~= "-1" then
default_border = pfUI_config.appearance.border.chat
local default_border = C.appearance.border.default
if C.appearance.border.chat ~= "-1" then
default_border = C.appearance.border.chat
end
pfUI.chat = CreateFrame("Frame",nil,UIParent)
pfUI.chat.left = CreateFrame("Frame", "pfChatLeft", UIParent)
pfUI.chat.left:SetFrameStrata("BACKGROUND")
pfUI.chat.left:SetWidth(pfUI_config.chat.left.width)
pfUI.chat.left:SetHeight(pfUI_config.chat.left.height)
pfUI.chat.left:SetWidth(C.chat.left.width)
pfUI.chat.left:SetHeight(C.chat.left.height)
pfUI.chat.left:SetPoint("BOTTOMLEFT", 5,5)
pfUI.chat.left:SetScript("OnShow", function() pfUI.chat:RefreshChat() end)
pfUI.api:UpdateMovable(pfUI.chat.left)
pfUI.api:CreateBackdrop(pfUI.chat.left, default_border, nil, .8)
if pfUI_config.chat.global.custombg == "1" then
local r, g, b, a = pfUI.api.strsplit(",", pfUI_config.chat.global.background)
if C.chat.global.custombg == "1" then
local r, g, b, a = pfUI.api.strsplit(",", C.chat.global.background)
pfUI.chat.left.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
local r, g, b, a = pfUI.api.strsplit(",", pfUI_config.chat.global.border)
local r, g, b, a = pfUI.api.strsplit(",", C.chat.global.border)
pfUI.chat.left.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
end
pfUI.chat.left.panelTop = CreateFrame("Frame", "leftChatPanelTop", pfUI.chat.left)
pfUI.chat.left.panelTop:ClearAllPoints()
pfUI.chat.left.panelTop:SetHeight(pfUI_config.global.font_size+default_border*2)
pfUI.chat.left.panelTop:SetHeight(C.global.font_size+default_border*2)
pfUI.chat.left.panelTop:SetPoint("TOPLEFT", pfUI.chat.left, "TOPLEFT", default_border, -default_border)
pfUI.chat.left.panelTop:SetPoint("TOPRIGHT", pfUI.chat.left, "TOPRIGHT", -default_border, -default_border)
if pfUI_config.chat.global.tabdock == "1" then
if C.chat.global.tabdock == "1" then
pfUI.api:CreateBackdrop(pfUI.chat.left.panelTop, default_border, nil, .8)
end
@@ -120,7 +120,7 @@ pfUI:RegisterModule("chat", function ()
end)
pfUI.chat.left.panelTop.proxyName.caption = pfUI.chat.left.panelTop.proxyName:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.chat.left.panelTop.proxyName.caption:SetFont(pfUI.font_default, pfUI_config.global.font_size + 2, "OUTLINE")
pfUI.chat.left.panelTop.proxyName.caption:SetFont(pfUI.font_default, C.global.font_size + 2, "OUTLINE")
pfUI.chat.left.panelTop.proxyName.caption:SetPoint("TOP", 0, -20)
pfUI.chat.left.panelTop.proxyName.caption:SetFontObject(GameFontWhite)
pfUI.chat.left.panelTop.proxyName.caption:SetJustifyH("CENTER")
@@ -145,7 +145,7 @@ pfUI:RegisterModule("chat", function ()
pfUI.chat.left.panelTop.proxyName.okay:SetPoint("BOTTOMRIGHT", -10, 10)
pfUI.api:CreateBackdrop(pfUI.chat.left.panelTop.proxyName.okay, default_border)
pfUI.chat.left.panelTop.proxyName.okay.text = pfUI.chat.left.panelTop.proxyName.okay:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.chat.left.panelTop.proxyName.okay.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.chat.left.panelTop.proxyName.okay.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.chat.left.panelTop.proxyName.okay.text:ClearAllPoints()
pfUI.chat.left.panelTop.proxyName.okay.text:SetAllPoints(pfUI.chat.left.panelTop.proxyName.okay)
pfUI.chat.left.panelTop.proxyName.okay.text:SetPoint("CENTER", 0, 0)
@@ -165,7 +165,7 @@ pfUI:RegisterModule("chat", function ()
pfUI.chat.left.panelTop.proxyName.abort:SetPoint("BOTTOMLEFT", 10, 10)
pfUI.api:CreateBackdrop(pfUI.chat.left.panelTop.proxyName.abort, default_border)
pfUI.chat.left.panelTop.proxyName.abort.text = pfUI.chat.left.panelTop.proxyName.abort:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.chat.left.panelTop.proxyName.abort.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.chat.left.panelTop.proxyName.abort.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.chat.left.panelTop.proxyName.abort.text:ClearAllPoints()
pfUI.chat.left.panelTop.proxyName.abort.text:SetAllPoints(pfUI.chat.left.panelTop.proxyName.abort)
pfUI.chat.left.panelTop.proxyName.abort.text:SetPoint("CENTER", 0, 0)
@@ -180,26 +180,26 @@ pfUI:RegisterModule("chat", function ()
pfUI.chat.right = CreateFrame("Frame", "pfChatRight", UIParent)
pfUI.chat.right:SetFrameStrata("BACKGROUND")
pfUI.chat.right:SetWidth(pfUI_config.chat.right.width)
pfUI.chat.right:SetHeight(pfUI_config.chat.right.height)
pfUI.chat.right:SetWidth(C.chat.right.width)
pfUI.chat.right:SetHeight(C.chat.right.height)
pfUI.chat.right:SetPoint("BOTTOMRIGHT", -5,5)
pfUI.chat.right:SetScript("OnShow", function() pfUI.chat:RefreshChat() end)
pfUI.api:UpdateMovable(pfUI.chat.right)
pfUI.api:CreateBackdrop(pfUI.chat.right, default_border, nil, .8)
if pfUI_config.chat.global.custombg == "1" then
local r, g, b, a = pfUI.api.strsplit(",", pfUI_config.chat.global.background)
if C.chat.global.custombg == "1" then
local r, g, b, a = pfUI.api.strsplit(",", C.chat.global.background)
pfUI.chat.right.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
local r, g, b, a = pfUI.api.strsplit(",", pfUI_config.chat.global.border)
local r, g, b, a = pfUI.api.strsplit(",", C.chat.global.border)
pfUI.chat.right.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
end
pfUI.chat.right.panelTop = CreateFrame("Frame", "rightChatPanelTop", pfUI.chat.right)
pfUI.chat.right.panelTop:ClearAllPoints()
pfUI.chat.right.panelTop:SetHeight(pfUI_config.global.font_size+default_border*2)
pfUI.chat.right.panelTop:SetHeight(C.global.font_size+default_border*2)
pfUI.chat.right.panelTop:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", default_border, -default_border)
pfUI.chat.right.panelTop:SetPoint("TOPRIGHT", pfUI.chat.right, "TOPRIGHT", -default_border, -default_border)
if pfUI_config.chat.global.tabdock == "1" then
if C.chat.global.tabdock == "1" then
pfUI.api:CreateBackdrop(pfUI.chat.right.panelTop, default_border, nil, .8)
end
@@ -214,9 +214,9 @@ pfUI:RegisterModule("chat", function ()
pfUI.chat:RegisterEvent("CHAT_MSG_SYSTEM")
function pfUI.chat:RefreshChat()
local panelheight = pfUI_config.global.font_size+default_border*5
local panelheight = C.global.font_size+default_border*5
if pfUI_config.chat.global.sticky == "1" then
if C.chat.global.sticky == "1" then
ChatTypeInfo.WHISPER.sticky = 1
ChatTypeInfo.OFFICER.sticky = 1
ChatTypeInfo.RAID_WARNING.sticky = 1
@@ -235,14 +235,14 @@ pfUI:RegisterModule("chat", function ()
local tab = _G["ChatFrame"..i.."Tab"]
if pfUI_config.chat.global.fadeout == "1" then
if C.chat.global.fadeout == "1" then
frame:SetFading(true)
frame:SetTimeVisible(tonumber(pfUI_config.chat.global.fadetime))
frame:SetTimeVisible(tonumber(C.chat.global.fadetime))
else
frame:SetFading(false)
end
if i == 3 and pfUI_config.chat.right.enable == "1" then
if i == 3 and C.chat.right.enable == "1" then
tab:SetParent(pfUI.chat.right.panelTop)
frame:SetParent(pfUI.chat.right)
frame:ClearAllPoints()
@@ -260,12 +260,12 @@ pfUI:RegisterModule("chat", function ()
-- hide textures
for j,v in ipairs({tab:GetRegions()}) do
if j==5 then v:SetTexture(0,0,0,0) end
v:SetHeight(pfUI_config.global.font_size+default_border*2)
v:SetHeight(C.global.font_size+default_border*2)
end
_G["ChatFrame" .. i .. "ResizeBottom"]:Hide()
_G["ChatFrame" .. i .. "TabText"]:SetJustifyV("CENTER")
_G["ChatFrame" .. i .. "TabText"]:SetHeight(pfUI_config.global.font_size+default_border*2)
_G["ChatFrame" .. i .. "TabText"]:SetHeight(C.global.font_size+default_border*2)
_G["ChatFrame" .. i .. "TabText"]:SetPoint("BOTTOM", 0, default_border)
_G["ChatFrame" .. i .. "TabLeft"]:SetAlpha(0)
_G["ChatFrame" .. i .. "TabMiddle"]:SetAlpha(0)
@@ -274,7 +274,7 @@ pfUI:RegisterModule("chat", function ()
local _, class = UnitClass("player")
_G["ChatFrame" .. i .. "TabText"]:SetTextColor(RAID_CLASS_COLORS[class].r + .3 * .5, RAID_CLASS_COLORS[class].g + .3 * .5, RAID_CLASS_COLORS[class].b + .3 * .5, 1)
_G["ChatFrame" .. i .. "TabText"]:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
_G["ChatFrame" .. i .. "TabText"]:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
if _G["ChatFrame" .. i].isDocked or _G["ChatFrame" .. i]:IsVisible() then
_G["ChatFrame" .. i .. "Tab"]:Show()
@@ -301,10 +301,10 @@ pfUI:RegisterModule("chat", function ()
function pfUI.chat.SetupRightChat(state)
if state then
pfUI_config.chat.right.enable = "1"
C.chat.right.enable = "1"
pfUI.chat.right:Show()
else
pfUI_config.chat.right.enable = "0"
C.chat.right.enable = "0"
pfUI.chat.right:Hide()
end
end
@@ -337,7 +337,7 @@ pfUI:RegisterModule("chat", function ()
ChatFrame2:SetUserPlaced(1)
-- Loot & Spam
if pfUI_config.chat.right.enable == "1" then
if C.chat.right.enable == "1" then
-- set position of Loot & Spam
FCF_SetLocked(ChatFrame3, 1)
FCF_SetWindowName(ChatFrame3, "Loot & Spam")
@@ -375,7 +375,7 @@ pfUI:RegisterModule("chat", function ()
ChatFrame_ActivateCombatMessages(ChatFrame2)
if pfUI_config.chat.right.enable == "1" then
if C.chat.right.enable == "1" then
local spamg = { "COMBAT_XP_GAIN", "COMBAT_HONOR_GAIN", "COMBAT_FACTION_CHANGE", "SKILL", "LOOT", "MONEY" }
for _,group in pairs(spamg) do
ChatFrame_AddMessageGroup(ChatFrame3, group)
@@ -395,7 +395,7 @@ pfUI:RegisterModule("chat", function ()
pfUI.chat:SetScript("OnEvent", function()
if event == "PLAYER_ENTERING_WORLD" or event == "UI_SCALE_CHANGED" then
pfUI.chat:RefreshChat()
if pfUI_config.chat.right.enable == "0" and pfUI_config.chat.right.alwaysshow == "0" then
if C.chat.right.enable == "0" and C.chat.right.alwaysshow == "0" then
pfUI.chat.right:Hide()
end
elseif event == "FRIENDLIST_UPDATE" or event == "PLAYER_ENTERING_WORLD" then
@@ -522,10 +522,10 @@ pfUI:RegisterModule("chat", function ()
ChatFrameMenuButton:SetWidth(6)
pfUI.chat.editbox = CreateFrame("Frame", "pfChatInputBox", UIParent)
if pfUI_config.chat.text.input_height == "0" then
if C.chat.text.input_height == "0" then
pfUI.chat.editbox:SetHeight(22)
else
pfUI.chat.editbox:SetHeight(pfUI_config.chat.text.input_height)
pfUI.chat.editbox:SetHeight(C.chat.text.input_height)
end
-- to make sure SHOW_MULTI_ACTIONBAR_1 is set to the real value, we need to wait.
@@ -547,10 +547,10 @@ pfUI:RegisterModule("chat", function ()
pfUI.api:UpdateMovable(pfUI.chat.editbox)
end)
if pfUI_config.chat.text.input_width == "0" then
pfUI.chat.editbox:SetWidth(default_border*3 + pfUI_config.bars.icon_size * 12 + default_border * 12) -- actionbar size
if C.chat.text.input_width == "0" then
pfUI.chat.editbox:SetWidth(default_border*3 + C.bars.icon_size * 12 + default_border * 12) -- actionbar size
else
pfUI.chat.editbox:SetWidth(pfUI_config.chat.text.input_width)
pfUI.chat.editbox:SetWidth(C.chat.text.input_width)
end
ChatFrameEditBox:SetParent(pfUI.chat.editbox)
@@ -560,7 +560,7 @@ pfUI:RegisterModule("chat", function ()
for i,v in ipairs({ChatFrameEditBox:GetRegions()}) do
if i==6 or i==7 or i==8 then v:Hide() end
if v.SetFont then
v:SetFont(pfUI.font_default, pfUI_config.global.font_size + 1, "OUTLINE")
v:SetFont(pfUI.font_default, C.global.font_size + 1, "OUTLINE")
end
end
ChatFrameEditBox:SetAltArrowKeyMode(false)
@@ -577,11 +577,11 @@ pfUI:RegisterModule("chat", function ()
CHAT_BATTLEGROUND_LEADER_GET = '[BL]' .. default
CHAT_SAY_GET = '[S]' .. default
local cr, cg, cb, ca = pfUI.api.strsplit(",", pfUI_config.chat.global.whisper)
local cr, cg, cb, ca = pfUI.api.strsplit(",", C.chat.global.whisper)
cr, cg, cb = tonumber(cr), tonumber(cg), tonumber(cb)
local wcol = string.format("%02x%02x%02x",cr * 255,cg * 255, cb * 255)
if pfUI_config.chat.global.whispermod == "1" then
if C.chat.global.whispermod == "1" then
CHAT_WHISPER_GET = '|cff' .. wcol .. '[W]' .. default
CHAT_WHISPER_INFORM_GET = '[W]' .. default
end
@@ -595,7 +595,7 @@ pfUI:RegisterModule("chat", function ()
_G["ChatFrame"..i].AddMessage = function (frame, text, ...)
if text then
if pfUI_config.chat.text.classcolor == "1" then
if C.chat.text.classcolor == "1" then
local Name = string.gsub(text, ".*|Hplayer:(.-)|h.*", "%1")
if pfUI_playerDB[Name] and pfUI_playerDB[Name].class ~= nil then
local Class = pfUI_playerDB[Name].class
@@ -610,7 +610,7 @@ pfUI:RegisterModule("chat", function ()
text = string.gsub(text, "|Hplayer:(.-)|h%[.-%]|h(.-:-)", "[|Hplayer:%1|h" .. Name .. "|h]" .. "%2")
end
if pfUI_config.chat.global.whispermod == "1" then
if C.chat.global.whispermod == "1" then
-- patch incoming whisper string to match the colors
if string.find(text, '|cff'..wcol, 1) == 1 then
text = string.gsub(text, "|r", "|cff" .. wcol)
@@ -627,13 +627,13 @@ pfUI:RegisterModule("chat", function ()
end
-- show timestamp in chat
if pfUI_config.chat.text.time == "1" then
local left = string.sub(pfUI_config.chat.text.timebracket, 1, 1)
local right = string.sub(pfUI_config.chat.text.timebracket, 2, 2)
if C.chat.text.time == "1" then
local left = string.sub(C.chat.text.timebracket, 1, 1)
local right = string.sub(C.chat.text.timebracket, 2, 2)
local r,g,b,a = pfUI.api.strsplit(",", pfUI_config.chat.text.timecolor)
local r,g,b,a = pfUI.api.strsplit(",", C.chat.text.timecolor)
local chex = string.format("%02x%02x%02x%02x", a*255, r*255, g*255, b*255)
text = "|c" .. chex .. left .. date(pfUI_config.chat.text.timeformat) .. right .. "|r " .. text
text = "|c" .. chex .. left .. date(C.chat.text.timeformat) .. right .. "|r " .. text
end
_G["ChatFrame"..i].HookAddMessage(frame, text, unpack(arg))
+5 -5
View File
@@ -5,7 +5,7 @@ pfUI:RegisterModule("cooldown", function ()
cooldown.cd:SetFrameLevel(cooldown.cd:GetFrameLevel() + 1)
cooldown.cd.text = cooldown.cd:CreateFontString("pfCooldownFrameText", "OVERLAY")
cooldown.cd.text:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
cooldown.cd.text:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
cooldown.cd.text:SetPoint("CENTER", cooldown.cd, "CENTER", 0, 1)
cooldown.cd:SetScript("OnUpdate", function()
@@ -34,17 +34,17 @@ pfUI:RegisterModule("cooldown", function ()
if remaining > 99 then
remaining = remaining / 60
unit = "m"
r,g,b,a = pfUI.api.strsplit(",", pfUI_config.appearance.cd.mincolor)
r,g,b,a = pfUI.api.strsplit(",", C.appearance.cd.mincolor)
end
if remaining > 99 then
remaining = remaining / 60
unit = "h"
r,g,b,a = pfUI.api.strsplit(",", pfUI_config.appearance.cd.hourcolor)
r,g,b,a = pfUI.api.strsplit(",", C.appearance.cd.hourcolor)
end
if remaining > 99 then
remaining = remaining / 24
unit = "d"
r,g,b,a = pfUI.api.strsplit(",", pfUI_config.appearance.cd.daycolor)
r,g,b,a = pfUI.api.strsplit(",", C.appearance.cd.daycolor)
end
this.text:SetText(pfUI.api.round(remaining) .. unit)
this.text:SetTextColor(r,g,b,a)
@@ -67,7 +67,7 @@ pfUI:RegisterModule("cooldown", function ()
end
-- print time as text on cooldown frames
if ( start > 0 and duration > tonumber(pfUI_config.appearance.cd.threshold) and enable > 0) then
if ( start > 0 and duration > tonumber(C.appearance.cd.threshold) and enable > 0) then
if( not this.cd ) then
pfCreateCoolDown(this, start, duration)
end
+2 -2
View File
@@ -43,11 +43,11 @@ pfUI:RegisterModule("eqcompare", function ()
pfUI.eqcompare = CreateFrame( "Frame" , "pfEQCompare", GameTooltip )
pfUI.eqcompare:SetScript("OnShow", function()
if not IsShiftKeyDown() and pfUI_config.tooltip.compare.showalways ~= "1" then
if not IsShiftKeyDown() and C.tooltip.compare.showalways ~= "1" then
return
end
local border = tonumber(pfUI_config.appearance.border.default)
local border = tonumber(C.appearance.border.default)
for i=1,GameTooltip:NumLines() do
local tmpText = _G["GameTooltipTextLeft"..i]
+8 -8
View File
@@ -1,13 +1,13 @@
pfUI:RegisterModule("group", function ()
-- do not go further on disabled UFs
if pfUI_config.unitframes.disable == "1" then return end
if C.unitframes.disable == "1" then return end
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.groupframes ~= "-1" then
default_border = pfUI_config.appearance.border.groupframes
local default_border = C.appearance.border.default
if C.appearance.border.groupframes ~= "-1" then
default_border = C.appearance.border.groupframes
end
local spacing = pfUI_config.unitframes.group.pspace
local spacing = C.unitframes.group.pspace
-- hide blizzard group frames
for i=1, 4 do
@@ -35,7 +35,7 @@ pfUI:RegisterModule("group", function ()
PartyMemberBackground:Hide()
for i=1, 4 do
if pfUI_config.unitframes.group.hide_in_raid == "1" and UnitInRaid("player") then
if C.unitframes.group.hide_in_raid == "1" and UnitInRaid("player") then
pfUI.uf.group[i]:Hide()
else
if event == "RAID_TARGET_UPDATE" or event == "PLAYER_ENTERING_WORLD" or event == "PARTY_MEMBERS_CHANGED" then
@@ -115,10 +115,10 @@ pfUI:RegisterModule("group", function ()
pfUI.uf.group[i].power.bar:SetAllPoints(pfUI.uf.group[i].power)
pfUI.uf.group[i].power.bar:SetMinMaxValues(0, 100)
pfUI.uf:CreatePortrait(pfUI.uf.group[i], pfUI_config.unitframes.group.portrait, spacing)
pfUI.uf:CreatePortrait(pfUI.uf.group[i], C.unitframes.group.portrait, spacing)
pfUI.uf.group[i].caption = pfUI.uf.group[i]:CreateFontString("Status", "OVERLAY", "GameFontNormal")
pfUI.uf.group[i].caption:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.group[i].caption:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.group[i].caption:ClearAllPoints()
pfUI.uf.group[i].caption:SetParent(pfUI.uf.group[i].hp.bar)
pfUI.uf.group[i].caption:SetPoint("LEFT",pfUI.uf.group[i].hp.bar, "LEFT", 10, 0)
+207 -207
View File
@@ -1,5 +1,5 @@
pfUI:RegisterModule("gui", function ()
local default_border = tonumber(pfUI_config.appearance.border.default)
local default_border = tonumber(C.appearance.border.default)
pfUI.gui = CreateFrame("Frame",nil,UIParent)
@@ -39,10 +39,10 @@ pfUI:RegisterModule("gui", function ()
function pfUI.gui:SaveScale(frame, scale)
frame:SetScale(scale)
if not pfUI_config.position[frame:GetName()] then
pfUI_config.position[frame:GetName()] = {}
if not C.position[frame:GetName()] then
C.position[frame:GetName()] = {}
end
pfUI_config.position[frame:GetName()]["scale"] = scale
C.position[frame:GetName()]["scale"] = scale
frame.drag.text:SetText("Scale: " .. scale)
frame.drag.text:SetAlpha(1)
@@ -147,7 +147,7 @@ pfUI:RegisterModule("gui", function ()
frame.drag.backdrop:SetBackdropBorderColor(.2, 1, .8)
frame.drag:EnableMouseWheel(1)
frame.drag.text = frame.drag:CreateFontString("Status", "LOW", "GameFontNormal")
frame.drag.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.drag.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.drag.text:ClearAllPoints()
frame.drag.text:SetAllPoints(frame.drag)
frame.drag.text:SetPoint("CENTER", 0, 0)
@@ -246,12 +246,12 @@ pfUI:RegisterModule("gui", function ()
local _, _, _, xpos, ypos = cframe:GetPoint()
if not pfUI_config.position[cframe:GetName()] then
pfUI_config.position[cframe:GetName()] = {}
if not C.position[cframe:GetName()] then
C.position[cframe:GetName()] = {}
end
pfUI_config.position[cframe:GetName()]["xpos"] = xpos
pfUI_config.position[cframe:GetName()]["ypos"] = ypos
C.position[cframe:GetName()]["xpos"] = xpos
C.position[cframe:GetName()]["ypos"] = ypos
end
end
elseif strsub(frame:GetName(),0,7) == "pfGroup" then
@@ -264,12 +264,12 @@ pfUI:RegisterModule("gui", function ()
local _, _, _, xpos, ypos = cframe:GetPoint()
if not pfUI_config.position[cframe:GetName()] then
pfUI_config.position[cframe:GetName()] = {}
if not C.position[cframe:GetName()] then
C.position[cframe:GetName()] = {}
end
pfUI_config.position[cframe:GetName()]["xpos"] = xpos
pfUI_config.position[cframe:GetName()]["ypos"] = ypos
C.position[cframe:GetName()]["xpos"] = xpos
C.position[cframe:GetName()]["ypos"] = ypos
end
end
elseif strsub(frame:GetName(),0,15) == "pfLootRollFrame" then
@@ -282,23 +282,23 @@ pfUI:RegisterModule("gui", function ()
local _, _, _, xpos, ypos = cframe:GetPoint()
if not pfUI_config.position[cframe:GetName()] then
pfUI_config.position[cframe:GetName()] = {}
if not C.position[cframe:GetName()] then
C.position[cframe:GetName()] = {}
end
pfUI_config.position[cframe:GetName()]["xpos"] = xpos
pfUI_config.position[cframe:GetName()]["ypos"] = ypos
C.position[cframe:GetName()]["xpos"] = xpos
C.position[cframe:GetName()]["ypos"] = ypos
end
end
end
end
if not pfUI_config.position[frame:GetName()] then
pfUI_config.position[frame:GetName()] = {}
if not C.position[frame:GetName()] then
C.position[frame:GetName()] = {}
end
pfUI_config.position[frame:GetName()]["xpos"] = xpos
pfUI_config.position[frame:GetName()]["ypos"] = ypos
C.position[frame:GetName()]["xpos"] = xpos
C.position[frame:GetName()]["ypos"] = ypos
pfUI.gui.settingChanged = true
end)
@@ -370,7 +370,7 @@ pfUI:RegisterModule("gui", function ()
end
pfUI.api:CreateBackdrop(frame.switch, nil, true)
frame.switch.text = frame.switch:CreateFontString("Status", "LOW", "GameFontNormal")
frame.switch.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.switch.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.switch.text:SetAllPoints(frame.switch)
frame.switch.text:SetPoint("CENTER", 0, 0)
frame.switch.text:SetFontObject(GameFontWhite)
@@ -386,7 +386,7 @@ pfUI:RegisterModule("gui", function ()
-- do not show title on bottom buttons
if not bottom and not func then
frame.title = frame:CreateFontString("Status", "LOW", "GameFontNormal")
frame.title:SetFont(pfUI.font_default, pfUI_config.global.font_size + 2, "OUTLINE")
frame.title:SetFont(pfUI.font_default, C.global.font_size + 2, "OUTLINE")
frame.title:SetPoint("TOP", 0, -10)
frame.title:SetTextColor(.2,1,.8)
frame.title:SetText(text)
@@ -427,7 +427,7 @@ pfUI:RegisterModule("gui", function ()
-- caption
frame.caption = frame:CreateFontString("Status", "LOW", "GameFontNormal")
frame.caption:SetFont(pfUI.font_default, pfUI_config.global.font_size + 2, "OUTLINE")
frame.caption:SetFont(pfUI.font_default, C.global.font_size + 2, "OUTLINE")
frame.caption:SetAllPoints(frame)
frame.caption:SetFontObject(GameFontWhite)
frame.caption:SetJustifyH("LEFT")
@@ -729,18 +729,18 @@ pfUI:RegisterModule("gui", function ()
-- General
pfUI.gui.global = pfUI.gui:CreateConfigTab("General Settings")
local values = { "Continuum", "DieDieDie", "Expressway", "Homespun", "Myriad-Pro", "PT-Sans-Narrow-Bold", "PT-Sans-Narrow-Regular" }
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable Region Compatible Font", pfUI_config.global, "force_region", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "General Font", pfUI_config.global, "font_default", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.global, "Unit Frame & Action Bar Font", pfUI_config.global, "font_square", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.global, "Scrolling Combat Text Font", pfUI_config.global, "font_combat", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.global, "Font Size", pfUI_config.global, "font_size")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable Pixel Perfect (Native Resolution)", pfUI_config.global, "pixelperfect", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable Offscreen Frame Positions", pfUI_config.global, "offscreen", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable Single Line UIErrors", pfUI_config.global, "errors_limit", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Disable All UIErrors", pfUI_config.global, "errors_hide", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Disable Minimap Buffs", pfUI_config.global, "hidebuff", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Disable Minimap Weapon Buffs", pfUI_config.global, "hidewbuff", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable 24h Clock", pfUI_config.global, "twentyfour", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable Region Compatible Font", C.global, "force_region", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "General Font", C.global, "font_default", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.global, "Unit Frame & Action Bar Font", C.global, "font_square", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.global, "Scrolling Combat Text Font", C.global, "font_combat", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.global, "Font Size", C.global, "font_size")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable Pixel Perfect (Native Resolution)", C.global, "pixelperfect", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable Offscreen Frame Positions", C.global, "offscreen", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable Single Line UIErrors", C.global, "errors_limit", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Disable All UIErrors", C.global, "errors_hide", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Disable Minimap Buffs", C.global, "hidebuff", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Disable Minimap Weapon Buffs", C.global, "hidewbuff", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Enable 24h Clock", C.global, "twentyfour", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.global, "Profile", nil, nil, "header")
local values = {}
@@ -753,25 +753,25 @@ pfUI:RegisterModule("gui", function ()
pfUIDropDownMenuProfile.Refresh()
end
pfUI.gui:CreateConfig(pfUI.gui.global, "Select profile", pfUI_config.global, "profile", "dropdown", values, false, "Profile")
pfUI.gui:CreateConfig(pfUI.gui.global, "Select profile", C.global, "profile", "dropdown", values, false, "Profile")
-- load profile
pfUI.gui:CreateConfig(pfUI.gui.global, "Load profile", pfUI_config.global, "profile", "button", function()
if pfUI_config.global.profile and pfUI_profiles[pfUI_config.global.profile] then
pfUI.api:CreateQuestionDialog("Load profile '|cff33ffcc" .. pfUI_config.global.profile .. "|r'?", function()
local selp = pfUI_config.global.profile
pfUI_config = pfUI.api.CopyTable(pfUI_profiles[pfUI_config.global.profile])
pfUI_config.global.profile = selp
pfUI.gui:CreateConfig(pfUI.gui.global, "Load profile", C.global, "profile", "button", function()
if C.global.profile and pfUI_profiles[C.global.profile] then
pfUI.api:CreateQuestionDialog("Load profile '|cff33ffcc" .. C.global.profile .. "|r'?", function()
local selp = C.global.profile
C = pfUI.api.CopyTable(pfUI_profiles[C.global.profile])
C.global.profile = selp
ReloadUI()
end)
end
end)
-- delete profile
pfUI.gui:CreateConfig(pfUI.gui.global, "Delete profile", pfUI_config.global, "profile", "button", function()
if pfUI_config.global.profile and pfUI_profiles[pfUI_config.global.profile] then
pfUI.api:CreateQuestionDialog("Delete profile '|cff33ffcc" .. pfUI_config.global.profile .. "|r'?", function()
pfUI_profiles[pfUI_config.global.profile] = nil
pfUI.gui:CreateConfig(pfUI.gui.global, "Delete profile", C.global, "profile", "button", function()
if C.global.profile and pfUI_profiles[C.global.profile] then
pfUI.api:CreateQuestionDialog("Delete profile '|cff33ffcc" .. C.global.profile .. "|r'?", function()
pfUI_profiles[C.global.profile] = nil
pfUpdateProfiles()
this:GetParent():Hide()
end)
@@ -779,11 +779,11 @@ pfUI:RegisterModule("gui", function ()
end, true)
-- save profile
pfUI.gui:CreateConfig(pfUI.gui.global, "Save profile", pfUI_config.global, "profile", "button", function()
if pfUI_config.global.profile and pfUI_profiles[pfUI_config.global.profile] then
pfUI.api:CreateQuestionDialog("Save current settings to profile '|cff33ffcc" .. pfUI_config.global.profile .. "|r'?", function()
if pfUI_profiles[pfUI_config.global.profile] then
pfUI_profiles[pfUI_config.global.profile] = pfUI.api.CopyTable(pfUI_config)
pfUI.gui:CreateConfig(pfUI.gui.global, "Save profile", C.global, "profile", "button", function()
if C.global.profile and pfUI_profiles[C.global.profile] then
pfUI.api:CreateQuestionDialog("Save current settings to profile '|cff33ffcc" .. C.global.profile .. "|r'?", function()
if pfUI_profiles[C.global.profile] then
pfUI_profiles[C.global.profile] = pfUI.api.CopyTable(C)
end
this:GetParent():Hide()
end)
@@ -791,7 +791,7 @@ pfUI:RegisterModule("gui", function ()
end, true)
-- create profile
pfUI.gui:CreateConfig(pfUI.gui.global, "Create Profile", pfUI_config.global, "profile", "button", function()
pfUI.gui:CreateConfig(pfUI.gui.global, "Create Profile", C.global, "profile", "button", function()
pfUI.api:CreateQuestionDialog("Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten.",
function()
local profile = this:GetParent().input:GetText()
@@ -801,7 +801,7 @@ pfUI:RegisterModule("gui", function ()
else
profile = (string.gsub(profile,"^%s*(.-)%s*$", "%1"))
if profile and profile ~= "" then
pfUI_profiles[profile] = pfUI.api.CopyTable(pfUI_config)
pfUI_profiles[profile] = pfUI.api.CopyTable(C)
pfUpdateProfiles()
this:GetParent():Hide()
end
@@ -811,210 +811,210 @@ pfUI:RegisterModule("gui", function ()
-- appearance
pfUI.gui.appearance = pfUI.gui:CreateConfigTab("Appearance")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Background Color", pfUI_config.appearance.border, "background", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Border Color", pfUI_config.appearance.border, "color", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Background Color", C.appearance.border, "background", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Border Color", C.appearance.border, "color", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Border", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Global Border Size", pfUI_config.appearance.border, "default")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Action Bar Border Size", pfUI_config.appearance.border, "actionbars")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Unit Frame Border Size", pfUI_config.appearance.border, "unitframes")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Group Frame Border Size", pfUI_config.appearance.border, "groupframes")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Raid Frame Border Size", pfUI_config.appearance.border, "raidframes")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Panel Border Size", pfUI_config.appearance.border, "panels")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Chat Border Size", pfUI_config.appearance.border, "chat")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Bags Border Size", pfUI_config.appearance.border, "bags")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Global Border Size", C.appearance.border, "default")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Action Bar Border Size", C.appearance.border, "actionbars")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Unit Frame Border Size", C.appearance.border, "unitframes")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Group Frame Border Size", C.appearance.border, "groupframes")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Raid Frame Border Size", C.appearance.border, "raidframes")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Panel Border Size", C.appearance.border, "panels")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Chat Border Size", C.appearance.border, "chat")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Bags Border Size", C.appearance.border, "bags")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown Color (Minutes)", pfUI_config.appearance.cd, "mincolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown Color (Hours)", pfUI_config.appearance.cd, "hourcolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown Color (Days)", pfUI_config.appearance.cd, "daycolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown Text Threshold", pfUI_config.appearance.cd, "threshold")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown Color (Minutes)", C.appearance.cd, "mincolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown Color (Hours)", C.appearance.cd, "hourcolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown Color (Days)", C.appearance.cd, "daycolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Cooldown Text Threshold", C.appearance.cd, "threshold")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Combat", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Combat Glow Effects On Screen Edges", pfUI_config.appearance.infight, "screen", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Combat Glow Effects On Unit Frames", pfUI_config.appearance.infight, "common", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Combat Glow Effects On Group Frames", pfUI_config.appearance.infight, "group", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Combat Glow Effects On Screen Edges", C.appearance.infight, "screen", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Combat Glow Effects On Unit Frames", C.appearance.infight, "common", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Combat Glow Effects On Group Frames", C.appearance.infight, "group", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Bags & Bank", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Disable Item Quality Color For \"Common\" Items", pfUI_config.appearance.bags, "borderlimit", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Item Quality Color For Equipment Only", pfUI_config.appearance.bags, "borderonlygear", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Disable Item Quality Color For \"Common\" Items", C.appearance.bags, "borderlimit", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Item Quality Color For Equipment Only", C.appearance.bags, "borderonlygear", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Loot", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Auto-Resize Loot Frame", pfUI_config.appearance.loot, "autoresize", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Auto-Resize Loot Frame", C.appearance.loot, "autoresize", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Minimap", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Zone Text On Minimap Mouseover", pfUI_config.appearance.minimap, "mouseoverzone", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Enable Zone Text On Minimap Mouseover", C.appearance.minimap, "mouseoverzone", "checkbox")
-- unit frames
pfUI.gui.uf = pfUI.gui:CreateConfigTab("Unit Frames")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Disable pfUI Unit Frames", pfUI_config.unitframes, "disable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Pastel Colors", pfUI_config.unitframes, "pastel", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Custom Color Health Bars", pfUI_config.unitframes, "custom", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Custom Health Bar Color", pfUI_config.unitframes, "customcolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Animation Speed", pfUI_config.unitframes, "animation_speed")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Alpha", pfUI_config.unitframes, "portraitalpha")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable 2D Portraits As Fallback", pfUI_config.unitframes, "portraittexture", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Disable pfUI Unit Frames", C.unitframes, "disable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Pastel Colors", C.unitframes, "pastel", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Custom Color Health Bars", C.unitframes, "custom", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Custom Health Bar Color", C.unitframes, "customcolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Animation Speed", C.unitframes, "animation_speed")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Alpha", C.unitframes, "portraitalpha")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable 2D Portraits As Fallback", C.unitframes, "portraittexture", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", pfUI_config.unitframes, "buff_size")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", pfUI_config.unitframes, "debuff_size")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Unit Frame Layout", pfUI_config.unitframes, "layout", "dropdown", { "default", "tukui" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Clickcast", pfUI_config.unitframes, "globalclick", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Size", C.unitframes, "buff_size")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Debuff Size", C.unitframes, "debuff_size")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Unit Frame Layout", C.unitframes, "layout", "dropdown", { "default", "tukui" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Clickcast", C.unitframes, "globalclick", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Player", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", pfUI_config.unitframes.player, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Width", pfUI_config.unitframes.player, "width")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Height", pfUI_config.unitframes.player, "height")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Power Bar Height", pfUI_config.unitframes.player, "pheight")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", pfUI_config.unitframes.player, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable PvP Icon", pfUI_config.unitframes.player, "showPVP", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Align PvP Icon to Minimap", pfUI_config.unitframes.player, "showPVPMinimap", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Position", pfUI_config.unitframes.player, "buffs", "dropdown", { "top", "bottom", "hide"})
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Energy Ticks", pfUI_config.unitframes.player, "energy", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", C.unitframes.player, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Width", C.unitframes.player, "width")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Height", C.unitframes.player, "height")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Power Bar Height", C.unitframes.player, "pheight")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", C.unitframes.player, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable PvP Icon", C.unitframes.player, "showPVP", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Align PvP Icon to Minimap", C.unitframes.player, "showPVPMinimap", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Position", C.unitframes.player, "buffs", "dropdown", { "top", "bottom", "hide"})
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Energy Ticks", C.unitframes.player, "energy", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Target", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", pfUI_config.unitframes.target, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Target Switch Animation", pfUI_config.unitframes.target, "animation", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Width", pfUI_config.unitframes.target, "width")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Height", pfUI_config.unitframes.target, "height")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Power Bar Height", pfUI_config.unitframes.target, "pheight")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", pfUI_config.unitframes.target, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Position", pfUI_config.unitframes.target, "buffs", "dropdown", { "top", "bottom", "hide"})
pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", C.unitframes.target, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Target Switch Animation", C.unitframes.target, "animation", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Width", C.unitframes.target, "width")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Health Bar Height", C.unitframes.target, "height")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Power Bar Height", C.unitframes.target, "pheight")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", C.unitframes.target, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Buff Position", C.unitframes.target, "buffs", "dropdown", { "top", "bottom", "hide"})
pfUI.gui:CreateConfig(pfUI.gui.uf, "Group", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", pfUI_config.unitframes.group, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", pfUI_config.unitframes.group, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Hide Group Frames When In A Raid", pfUI_config.unitframes.group, "hide_in_raid", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Clickcast", pfUI_config.unitframes.group, "clickcast", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Raid Frames Buff Behaviour For Group Frames", pfUI_config.unitframes.group, "raid_buffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Raid Frames Debuff Behaviour For Group Frames", pfUI_config.unitframes.group, "raid_debuffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Portrait Position", C.unitframes.group, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", C.unitframes.group, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Hide Group Frames When In A Raid", C.unitframes.group, "hide_in_raid", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Clickcast", C.unitframes.group, "clickcast", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Raid Frames Buff Behaviour For Group Frames", C.unitframes.group, "raid_buffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Enable Raid Frames Debuff Behaviour For Group Frames", C.unitframes.group, "raid_debuffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Raid", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", pfUI_config.unitframes.raid, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", pfUI_config.unitframes.raid, "invert_healthbar", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Missing Health", pfUI_config.unitframes.raid, "show_missing", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast", pfUI_config.unitframes.raid, "clickcast")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Shift)", pfUI_config.unitframes.raid, "clickcast_shift")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Alt)", pfUI_config.unitframes.raid, "clickcast_alt")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Ctrl)", pfUI_config.unitframes.raid, "clickcast_ctrl")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show My Buffs", pfUI_config.unitframes.raid, "buffs_buffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show HOTs", pfUI_config.unitframes.raid, "buffs_hots", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show My Procs", pfUI_config.unitframes.raid, "buffs_procs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Only Display HOTs Of My Class", pfUI_config.unitframes.raid, "buffs_classonly", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Debuff Indicators", pfUI_config.unitframes.raid, "debuffs_enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Only Display Debuffs Of My Class", pfUI_config.unitframes.raid, "debuffs_class", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Spacing", C.unitframes.raid, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Health Bar", C.unitframes.raid, "invert_healthbar", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Missing Health", C.unitframes.raid, "show_missing", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast", C.unitframes.raid, "clickcast")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Shift)", C.unitframes.raid, "clickcast_shift")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Alt)", C.unitframes.raid, "clickcast_alt")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Clickcast (Ctrl)", C.unitframes.raid, "clickcast_ctrl")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show My Buffs", C.unitframes.raid, "buffs_buffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show HOTs", C.unitframes.raid, "buffs_hots", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show My Procs", C.unitframes.raid, "buffs_procs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Only Display HOTs Of My Class", C.unitframes.raid, "buffs_classonly", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show Debuff Indicators", C.unitframes.raid, "debuffs_enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Only Display Debuffs Of My Class", C.unitframes.raid, "debuffs_class", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Other", nil, nil, "header")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Target Of Target Portrait Position", pfUI_config.unitframes.ttarget, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Target Of Target Spacing", pfUI_config.unitframes.ttarget, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Target Of Target Portrait Position", C.unitframes.ttarget, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Target Of Target Spacing", C.unitframes.ttarget, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Pet Portrait Position", pfUI_config.unitframes.pet, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Pet Spacing", pfUI_config.unitframes.pet, "pspace")
pfUI.gui:CreateConfig(pfUI.gui.uf, "Pet Portrait Position", C.unitframes.pet, "portrait", "dropdown", { "bar", "left", "right", "off" })
pfUI.gui:CreateConfig(pfUI.gui.uf, "Pet Spacing", C.unitframes.pet, "pspace")
-- action bar
pfUI.gui.bar = pfUI.gui:CreateConfigTab("Action Bar")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Icon Size", pfUI_config.bars, "icon_size")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Action Bar Backgrounds", pfUI_config.bars, "background", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Range Display On Hotkeys", pfUI_config.bars, "glowrange", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Range Display Color", pfUI_config.bars, "rangecolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Range Based Auto Paging (Hunter)", pfUI_config.bars, "hunterbar", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Icon Size", C.bars, "icon_size")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Action Bar Backgrounds", C.bars, "background", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Range Display On Hotkeys", C.bars, "glowrange", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Range Display Color", C.bars, "rangecolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Range Based Auto Paging (Hunter)", C.bars, "hunterbar", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Seconds Until Action Bars Autohide", pfUI_config.bars, "hide_time")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarActionMain", pfUI_config.bars, "hide_actionmain", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarBottomLeft", pfUI_config.bars, "hide_bottomleft", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarBottomRight", pfUI_config.bars, "hide_bottomright", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarRight", pfUI_config.bars, "hide_right", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarTwoRight", pfUI_config.bars, "hide_tworight", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarShapeShift", pfUI_config.bars, "hide_shapeshift", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarPet", pfUI_config.bars, "hide_pet", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Seconds Until Action Bars Autohide", C.bars, "hide_time")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarActionMain", C.bars, "hide_actionmain", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarBottomLeft", C.bars, "hide_bottomleft", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarBottomRight", C.bars, "hide_bottomright", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarRight", C.bars, "hide_right", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarTwoRight", C.bars, "hide_tworight", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarShapeShift", C.bars, "hide_shapeshift", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Enable Autohide For BarPet", C.bars, "hide_pet", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Action Bar Layouts", nil, nil, "header")
local values = pfUI.api:BarLayoutOptions(NUM_ACTIONBAR_BUTTONS)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Main Actionbar (ActionMain)", pfUI_config.bars.actionmain, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Second Actionbar (BottomLeft)", pfUI_config.bars.bottomleft, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Left Actionbar (BottomRight)", pfUI_config.bars.bottomright, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Right Actionbar (Right)", pfUI_config.bars.right, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Vertical Actionbar (TwoRight)", pfUI_config.bars.tworight, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Main Actionbar (ActionMain)", C.bars.actionmain, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Second Actionbar (BottomLeft)", C.bars.bottomleft, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Left Actionbar (BottomRight)", C.bars.bottomright, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Right Actionbar (Right)", C.bars.right, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Vertical Actionbar (TwoRight)", C.bars.tworight, "formfactor", "dropdown", values)
local values = pfUI.api:BarLayoutOptions(NUM_SHAPESHIFT_SLOTS)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Shapeshift Bar (BarShapeShift)", pfUI_config.bars.shapeshift, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Shapeshift Bar (BarShapeShift)", C.bars.shapeshift, "formfactor", "dropdown", values)
local values = pfUI.api:BarLayoutOptions(NUM_PET_ACTION_SLOTS)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Pet Bar (BarPet)", pfUI_config.bars.pet, "formfactor", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.bar, "Pet Bar (BarPet)", C.bars.pet, "formfactor", "dropdown", values)
-- panels
pfUI.gui.panel = pfUI.gui:CreateConfigTab("Panel")
local values = { "time", "fps", "exp", "gold", "friends", "guild", "durability", "zone", "combat", "none" }
pfUI.gui:CreateConfig(pfUI.gui.panel, "Left Panel: Left", pfUI_config.panel.left, "left", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Left Panel: Center", pfUI_config.panel.left, "center", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Left Panel: Right", pfUI_config.panel.left, "right", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Right Panel: Left", pfUI_config.panel.right, "left", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Right Panel: Center", pfUI_config.panel.right, "center", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Right Panel: Right", pfUI_config.panel.right, "right", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Other Panel: Minimap", pfUI_config.panel.other, "minimap", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Always Show Experience And Reputation Bar", pfUI_config.panel.xp, "showalways", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.panel, "Enable Micro Bar", pfUI_config.panel.micro, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.panel, "Left Panel: Left", C.panel.left, "left", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Left Panel: Center", C.panel.left, "center", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Left Panel: Right", C.panel.left, "right", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Right Panel: Left", C.panel.right, "left", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Right Panel: Center", C.panel.right, "center", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Right Panel: Right", C.panel.right, "right", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Other Panel: Minimap", C.panel.other, "minimap", "dropdown", values)
pfUI.gui:CreateConfig(pfUI.gui.panel, "Always Show Experience And Reputation Bar", C.panel.xp, "showalways", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.panel, "Enable Micro Bar", C.panel.micro, "enable", "checkbox")
-- tooltip
pfUI.gui.tooltip = pfUI.gui:CreateConfigTab("Tooltip")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Tooltip Position", pfUI_config.tooltip, "position", "dropdown", { "bottom", "chat", "cursor" })
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Enable Extended Guild Information", pfUI_config.tooltip, "extguild", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Custom Transparency", pfUI_config.tooltip, "alpha")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Always Show Item Comparison", pfUI_config.tooltip.compare, "showalways", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Always Show Extended Vendor Values", pfUI_config.tooltip.vendor, "showalways", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Tooltip Position", C.tooltip, "position", "dropdown", { "bottom", "chat", "cursor" })
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Enable Extended Guild Information", C.tooltip, "extguild", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Custom Transparency", C.tooltip, "alpha")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Always Show Item Comparison", C.tooltip.compare, "showalways", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.tooltip, "Always Show Extended Vendor Values", C.tooltip.vendor, "showalways", "checkbox")
-- castbar
pfUI.gui.castbar = pfUI.gui:CreateConfigTab("Castbar")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Casting Color", pfUI_config.appearance.castbar, "castbarcolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Channeling Color", pfUI_config.appearance.castbar, "channelcolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Disable Blizzard Castbar", pfUI_config.castbar.player, "hide_blizz", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Disable pfUI Player Castbar", pfUI_config.castbar.player, "hide_pfui", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Disable pfUI Target Castbar", pfUI_config.castbar.target, "hide_pfui", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Casting Color", C.appearance.castbar, "castbarcolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Channeling Color", C.appearance.castbar, "channelcolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Disable Blizzard Castbar", C.castbar.player, "hide_blizz", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Disable pfUI Player Castbar", C.castbar.player, "hide_pfui", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.castbar, "Disable pfUI Target Castbar", C.castbar.target, "hide_pfui", "checkbox")
-- chat
pfUI.gui.chat = pfUI.gui:CreateConfigTab("Chat")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable \"Loot & Spam\" Chat Window", pfUI_config.chat.right, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Inputbox Width", pfUI_config.chat.text, "input_width")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Inputbox Height", pfUI_config.chat.text, "input_height")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Timestamps", pfUI_config.chat.text, "time", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp Format", pfUI_config.chat.text, "timeformat")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp Brackets", pfUI_config.chat.text, "timebracket")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp Color", pfUI_config.chat.text, "timecolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Class Colors", pfUI_config.chat.text, "classcolor", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Left Chat Width", pfUI_config.chat.left, "width")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Left Chat Height", pfUI_config.chat.left, "height")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Right Chat Width", pfUI_config.chat.right, "width")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Right Chat Height", pfUI_config.chat.right, "height")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Right Chat Window", pfUI_config.chat.right, "alwaysshow", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Chat Dock", pfUI_config.chat.global, "tabdock", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Custom Colors", pfUI_config.chat.global, "custombg", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Chat Background Color", pfUI_config.chat.global, "background", "color")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Chat Border Color", pfUI_config.chat.global, "border", "color")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Custom Incoming Whispers Layout", pfUI_config.chat.global, "whispermod", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Incoming Whispers Color", pfUI_config.chat.global, "whisper", "color")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Sticky Chat", pfUI_config.chat.global, "sticky", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Chat Fade", pfUI_config.chat.global, "fadeout", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Seconds Before Chat Fade", pfUI_config.chat.global, "fadetime")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable \"Loot & Spam\" Chat Window", C.chat.right, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Inputbox Width", C.chat.text, "input_width")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Inputbox Height", C.chat.text, "input_height")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Timestamps", C.chat.text, "time", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp Format", C.chat.text, "timeformat")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp Brackets", C.chat.text, "timebracket")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp Color", C.chat.text, "timecolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Class Colors", C.chat.text, "classcolor", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Left Chat Width", C.chat.left, "width")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Left Chat Height", C.chat.left, "height")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Right Chat Width", C.chat.right, "width")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Right Chat Height", C.chat.right, "height")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Right Chat Window", C.chat.right, "alwaysshow", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Chat Dock", C.chat.global, "tabdock", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Custom Colors", C.chat.global, "custombg", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Chat Background Color", C.chat.global, "background", "color")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Chat Border Color", C.chat.global, "border", "color")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Custom Incoming Whispers Layout", C.chat.global, "whispermod", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Incoming Whispers Color", C.chat.global, "whisper", "color")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Sticky Chat", C.chat.global, "sticky", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Enable Chat Fade", C.chat.global, "fadeout", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.chat, "Seconds Before Chat Fade", C.chat.global, "fadetime")
-- nameplates
pfUI.gui.nameplates = pfUI.gui:CreateConfigTab("Nameplates")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Castbars", pfUI_config.nameplates, "showcastbar", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Spellname", pfUI_config.nameplates, "spellname", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Debuffs", pfUI_config.nameplates, "showdebuffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Clickthrough", pfUI_config.nameplates, "clickthrough", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Mouselook With Right Click", pfUI_config.nameplates, "rightclick", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Right Click Auto Attack Threshold", pfUI_config.nameplates, "clickthreshold")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Class Colors On Enemies", pfUI_config.nameplates, "enemyclassc", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Class Colors On Friends", pfUI_config.nameplates, "friendclassc", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Raid Icon Size", pfUI_config.nameplates, "raidiconsize")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Players Only", pfUI_config.nameplates, "players", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Health Points", pfUI_config.nameplates, "showhp", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Vertical Position", pfUI_config.nameplates, "vpos")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Castbars", C.nameplates, "showcastbar", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Spellname", C.nameplates, "spellname", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Debuffs", C.nameplates, "showdebuffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Clickthrough", C.nameplates, "clickthrough", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Mouselook With Right Click", C.nameplates, "rightclick", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Right Click Auto Attack Threshold", C.nameplates, "clickthreshold")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Class Colors On Enemies", C.nameplates, "enemyclassc", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Class Colors On Friends", C.nameplates, "friendclassc", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Raid Icon Size", C.nameplates, "raidiconsize")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Players Only", C.nameplates, "players", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Health Points", C.nameplates, "showhp", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Vertical Position", C.nameplates, "vpos")
-- thirdparty
pfUI.gui.thirdparty = pfUI.gui:CreateConfigTab("Thirdparty")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "DPSMate", pfUI_config.thirdparty.dpsmate, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "WIM", pfUI_config.thirdparty.wim, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "HealComm", pfUI_config.thirdparty.healcomm, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "CleanUp", pfUI_config.thirdparty.cleanup, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "KLH Threat Meter", pfUI_config.thirdparty.ktm, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "DPSMate", C.thirdparty.dpsmate, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "WIM", C.thirdparty.wim, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "HealComm", C.thirdparty.healcomm, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "CleanUp", C.thirdparty.cleanup, "enable", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.thirdparty, "KLH Threat Meter", C.thirdparty.ktm, "enable", "checkbox")
-- modules
pfUI.gui.modules = pfUI.gui:CreateConfigTab("Modules")
@@ -1022,7 +1022,7 @@ pfUI:RegisterModule("gui", function ()
if m ~= "gui" then
-- create disabled entry if not existing and display
pfUI:UpdateConfig("disabled", nil, m, "0")
pfUI.gui:CreateConfig(pfUI.gui.modules, "Disable " .. m, pfUI_config.disabled, m, "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.modules, "Disable " .. m, C.disabled, m, "checkbox")
end
end
@@ -1061,7 +1061,7 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui.resetFrames = pfUI.gui:CreateConfigTab("Reset Positions", "bottom", function()
pfUI.api:CreateQuestionDialog("Do you really want to reset the Frame Positions?",
function()
_G["pfUI_config"]["position"] = {}
_G["C"]["position"] = {}
this:GetParent():Hide()
pfUI.gui:Reload()
end)
@@ -1081,7 +1081,7 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui.resetConfig = pfUI.gui:CreateConfigTab("Reset Config", "bottom", function()
pfUI.api:CreateQuestionDialog("Do you really want to reset your configuration?\nThis also includes frame positions",
function()
_G["pfUI_config"] = {}
_G["C"] = {}
pfUI:LoadConfig()
this:GetParent():Hide()
pfUI.gui:Reload()
@@ -1093,7 +1093,7 @@ pfUI:RegisterModule("gui", function ()
pfUI.api:CreateQuestionDialog("Do you really want to reset |cffffaaaaEVERYTHING|r?\nThis includes configuration, frame positions, firstrun settings,\n player cache, profiles and just EVERYTHING!",
function()
_G["pfUI_init"] = {}
_G["pfUI_config"] = {}
_G["C"] = {}
_G["pfUI_playerDB"] = {}
pfUI_profiles = {}
pfUI:LoadConfig()
+1 -1
View File
@@ -1,5 +1,5 @@
pfUI:RegisterModule("hoverbind", function ()
local default_border = pfUI_config.appearance.border.default
local default_border = C.appearance.border.default
local keymap = {
["BonusActionButton"] = "ACTIONBUTTON",
["MultiBarBottomLeftButton"] = "MULTIACTIONBAR1BUTTON",
+1 -1
View File
@@ -1,6 +1,6 @@
pfUI:RegisterModule("hunterbar", function ()
local _,class = UnitClass("player")
if class ~= "HUNTER" or pfUI_config.bars.hunterbar == "0" then return end
if class ~= "HUNTER" or C.bars.hunterbar == "0" then return end
pfUI.hunterbar = CreateFrame("Frame", "pfHunterBar", UIParent)
pfUI.hunterbar.scanner = CreateFrame("GameTooltip", "pfHunterBarScanner", UIParent, "GameTooltipTemplate")
+7 -7
View File
@@ -1,7 +1,7 @@
pfUI:RegisterModule("infight", function ()
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.unitframes ~= "-1" then
default_border = pfUI_config.appearance.border.unitframes
local default_border = C.appearance.border.default
if C.appearance.border.unitframes ~= "-1" then
default_border = C.appearance.border.unitframes
end
-- build the frame
@@ -54,7 +54,7 @@ pfUI:RegisterModule("infight", function ()
end
end
if pfUI_config.appearance.infight.screen == "1" and pfUI.infight.screen then
if C.appearance.infight.screen == "1" and pfUI.infight.screen then
if UnitAffectingCombat("player") then
pfUI.infight.screen:Show()
pfUI.infight.screen:SetBackdropBorderColor(1,0.2+pfUI.infight.fadeValue, pfUI.infight.fadeValue, 1-pfUI.infight.fadeValue);
@@ -65,7 +65,7 @@ pfUI:RegisterModule("infight", function ()
end
end)
if pfUI_config.appearance.infight.screen == "1" then
if C.appearance.infight.screen == "1" then
pfUI.infight.screen = CreateFrame("Frame", "pfUICombatScreen", UIParent)
pfUI.infight.screen:SetFrameStrata("BACKGROUND")
pfUI.infight.screen:SetBackdrop(pfUI.infight.backdrop)
@@ -73,14 +73,14 @@ pfUI:RegisterModule("infight", function ()
pfUI.infight.screen:Hide()
end
if pfUI_config.appearance.infight.common == "1" then
if C.appearance.infight.common == "1" then
pfUI.infight:CreateGlow("player")
pfUI.infight:CreateGlow("target")
pfUI.infight:CreateGlow("targettarget")
pfUI.infight:CreateGlow("pet")
end
if pfUI_config.appearance.infight.group == "1" then
if C.appearance.infight.group == "1" then
for i=1,4 do
pfUI.infight:CreateGlow("party" .. i, _G["pfGroup" .. i])
end
+11 -11
View File
@@ -8,7 +8,7 @@ pfUI:RegisterModule("loot", function ()
pfUI.loot:RegisterEvent("OPEN_MASTER_LOOT_LIST")
pfUI.loot:RegisterEvent("UPDATE_MASTER_LOOT_LIST")
pfUI.loot:SetWidth(160+pfUI_config.appearance.border.default*2)
pfUI.loot:SetWidth(160+C.appearance.border.default*2)
pfUI.loot.slots = {}
function pfUI.loot:UpdateLootFrame()
local maxrarity, maxwidth = 0, 0
@@ -78,17 +78,17 @@ pfUI:RegisterModule("loot", function ()
pfUI.api:CreateBackdrop(pfUI.loot)
pfUI.loot.backdrop:SetBackdropBorderColor(color.r, color.g, color.b, 1)
end
pfUI.loot:SetHeight(math.max((real*22)+4*pfUI_config.appearance.border.default), 20)
pfUI.loot:SetWidth(maxwidth + 22 + 8*pfUI_config.appearance.border.default )
pfUI.loot:SetHeight(math.max((real*22)+4*C.appearance.border.default), 20)
pfUI.loot:SetWidth(maxwidth + 22 + 8*C.appearance.border.default )
end
end
function pfUI.loot:CreateSlot(id)
local frame = CreateFrame("LootButton", 'pfLootButton'..id, pfUI.loot)
frame:SetPoint("LEFT", pfUI_config.appearance.border.default*2, 0)
frame:SetPoint("RIGHT", -pfUI_config.appearance.border.default*2, 0)
frame:SetPoint("LEFT", C.appearance.border.default*2, 0)
frame:SetPoint("RIGHT", -C.appearance.border.default*2, 0)
frame:SetHeight(22)
frame:SetPoint("TOP", pfUI.loot, "TOP", 4, (-pfUI_config.appearance.border.default*2+22)-(id*22))
frame:SetPoint("TOP", pfUI.loot, "TOP", 4, (-C.appearance.border.default*2+22)-(id*22))
frame:SetScript("OnClick", function()
if ( IsControlKeyDown() ) then
@@ -126,15 +126,15 @@ pfUI:RegisterModule("loot", function ()
end
end)
if pfUI_config.appearance.loot.autoresize == "1" then
if C.appearance.loot.autoresize == "1" then
frame:SetScript("OnUpdate", function()
pfUI.loot:UpdateLootFrame()
end)
end
frame.ficon = CreateFrame("Frame", "pfLootButtonIcon", frame)
frame.ficon:SetHeight(frame:GetHeight() - 2*pfUI_config.appearance.border.default)
frame.ficon:SetWidth(frame:GetHeight() - 2*pfUI_config.appearance.border.default)
frame.ficon:SetHeight(frame:GetHeight() - 2*C.appearance.border.default)
frame.ficon:SetWidth(frame:GetHeight() - 2*C.appearance.border.default)
frame.ficon:ClearAllPoints()
frame.ficon:SetPoint("RIGHT", frame)
pfUI.api:CreateBackdrop(frame.ficon)
@@ -147,7 +147,7 @@ pfUI:RegisterModule("loot", function ()
frame.count:ClearAllPoints()
frame.count:SetJustifyH"RIGHT"
frame.count:SetPoint("BOTTOMRIGHT", frame.ficon, 2, 2)
frame.count:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.count:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.count:SetText(1)
frame.name = frame:CreateFontString(nil, "OVERLAY")
@@ -155,7 +155,7 @@ pfUI:RegisterModule("loot", function ()
frame.name:ClearAllPoints()
frame.name:SetAllPoints(frame)
frame.name:SetNonSpaceWrap(true)
frame.name:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
frame.name:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
frame.rarity = frame:CreateTexture(nil, "ARTWORK")
frame.rarity:SetTexture"Interface\\AddOns\\pfUI\\img\\bar"
+5 -5
View File
@@ -87,11 +87,11 @@ pfUI:RegisterModule("minimap", function ()
-- Create coordinates text frame in bottom left corner of minimap
pfUI.minimapCoordinates = CreateFrame("Frame", "pfMinimapCoord", pfUI.minimap)
pfUI.minimapCoordinates:SetPoint("BOTTOMLEFT", 3, 3)
pfUI.minimapCoordinates:SetHeight(pfUI_config.global.font_size)
pfUI.minimapCoordinates:SetHeight(C.global.font_size)
pfUI.minimapCoordinates:SetWidth(Minimap:GetWidth())
pfUI.minimapCoordinates:SetFrameStrata("BACKGROUND")
pfUI.minimapCoordinates.text = pfUI.minimapCoordinates:CreateFontString("MinimapCoordinatesText", "LOW", "GameFontNormal")
pfUI.minimapCoordinates.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.minimapCoordinates.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.minimapCoordinates.text:SetTextColor(1,1,1,1)
pfUI.minimapCoordinates.text:SetAllPoints(pfUI.minimapCoordinates)
pfUI.minimapCoordinates.text:SetJustifyH("LEFT")
@@ -100,11 +100,11 @@ pfUI:RegisterModule("minimap", function ()
-- Create zone text frame in top center of minimap
pfUI.minimapZone = CreateFrame("Frame", "pfMinimapZone", pfUI.minimap)
pfUI.minimapZone:SetPoint("TOP", 0, -3)
pfUI.minimapZone:SetHeight(pfUI_config.global.font_size + 2)
pfUI.minimapZone:SetHeight(C.global.font_size + 2)
pfUI.minimapZone:SetWidth(Minimap:GetWidth())
pfUI.minimapZone:SetFrameStrata("BACKGROUND")
pfUI.minimapZone.text = pfUI.minimapZone:CreateFontString("minimapZoneText", "LOW", "GameFontNormal")
pfUI.minimapZone.text:SetFont(pfUI.font_default, pfUI_config.global.font_size + 2, "OUTLINE")
pfUI.minimapZone.text:SetFont(pfUI.font_default, C.global.font_size + 2, "OUTLINE")
pfUI.minimapZone.text:SetAllPoints(pfUI.minimapZone)
pfUI.minimapZone.text:SetJustifyH("CENTER")
pfUI.minimapZone:Hide()
@@ -123,7 +123,7 @@ pfUI:RegisterModule("minimap", function ()
end
pfUI.minimapCoordinates:Show()
if pfUI_config.appearance.minimap.mouseoverzone == "1" then
if C.appearance.minimap.mouseoverzone == "1" then
local pvp, _, arena = GetZonePVPInfo()
if arena then
pfUI.minimapZone.text:SetTextColor(1.0, 0.1, 0.1)
+17 -17
View File
@@ -35,7 +35,7 @@ pfUI:RegisterModule("nameplates", function ()
glow:SetAlpha(0)
glow.Show = function() return end
if pfUI_config.nameplates.players == "1" then
if C.nameplates.players == "1" then
if not pfUI_playerDB[name:GetText()] or not pfUI_playerDB[name:GetText()]["class"] then
this:Hide()
end
@@ -44,7 +44,7 @@ pfUI:RegisterModule("nameplates", function ()
-- healthbar
healthbar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
healthbar:ClearAllPoints()
healthbar:SetPoint("TOP", this, "TOP", 0, tonumber(pfUI_config.nameplates.vpos))
healthbar:SetPoint("TOP", this, "TOP", 0, tonumber(C.nameplates.vpos))
healthbar:SetWidth(110)
healthbar:SetHeight(7)
@@ -61,8 +61,8 @@ pfUI:RegisterModule("nameplates", function ()
-- raidtarget
raidicon:ClearAllPoints()
raidicon:SetWidth(pfUI_config.nameplates.raidiconsize)
raidicon:SetHeight(pfUI_config.nameplates.raidiconsize)
raidicon:SetWidth(C.nameplates.raidiconsize)
raidicon:SetHeight(C.nameplates.raidiconsize)
raidicon:SetPoint("CENTER", healthbar, "CENTER", 0, -5)
-- adjust font
@@ -93,7 +93,7 @@ pfUI:RegisterModule("nameplates", function ()
end
function pfUI.nameplates:CreateDebuffs(frame)
if pfUI_config.nameplates["showdebuffs"] ~= "1" then return end
if C.nameplates["showdebuffs"] ~= "1" then return end
if frame.debuffs == nil then frame.debuffs = {} end
for j=1, 16, 1 do
@@ -115,7 +115,7 @@ pfUI:RegisterModule("nameplates", function ()
end
function pfUI.nameplates:CreateCastbar(healthbar)
if not pfUI.castbar or not pfUI_config.nameplates["showcastbar"] == "1" then return end
if not pfUI.castbar or not C.nameplates["showcastbar"] == "1" then return end
-- create frames
if healthbar.castbar == nil then
@@ -177,7 +177,7 @@ pfUI:RegisterModule("nameplates", function ()
end
function pfUI.nameplates:CreateHP(healthbar)
if pfUI_config.nameplates.showhp == "1" and not healthbar.hptext then
if C.nameplates.showhp == "1" and not healthbar.hptext then
healthbar.hptext = healthbar:CreateFontString("Status", "DIALOG", "GameFontNormal")
healthbar.hptext:SetPoint("RIGHT", healthbar, "RIGHT")
healthbar.hptext:SetNonSpaceWrap(false)
@@ -194,7 +194,7 @@ pfUI:RegisterModule("nameplates", function ()
local healthbar = this:GetChildren()
local border, glow, name, level, levelicon , raidicon = this:GetRegions()
if pfUI_config.nameplates.players == "1" then
if C.nameplates.players == "1" then
if not pfUI_playerDB[name:GetText()] or not pfUI_playerDB[name:GetText()]["class"] then
this:Hide()
end
@@ -276,7 +276,7 @@ pfUI:RegisterModule("nameplates", function ()
local name = name:GetText()
if healthbar.reaction == 0 then
if pfUI_config.nameplates["enemyclassc"] == "1"
if C.nameplates["enemyclassc"] == "1"
and pfUI_playerDB[name]
and pfUI_playerDB[name]["class"]
and RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]]
@@ -288,7 +288,7 @@ pfUI:RegisterModule("nameplates", function ()
0.9)
end
elseif healthbar.reaction == 2 then
if pfUI_config.nameplates["friendclassc"] == "1"
if C.nameplates["friendclassc"] == "1"
and pfUI_playerDB[name]
and pfUI_playerDB[name]["class"]
and RAID_CLASS_COLORS[pfUI_playerDB[name]["class"]]
@@ -306,7 +306,7 @@ pfUI:RegisterModule("nameplates", function ()
if not healthbar.castbar then return end
-- show castbar
if pfUI.castbar and pfUI_config.nameplates["showcastbar"] == "1" and pfUI.castbar.target.casterDB[name:GetText()] ~= nil and pfUI.castbar.target.casterDB[name:GetText()]["cast"] ~= nil then
if pfUI.castbar and C.nameplates["showcastbar"] == "1" and pfUI.castbar.target.casterDB[name:GetText()] ~= nil and pfUI.castbar.target.casterDB[name:GetText()]["cast"] ~= nil then
if pfUI.castbar.target.casterDB[name:GetText()]["starttime"] + pfUI.castbar.target.casterDB[name:GetText()]["casttime"] <= GetTime() then
pfUI.castbar.target.casterDB[name:GetText()] = nil
healthbar.castbar:Hide()
@@ -314,7 +314,7 @@ pfUI:RegisterModule("nameplates", function ()
healthbar.castbar:SetMinMaxValues(0, pfUI.castbar.target.casterDB[name:GetText()]["casttime"])
healthbar.castbar:SetValue(GetTime() - pfUI.castbar.target.casterDB[name:GetText()]["starttime"])
healthbar.castbar.text:SetText(pfUI.api.round( pfUI.castbar.target.casterDB[name:GetText()]["starttime"] + pfUI.castbar.target.casterDB[name:GetText()]["casttime"] - GetTime(),1))
if pfUI_config.nameplates.spellname == "1" and healthbar.castbar.spell then
if C.nameplates.spellname == "1" and healthbar.castbar.spell then
healthbar.castbar.spell:SetText(pfUI.castbar.target.casterDB[name:GetText()]["cast"])
else
healthbar.castbar.spell:SetText("")
@@ -338,7 +338,7 @@ pfUI:RegisterModule("nameplates", function ()
end
function pfUI.nameplates:UpdateDebuffs(frame, healthbar)
if not frame.debuffs or pfUI_config.nameplates["showdebuffs"] ~= "1" then return end
if not frame.debuffs or C.nameplates["showdebuffs"] ~= "1" then return end
if UnitExists("target") and healthbar:GetAlpha() == 1 then
local j = 1
@@ -360,7 +360,7 @@ pfUI:RegisterModule("nameplates", function ()
end
function pfUI.nameplates:UpdateHP(healthbar)
if pfUI_config.nameplates.showhp == "1" and healthbar.hptext then
if C.nameplates.showhp == "1" and healthbar.hptext then
local min, max = healthbar:GetMinMaxValues()
local cur = healthbar:GetValue()
healthbar.hptext:SetText(cur .. " / " .. max)
@@ -369,9 +369,9 @@ pfUI:RegisterModule("nameplates", function ()
function pfUI.nameplates:UpdateClickHandler(frame)
-- enable clickthrough
if pfUI_config.nameplates["clickthrough"] == "0" then
if C.nameplates["clickthrough"] == "0" then
frame:EnableMouse(true)
if pfUI_config.nameplates["rightclick"] == "1" then
if C.nameplates["rightclick"] == "1" then
frame:SetScript("OnMouseDown", function()
if arg1 and arg1 == "RightButton" then
MouselookStart()
@@ -426,7 +426,7 @@ pfUI:RegisterModule("nameplates", function ()
end
-- if threshold is reached (0.5 second) no click action will follow
if not IsMouselooking() and pfUI.nameplates.emulateRightClick.time + tonumber(pfUI_config.nameplates["clickthreshold"]) < GetTime() then
if not IsMouselooking() and pfUI.nameplates.emulateRightClick.time + tonumber(C.nameplates["clickthreshold"]) < GetTime() then
pfUI.nameplates.emulateRightClick:Hide()
return
end
+26 -26
View File
@@ -1,7 +1,7 @@
pfUI:RegisterModule("panel", function ()
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.panels ~= "-1" then
default_border = pfUI_config.appearance.border.panels
local default_border = C.appearance.border.default
if C.appearance.border.panels ~= "-1" then
default_border = C.appearance.border.panels
end
pfUI.panel = CreateFrame("Frame",nil,UIParent)
@@ -58,7 +58,7 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.clock.timerFrame.text = pfUI.panel.clock.timerFrame:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.panel.clock.timerFrame.text:SetFontObject(GameFontWhite)
pfUI.panel.clock.timerFrame.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.panel.clock.timerFrame.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.panel.clock.timerFrame.text:SetAllPoints(pfUI.panel.clock.timerFrame)
pfUI.panel.clock.timerFrame:SetScript("OnUpdate", function()
@@ -82,7 +82,7 @@ pfUI:RegisterModule("panel", function ()
local noon = " AM"
local servertime
local time
if pfUI_config.global.twentyfour == "0" then
if C.global.twentyfour == "0" then
if h > 12 then
h = h - 12
noon = " PM"
@@ -116,7 +116,7 @@ pfUI:RegisterModule("panel", function ()
end
pfUI.panel.clock.tick = GetTime()
if pfUI_config.global.twentyfour == "0" then
if C.global.twentyfour == "0" then
pfUI.panel:OutputPanel("time", date("%I:%M:%S %p"), tooltip, click)
else
pfUI.panel:OutputPanel("time", date("%H:%M:%S"), tooltip, click)
@@ -371,13 +371,13 @@ pfUI:RegisterModule("panel", function ()
if not pfUI.panel.minimap then return end
local panels = {
{ pfUI.panel.left.left, pfUI_config.panel.left.left },
{ pfUI.panel.left.center, pfUI_config.panel.left.center },
{ pfUI.panel.left.right, pfUI_config.panel.left.right },
{ pfUI.panel.right.left, pfUI_config.panel.right.left },
{ pfUI.panel.right.center, pfUI_config.panel.right.center },
{ pfUI.panel.right.right, pfUI_config.panel.right.right },
{ pfUI.panel.minimap, pfUI_config.panel.other.minimap },
{ pfUI.panel.left.left, C.panel.left.left },
{ pfUI.panel.left.center, C.panel.left.center },
{ pfUI.panel.left.right, C.panel.left.right },
{ pfUI.panel.right.left, C.panel.right.left },
{ pfUI.panel.right.center, C.panel.right.center },
{ pfUI.panel.right.right, C.panel.right.right },
{ pfUI.panel.minimap, C.panel.other.minimap },
}
for i,p in pairs(panels) do
@@ -411,11 +411,11 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.left:SetPoint("BOTTOMLEFT", pfUI.chat.left, "BOTTOMLEFT", 2, 2)
pfUI.panel.left:SetPoint("BOTTOMRIGHT", pfUI.chat.left, "BOTTOMRIGHT", -2, 2)
else
pfUI.panel.left:SetWidth(pfUI_config.chat.left.width)
pfUI.panel.left:SetWidth(C.chat.left.width)
pfUI.panel.left:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 5, 5)
end
pfUI.panel.left:SetHeight(pfUI_config.global.font_size+default_border*2)
pfUI.panel.left:SetHeight(C.global.font_size+default_border*2)
pfUI.api:CreateBackdrop(pfUI.panel.left, default_border, nil)
pfUI.panel.left.hide = CreateFrame("Button", nil, pfUI.panel.left)
@@ -440,7 +440,7 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.left.left:SetHeight(pfUI.panel.left:GetHeight())
pfUI.panel.left.left:SetPoint("LEFT", 0, 0)
pfUI.panel.left.left.text = pfUI.panel.left.left:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.panel.left.left.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.panel.left.left.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.panel.left.left.text:ClearAllPoints()
pfUI.panel.left.left.text:SetAllPoints(pfUI.panel.left.left)
pfUI.panel.left.left.text:SetPoint("CENTER", 0, 0)
@@ -452,7 +452,7 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.left.center:SetHeight(pfUI.panel.left:GetHeight())
pfUI.panel.left.center:SetPoint("CENTER", 0, 0)
pfUI.panel.left.center.text = pfUI.panel.left.center:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.panel.left.center.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.panel.left.center.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.panel.left.center.text:ClearAllPoints()
pfUI.panel.left.center.text:SetAllPoints(pfUI.panel.left.center)
pfUI.panel.left.center.text:SetPoint("CENTER", 0, 0)
@@ -464,7 +464,7 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.left.right:SetHeight(pfUI.panel.left:GetHeight())
pfUI.panel.left.right:SetPoint("RIGHT", 0, 0)
pfUI.panel.left.right.text = pfUI.panel.left.right:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.panel.left.right.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.panel.left.right.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.panel.left.right.text:ClearAllPoints()
pfUI.panel.left.right.text:SetAllPoints(pfUI.panel.left.right)
pfUI.panel.left.right.text:SetPoint("CENTER", 0, 0)
@@ -478,10 +478,10 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.right:SetPoint("BOTTOMLEFT", pfUI.chat.right, "BOTTOMLEFT", 2, 2)
pfUI.panel.right:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", -2, 2)
else
pfUI.panel.right:SetWidth(pfUI_config.chat.right.width)
pfUI.panel.right:SetWidth(C.chat.right.width)
pfUI.panel.right:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -5, 5)
end
pfUI.panel.right:SetHeight(pfUI_config.global.font_size+default_border*2)
pfUI.panel.right:SetHeight(C.global.font_size+default_border*2)
pfUI.api:CreateBackdrop(pfUI.panel.right, default_border, nil)
pfUI.panel.right.hide = CreateFrame("Button", nil, pfUI.panel.right)
@@ -506,7 +506,7 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.right.left:SetHeight(pfUI.panel.right:GetHeight())
pfUI.panel.right.left:SetPoint("LEFT", 0, 0)
pfUI.panel.right.left.text = pfUI.panel.right.left:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.panel.right.left.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.panel.right.left.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.panel.right.left.text:ClearAllPoints()
pfUI.panel.right.left.text:SetAllPoints(pfUI.panel.right.left)
pfUI.panel.right.left.text:SetPoint("CENTER", 0, 0)
@@ -518,7 +518,7 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.right.center:SetHeight(pfUI.panel.right:GetHeight())
pfUI.panel.right.center:SetPoint("CENTER", 0, 0)
pfUI.panel.right.center.text = pfUI.panel.right.center:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.panel.right.center.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.panel.right.center.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.panel.right.center.text:ClearAllPoints()
pfUI.panel.right.center.text:SetAllPoints(pfUI.panel.right.center)
pfUI.panel.right.center.text:SetPoint("CENTER", 0, 0)
@@ -530,7 +530,7 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.right.right:SetHeight(pfUI.panel.right:GetHeight())
pfUI.panel.right.right:SetPoint("RIGHT", 0, 0)
pfUI.panel.right.right.text = pfUI.panel.right.right:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.panel.right.right.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.panel.right.right.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.panel.right.right.text:ClearAllPoints()
pfUI.panel.right.right.text:SetAllPoints(pfUI.panel.right.right)
pfUI.panel.right.right.text:SetPoint("CENTER", 0, 0)
@@ -539,7 +539,7 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel.minimap = CreateFrame("Button", "pfPanelMinimap", UIParent)
pfUI.api:CreateBackdrop(pfUI.panel.minimap, default_border)
pfUI.api:UpdateMovable(pfUI.panel.minimap)
pfUI.panel.minimap:SetHeight(pfUI_config.global.font_size+default_border*2)
pfUI.panel.minimap:SetHeight(C.global.font_size+default_border*2)
if pfUI.minimap then
pfUI.panel.minimap:SetPoint("TOP", pfUI.minimap, "BOTTOM", 0 , -default_border*3)
pfUI.panel.minimap:SetWidth(pfUI.minimap:GetWidth())
@@ -549,12 +549,12 @@ pfUI:RegisterModule("panel", function ()
end
pfUI.panel.minimap:SetFrameStrata("BACKGROUND")
pfUI.panel.minimap.text = pfUI.panel.minimap:CreateFontString("MinimapZoneText", "LOW", "GameFontNormal")
pfUI.panel.minimap.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.panel.minimap.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.panel.minimap.text:SetPoint("CENTER", 0, 0)
pfUI.panel.minimap.text:SetFontObject(GameFontWhite)
-- MicroButtons
if pfUI_config.panel.micro.enable == "1" then
if C.panel.micro.enable == "1" then
pfUI.panel.microbutton = CreateFrame("Frame", "pfPanelMicroButton", UIParent)
pfUI.panel.microbutton:SetPoint("TOP", pfUI.panel.minimap, "BOTTOM", 0, -2*default_border)
pfUI.api:UpdateMovable(pfUI.panel.microbutton)
+16 -16
View File
@@ -1,13 +1,13 @@
pfUI:RegisterModule("pet", function ()
-- do not go further on disabled UFs
if pfUI_config.unitframes.disable == "1" then return end
if C.unitframes.disable == "1" then return end
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.unitframes ~= "-1" then
default_border = pfUI_config.appearance.border.unitframes
local default_border = C.appearance.border.default
if C.appearance.border.unitframes ~= "-1" then
default_border = C.appearance.border.unitframes
end
local spacing = pfUI_config.unitframes.pet.pspace
local spacing = C.unitframes.pet.pspace
pfUI.uf.pet = CreateFrame("Button","pfPet",UIParent)
pfUI.uf.pet.label = "pet"
@@ -86,14 +86,14 @@ pfUI:RegisterModule("pet", function ()
end
local r, g, b = .2, .2, .2
if pfUI_config.unitframes.pastel == "1" then
if C.unitframes.pastel == "1" then
r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else
r, g, b = color.r, color.g, color.b
end
if pfUI_config.unitframes.custom == "1" then
local cr, cg, cb, ca = pfUI.api.strsplit(",", pfUI_config.unitframes.customcolor)
if C.unitframes.custom == "1" then
local cr, cg, cb, ca = pfUI.api.strsplit(",", C.unitframes.customcolor)
pfUI.uf.pet.hp.bar:SetStatusBarColor(tonumber(cr), tonumber(cg), tonumber(cb), hp / hpmax / 4 + .75)
else
pfUI.uf.pet.hp.bar:SetStatusBarColor(r, g, b, hp / hpmax / 4 + .75)
@@ -118,9 +118,9 @@ pfUI:RegisterModule("pet", function ()
local hpDiff = abs(hpReal - hpDisplay)
if hpDisplay < hpReal then
pfUI.uf.pet.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.pet.hp.bar:SetValue(hpDisplay + ceil(hpDiff / C.unitframes.animation_speed))
elseif hpDisplay > hpReal then
pfUI.uf.pet.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.pet.hp.bar:SetValue(hpDisplay - ceil(hpDiff / C.unitframes.animation_speed))
else
pfUI.uf.pet.hp.bar:SetValue(hpReal)
end
@@ -131,9 +131,9 @@ pfUI:RegisterModule("pet", function ()
local powerDiff = abs(powerReal - powerDisplay)
if powerDisplay < powerReal then
pfUI.uf.pet.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.pet.power.bar:SetValue(powerDisplay + ceil(powerDiff / C.unitframes.animation_speed))
elseif powerDisplay > powerReal then
pfUI.uf.pet.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.pet.power.bar:SetValue(powerDisplay - ceil(powerDiff / C.unitframes.animation_speed))
else
pfUI.uf.pet.power.bar:SetValue(powerReal)
end
@@ -172,10 +172,10 @@ pfUI:RegisterModule("pet", function ()
pfUI.uf.pet.power.bar:SetAllPoints(pfUI.uf.pet.power)
pfUI.uf.pet.power.bar:SetMinMaxValues(0, 100)
pfUI.uf:CreatePortrait(pfUI.uf.pet, pfUI_config.unitframes.pet.portrait, spacing)
pfUI.uf:CreatePortrait(pfUI.uf.pet, C.unitframes.pet.portrait, spacing)
pfUI.uf.pet.hp.text = pfUI.uf.pet.hp.bar:CreateFontString("Status", "OVERLAY", "GameFontNormal")
pfUI.uf.pet.hp.text:SetFont(pfUI.font_square, pfUI_config.global.font_size - 2, "OUTLINE")
pfUI.uf.pet.hp.text:SetFont(pfUI.font_square, C.global.font_size - 2, "OUTLINE")
pfUI.uf.pet.hp.text:ClearAllPoints()
pfUI.uf.pet.hp.text:SetAllPoints(pfUI.uf.pet.hp.bar)
pfUI.uf.pet.hp.text:SetPoint("CENTER", 0, 0)
@@ -201,7 +201,7 @@ pfUI:RegisterModule("pet", function ()
pfUI.uf.pet.buff.buffs[i] = CreateFrame("Button", "pfUITargetBuff" .. i, pfUI.uf.pet)
pfUI.uf.pet.buff.buffs[i].stacks = pfUI.uf.pet.buff.buffs[i]:CreateFontString(nil, "OVERLAY", pfUI.uf.pet.buff.buffs[i])
pfUI.uf.pet.buff.buffs[i].stacks:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.pet.buff.buffs[i].stacks:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.pet.buff.buffs[i].stacks:SetPoint("BOTTOMRIGHT", pfUI.uf.pet.buff.buffs[i], 2, -2)
pfUI.uf.pet.buff.buffs[i].stacks:SetJustifyH("LEFT")
pfUI.uf.pet.buff.buffs[i].stacks:SetShadowColor(0, 0, 0)
@@ -264,7 +264,7 @@ pfUI:RegisterModule("pet", function ()
pfUI.uf.pet.debuff.debuffs[i] = CreateFrame("Button", "pfUITargetDebuff" .. i, pfUI.uf.pet)
pfUI.uf.pet.debuff.debuffs[i].stacks = pfUI.uf.pet.debuff.debuffs[i]:CreateFontString(nil, "OVERLAY", pfUI.uf.pet.debuff.debuffs[i])
pfUI.uf.pet.debuff.debuffs[i].stacks:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.pet.debuff.debuffs[i].stacks:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.pet.debuff.debuffs[i].stacks:SetPoint("BOTTOMRIGHT", pfUI.uf.pet.debuff.debuffs[i], 2, -2)
pfUI.uf.pet.debuff.debuffs[i].stacks:SetJustifyH("LEFT")
pfUI.uf.pet.debuff.debuffs[i].stacks:SetShadowColor(0, 0, 0)
+1 -1
View File
@@ -1,5 +1,5 @@
pfUI:RegisterModule("pixelperfect", function ()
if pfUI_config.global.pixelperfect == "1" then
if C.global.pixelperfect == "1" then
local resolution = GetCVar("gxResolution")
for screenwidth, screenheight in string.gfind(resolution, "(.+)x(.+)") do
local scale = (min(2, max(.64, 768/screenheight)))
+46 -46
View File
@@ -1,13 +1,13 @@
pfUI:RegisterModule("player", function ()
-- do not go further on disabled UFs
if pfUI_config.unitframes.disable == "1" then return end
if C.unitframes.disable == "1" then return end
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.unitframes ~= "-1" then
default_border = pfUI_config.appearance.border.unitframes
local default_border = C.appearance.border.default
if C.appearance.border.unitframes ~= "-1" then
default_border = C.appearance.border.unitframes
end
local spacing = pfUI_config.unitframes.player.pspace
local spacing = C.unitframes.player.pspace
PlayerFrame:Hide()
PlayerFrame:UnregisterAllEvents()
@@ -16,8 +16,8 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.label = "player"
pfUI.uf.player.id = ""
pfUI.uf.player:SetFrameStrata("LOW")
pfUI.uf.player:SetWidth(pfUI_config.unitframes.player.width)
pfUI.uf.player:SetHeight(pfUI_config.unitframes.player.height + pfUI_config.unitframes.player.pheight + 2*default_border + spacing)
pfUI.uf.player:SetWidth(C.unitframes.player.width)
pfUI.uf.player:SetHeight(C.unitframes.player.height + C.unitframes.player.pheight + 2*default_border + spacing)
pfUI.uf.player:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOM", -75, 125)
pfUI.api:UpdateMovable(pfUI.uf.player)
pfUI.uf.player:RegisterForClicks('LeftButtonUp', 'RightButtonUp', 'MiddleButtonUp', 'Button4Up', 'Button5Up')
@@ -66,7 +66,7 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player:SetScript("OnEvent", function()
if event == "UPDATE_FACTION" or event == "UNIT_FACTION" then
if pfUI_config.unitframes.player.showPVP == "1" and UnitIsPVP("player") then
if C.unitframes.player.showPVP == "1" and UnitIsPVP("player") then
if pfUI.uf.player.pvpicon == nil then
pfUI.uf.player.pvpicon = CreateFrame("Frame", "pfPvPIcon", UIParent)
pfUI.uf.player.pvpicon:SetFrameStrata("HIGH")
@@ -75,7 +75,7 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.pvpicon.texture:SetAllPoints(pfUI.uf.player.pvpicon)
end
if pfUI_config.unitframes.player.showPVPMinimap == "1" then
if C.unitframes.player.showPVPMinimap == "1" then
pfUI.uf.player.pvpicon:SetWidth(16)
pfUI.uf.player.pvpicon:SetHeight(16)
pfUI.uf.player.pvpicon:SetParent(pfUI.minimap)
@@ -134,10 +134,10 @@ pfUI:RegisterModule("player", function ()
local color = RAID_CLASS_COLORS[class]
local cr, cg, cb
if pfUI_config.unitframes.custom == "1" then
local r, g, b, a = pfUI.api.strsplit(",", pfUI_config.unitframes.customcolor)
if C.unitframes.custom == "1" then
local r, g, b, a = pfUI.api.strsplit(",", C.unitframes.customcolor)
cr, cg, cb = tonumber(r), tonumber(g), tonumber(b)
elseif pfUI_config.unitframes.pastel == "1" then
elseif C.unitframes.pastel == "1" then
cr, cg, cb = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else
cr, cg, cb = color.r, color.g, color.b
@@ -182,9 +182,9 @@ pfUI:RegisterModule("player", function ()
local hpDiff = abs(hpReal - hpDisplay)
if hpDisplay < hpReal then
pfUI.uf.player.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.player.hp.bar:SetValue(hpDisplay + ceil(hpDiff / C.unitframes.animation_speed))
elseif hpDisplay > hpReal then
pfUI.uf.player.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.player.hp.bar:SetValue(hpDisplay - ceil(hpDiff / C.unitframes.animation_speed))
elseif hpDisplay ~= hpReal then
pfUI.uf.player.hp.bar:SetValue(hpReal)
end
@@ -194,9 +194,9 @@ pfUI:RegisterModule("player", function ()
local powerDiff = abs(powerReal - powerDisplay)
if powerDisplay < powerReal then
pfUI.uf.player.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.player.power.bar:SetValue(powerDisplay + ceil(powerDiff / C.unitframes.animation_speed))
elseif powerDisplay > powerReal then
pfUI.uf.player.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.player.power.bar:SetValue(powerDisplay - ceil(powerDiff / C.unitframes.animation_speed))
else
pfUI.uf.player.power.bar:SetValue(powerReal)
end
@@ -204,8 +204,8 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.hp = CreateFrame("Frame",nil, pfUI.uf.player)
pfUI.uf.player.hp:SetPoint("TOP", 0, 0)
pfUI.uf.player.hp:SetWidth(pfUI_config.unitframes.player.width)
pfUI.uf.player.hp:SetHeight(pfUI_config.unitframes.player.height)
pfUI.uf.player.hp:SetWidth(C.unitframes.player.width)
pfUI.uf.player.hp:SetHeight(C.unitframes.player.height)
pfUI.api:CreateBackdrop(pfUI.uf.player.hp, default_border)
pfUI.uf.player.hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.player.hp)
@@ -242,8 +242,8 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.power = CreateFrame("Frame",nil, pfUI.uf.player)
pfUI.uf.player.power:SetPoint("BOTTOM", 0, 0)
pfUI.uf.player.power:SetWidth(pfUI_config.unitframes.player.width)
pfUI.uf.player.power:SetHeight(pfUI_config.unitframes.player.pheight)
pfUI.uf.player.power:SetWidth(C.unitframes.player.width)
pfUI.uf.player.power:SetHeight(C.unitframes.player.pheight)
pfUI.api:CreateBackdrop(pfUI.uf.player.power, default_border)
pfUI.uf.player.power.bar = CreateFrame("StatusBar", nil, pfUI.uf.player.power)
@@ -251,9 +251,9 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.power.bar:SetAllPoints(pfUI.uf.player.power)
pfUI.uf.player.power.bar:SetMinMaxValues(0, 100)
pfUI.uf:CreatePortrait(pfUI.uf.player, pfUI_config.unitframes.player.portrait, spacing)
pfUI.uf:CreatePortrait(pfUI.uf.player, C.unitframes.player.portrait, spacing)
if pfUI_config.unitframes.player.energy == "1" then
if C.unitframes.player.energy == "1" then
pfUI.uf.player.power.tick = CreateFrame("Frame", nil, pfUI.uf.player.power.bar)
pfUI.uf.player.power.tick:RegisterEvent("PLAYER_ENTERING_WORLD")
pfUI.uf.player.power.tick:RegisterEvent("UNIT_DISPLAYPOWER")
@@ -271,8 +271,8 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.power.tick.spark = pfUI.uf.player.power.bar:CreateTexture(nil, 'OVERLAY')
pfUI.uf.player.power.tick.spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
pfUI.uf.player.power.tick.spark:SetHeight(pfUI_config.unitframes.player.pheight + 15)
pfUI.uf.player.power.tick.spark:SetWidth(pfUI_config.unitframes.player.pheight + 5)
pfUI.uf.player.power.tick.spark:SetHeight(C.unitframes.player.pheight + 15)
pfUI.uf.player.power.tick.spark:SetWidth(C.unitframes.player.pheight + 5)
pfUI.uf.player.power.tick.spark:SetBlendMode('ADD')
pfUI.uf.player.power.tick:SetScript("OnUpdate", function()
@@ -285,21 +285,21 @@ pfUI:RegisterModule("player", function ()
this.energy = UnitMana("player")
local value = pfUI.api.round((GetTime() - this.lastTick) * 100)
local pos = pfUI_config.unitframes.player.width / 200 * value
if not pfUI_config.unitframes.player.pheight then return end
this.spark:SetPoint("LEFT", pos-((pfUI_config.unitframes.player.pheight+5)/2), 0)
local pos = C.unitframes.player.width / 200 * value
if not C.unitframes.player.pheight then return end
this.spark:SetPoint("LEFT", pos-((C.unitframes.player.pheight+5)/2), 0)
end)
end
pfUI.uf.player.hpText = pfUI.uf.player:CreateFontString("Status", "OVERLAY", "GameFontNormal")
pfUI.uf.player.hpText:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.player.hpText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.player.hpText:ClearAllPoints()
pfUI.uf.player.hpText:SetJustifyH("RIGHT")
pfUI.uf.player.hpText:SetFontObject(GameFontWhite)
pfUI.uf.player.hpText:SetText("5000")
pfUI.uf.player.powerText = pfUI.uf.player:CreateFontString("Status", "OVERLAY", "GameFontNormal")
pfUI.uf.player.powerText:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.player.powerText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.player.powerText:ClearAllPoints()
pfUI.uf.player.powerText:SetJustifyH("LEFT")
pfUI.uf.player.powerText:SetFontObject(GameFontWhite)
@@ -326,14 +326,14 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.buff.buffs[i]:SetID(i)
pfUI.uf.player.buff.buffs[i].stacks = pfUI.uf.player.buff.buffs[i]:CreateFontString(nil, "OVERLAY", pfUI.uf.player.buff.buffs[i])
pfUI.uf.player.buff.buffs[i].stacks:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.player.buff.buffs[i].stacks:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.player.buff.buffs[i].stacks:SetPoint("BOTTOMRIGHT", pfUI.uf.player.buff.buffs[i], 2, -2)
pfUI.uf.player.buff.buffs[i].stacks:SetJustifyH("LEFT")
pfUI.uf.player.buff.buffs[i].stacks:SetShadowColor(0, 0, 0)
pfUI.uf.player.buff.buffs[i].stacks:SetShadowOffset(0.8, -0.8)
pfUI.uf.player.buff.buffs[i].stacks:SetTextColor(1,1,.5)
pfUI.uf.player.buff.buffs[i].cd = pfUI.uf.player.buff.buffs[i]:CreateFontString(nil, "OVERLAY", pfUI.uf.player.buff.buffs[i])
pfUI.uf.player.buff.buffs[i].cd:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.player.buff.buffs[i].cd:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.player.buff.buffs[i].cd:SetPoint("CENTER", pfUI.uf.player.buff.buffs[i], 0, 0)
pfUI.uf.player.buff.buffs[i].cd:SetJustifyH("LEFT")
pfUI.uf.player.buff.buffs[i].cd:SetShadowColor(0, 0, 0)
@@ -344,11 +344,11 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.buff.buffs[i]:ClearAllPoints()
local invert, af, as
if pfUI_config.unitframes.player.buffs == "top" then
if C.unitframes.player.buffs == "top" then
invert = 1
af = "BOTTOMLEFT"
as = "TOPLEFT"
elseif pfUI_config.unitframes.player.buffs == "bottom" then
elseif C.unitframes.player.buffs == "bottom" then
invert = -1
af = "TOPLEFT"
as = "BOTTOMLEFT"
@@ -364,10 +364,10 @@ pfUI:RegisterModule("player", function ()
end
pfUI.uf.player.buff.buffs[i]:SetPoint(af, pfUI.uf.player, as,
(i-1-8*row)*((2*default_border) + pfUI_config.unitframes.buff_size + 1),
invert * (row)*((2*default_border) + pfUI_config.unitframes.buff_size + 1) + invert*(2*default_border + 1))
pfUI.uf.player.buff.buffs[i]:SetWidth(pfUI_config.unitframes.buff_size)
pfUI.uf.player.buff.buffs[i]:SetHeight(pfUI_config.unitframes.buff_size)
(i-1-8*row)*((2*default_border) + C.unitframes.buff_size + 1),
invert * (row)*((2*default_border) + C.unitframes.buff_size + 1) + invert*(2*default_border + 1))
pfUI.uf.player.buff.buffs[i]:SetWidth(C.unitframes.buff_size)
pfUI.uf.player.buff.buffs[i]:SetHeight(C.unitframes.buff_size)
pfUI.uf.player.buff.buffs[i]:SetScript("OnEnter", function()
GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT")
GameTooltip:SetPlayerBuff(GetPlayerBuff(id-1,"HELPFUL"))
@@ -437,14 +437,14 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.debuff.debuffs[i] = CreateFrame("Button", "pfUIPlayerDebuff" .. i, pfUI.uf.player)
pfUI.uf.player.debuff.debuffs[i]:SetID(i)
pfUI.uf.player.debuff.debuffs[i].stacks = pfUI.uf.player.debuff.debuffs[i]:CreateFontString(nil, "OVERLAY", pfUI.uf.player.debuff.debuffs[i])
pfUI.uf.player.debuff.debuffs[i].stacks:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.player.debuff.debuffs[i].stacks:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.player.debuff.debuffs[i].stacks:SetPoint("BOTTOMRIGHT", pfUI.uf.player.debuff.debuffs[i], 2, -2)
pfUI.uf.player.debuff.debuffs[i].stacks:SetJustifyH("LEFT")
pfUI.uf.player.debuff.debuffs[i].stacks:SetShadowColor(0, 0, 0)
pfUI.uf.player.debuff.debuffs[i].stacks:SetShadowOffset(0.8, -0.8)
pfUI.uf.player.debuff.debuffs[i].stacks:SetTextColor(1,1,.5)
pfUI.uf.player.debuff.debuffs[i].cd = pfUI.uf.player.debuff.debuffs[i]:CreateFontString(nil, "OVERLAY", pfUI.uf.player.debuff.debuffs[i])
pfUI.uf.player.debuff.debuffs[i].cd:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.player.debuff.debuffs[i].cd:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.player.debuff.debuffs[i].cd:SetPoint("CENTER", pfUI.uf.player.debuff.debuffs[i], 0, 0)
pfUI.uf.player.debuff.debuffs[i].cd:SetJustifyH("LEFT")
pfUI.uf.player.debuff.debuffs[i].cd:SetShadowColor(0, 0, 0)
@@ -453,8 +453,8 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
pfUI.uf.player.debuff.debuffs[i]:ClearAllPoints()
pfUI.uf.player.debuff.debuffs[i]:SetWidth(pfUI_config.unitframes.debuff_size)
pfUI.uf.player.debuff.debuffs[i]:SetHeight(pfUI_config.unitframes.debuff_size)
pfUI.uf.player.debuff.debuffs[i]:SetWidth(C.unitframes.debuff_size)
pfUI.uf.player.debuff.debuffs[i]:SetHeight(C.unitframes.debuff_size)
pfUI.uf.player.debuff.debuffs[i]:SetNormalTexture(nil)
pfUI.uf.player.debuff.debuffs[i]:SetScript("OnEnter", function()
GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT")
@@ -503,11 +503,11 @@ pfUI:RegisterModule("player", function ()
local invert, af, as
if pfUI_config.unitframes.player.buffs == "top" then
if C.unitframes.player.buffs == "top" then
invert = 1
af = "BOTTOMLEFT"
as = "TOPLEFT"
elseif pfUI_config.unitframes.player.buffs == "bottom" then
elseif C.unitframes.player.buffs == "bottom" then
invert = -1
af = "TOPLEFT"
as = "BOTTOMLEFT"
@@ -523,9 +523,9 @@ pfUI:RegisterModule("player", function ()
end
pfUI.uf.player.debuff.debuffs[i]:SetPoint(af, pfUI.uf.player, as,
(i-1-8*row)*((2*default_border) + pfUI_config.unitframes.debuff_size + 1),
invert * (top)*((2*default_border) + pfUI_config.unitframes.buff_size + 1) +
invert * (row)*((2*default_border) + pfUI_config.unitframes.debuff_size + 1) + invert*(2*default_border + 1))
(i-1-8*row)*((2*default_border) + C.unitframes.debuff_size + 1),
invert * (top)*((2*default_border) + C.unitframes.buff_size + 1) +
invert * (row)*((2*default_border) + C.unitframes.debuff_size + 1) + invert*(2*default_border + 1))
local bid = GetPlayerBuff(i-1, "HARMFUL");
local stacks = GetPlayerBuffApplications(bid)
+7 -7
View File
@@ -1,10 +1,10 @@
pfUI:RegisterModule("raid", function ()
-- do not go further on disabled UFs
if pfUI_config.unitframes.disable == "1" then return end
if C.unitframes.disable == "1" then return end
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.raidframes ~= "-1" then
default_border = pfUI_config.appearance.border.raidframes
local default_border = C.appearance.border.default
if C.appearance.border.raidframes ~= "-1" then
default_border = C.appearance.border.raidframes
end
pfUI.uf.raid = CreateFrame("Button","pfRaid",UIParent)
@@ -42,8 +42,8 @@ pfUI:RegisterModule("raid", function ()
pfUI.uf.raid[i] = CreateFrame("Button","pfRaid" .. i,UIParent)
pfUI.uf.raid[i]:SetWidth(50)
pfUI.uf.raid[i]:SetHeight(30 + 2*default_border + pfUI_config.unitframes.raid.pspace)
pfUI.uf.raid[i]:SetPoint("BOTTOMLEFT", (r-1) * (54+default_border) + 5, pfUI_config.chat.left.height + 10 + ((g-1)*(37+default_border))+default_border)
pfUI.uf.raid[i]:SetHeight(30 + 2*default_border + C.unitframes.raid.pspace)
pfUI.uf.raid[i]:SetPoint("BOTTOMLEFT", (r-1) * (54+default_border) + 5, C.chat.left.height + 10 + ((g-1)*(37+default_border))+default_border)
pfUI.api:UpdateMovable(pfUI.uf.raid[i])
pfUI.uf.raid[i]:Hide()
pfUI.uf.raid[i].id = 0
@@ -71,7 +71,7 @@ pfUI:RegisterModule("raid", function ()
pfUI.uf.raid[i].power.bar:SetMinMaxValues(0, 100)
pfUI.uf.raid[i].caption = pfUI.uf.raid[i]:CreateFontString("Status", "HIGH", "GameFontNormal")
pfUI.uf.raid[i].caption:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.raid[i].caption:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.raid[i].caption:SetAllPoints(pfUI.uf.raid[i].hp.bar)
pfUI.uf.raid[i].caption:ClearAllPoints()
pfUI.uf.raid[i].caption:SetParent(pfUI.uf.raid[i].hp.bar)
+4 -4
View File
@@ -4,7 +4,7 @@ pfUI:RegisterModule("roll", function ()
function pfUI.roll:CreateLootRoll(id)
local size = 24
local border = tonumber(pfUI_config.appearance.border.default)
local border = tonumber(C.appearance.border.default)
local esize = size - border*2
local f = CreateFrame("Frame", "pfLootRollFrame" .. id, UIParent)
pfUI.api:CreateBackdrop(f, nil, nil, .8)
@@ -101,7 +101,7 @@ pfUI:RegisterModule("roll", function ()
f.boe.text = f.boe:CreateFontString("BOE")
f.boe.text:SetAllPoints(f.boe)
f.boe.text:SetJustifyH("LEFT")
f.boe.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
f.boe.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
f.name = CreateFrame("Frame", "pfLootRollFrame" .. id .. "Name", f)
f.name:SetPoint("LEFT", f.icon, "RIGHT", border*11+esize*4, 0)
@@ -110,7 +110,7 @@ pfUI:RegisterModule("roll", function ()
f.name.text = f.name:CreateFontString("NAME")
f.name.text:SetAllPoints(f.name)
f.name.text:SetJustifyH("LEFT")
f.name.text:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
f.name.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
f.time = CreateFrame("Frame", "pfLootRollFrame" .. id .. "Time", f)
f.time:SetPoint("TOPLEFT", f, "TOPLEFT", 0, 0)
@@ -120,7 +120,7 @@ pfUI:RegisterModule("roll", function ()
f.time.bar:SetAllPoints(f.time)
f.time.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
f.time.bar:SetMinMaxValues(0, 100)
local r, g, b, a = pfUI.api.strsplit(",", pfUI_config.appearance.border.color)
local r, g, b, a = pfUI.api.strsplit(",", C.appearance.border.color)
f.time.bar:SetStatusBarColor(r, g, b)
f.time.bar:SetValue(20)
f.time.bar:SetScript("OnUpdate", function()
+1 -1
View File
@@ -22,7 +22,7 @@ pfUI:RegisterModule("sellvalue", function ()
if sell > 0 then SetTooltipMoney(GameTooltip, sell * count) end
end
if IsShiftKeyDown() or pfUI_config.tooltip.vendor.showalways == "1" then
if IsShiftKeyDown() or C.tooltip.vendor.showalways == "1" then
GameTooltip:AddLine(" ")
if count > 1 then
+6 -6
View File
@@ -56,25 +56,25 @@ pfUI:RegisterModule("skin", function ()
if v.SetTextColor then
v:SetTextColor(1,1,1,1)
v:SetPoint("TOP", GameMenuFrame, "TOP", 0, 16)
v:SetFont(pfUI.font_default, pfUI_config.global.font_size + 2, "OUTLINE")
v:SetFont(pfUI.font_default, C.global.font_size + 2, "OUTLINE")
end
end
local alpha = tonumber(pfUI_config.tooltip.alpha)
local alpha = tonumber(C.tooltip.alpha)
pfUI.api:CreateBackdrop(ShoppingTooltip1, nil, nil, alpha)
pfUI.api:CreateBackdrop(ShoppingTooltip2, nil, nil, alpha)
pfUI.api:CreateBackdrop(ItemRefTooltip, nil, nil, alpha)
ShoppingTooltip1:SetScript("OnShow", function()
local a, b, c, d, e = this:GetPoint()
local border = tonumber(pfUI_config.appearance.border.default)
local border = tonumber(C.appearance.border.default)
if d and d == 0 then d = (border*2)+d+1 end
this:SetPoint(a, b, c, d, e)
end)
ShoppingTooltip2:SetScript("OnShow", function()
local a, b, c, d, e = this:GetPoint()
local border = tonumber(pfUI_config.appearance.border.default)
local border = tonumber(C.appearance.border.default)
if not d or d == 0 then d = (border*2)+d+1 end
this:SetPoint(a, b, c, d, e)
end)
@@ -111,11 +111,11 @@ pfUI:RegisterModule("skin", function ()
end
end)
if pfUI_config.global.errors_limit == "1" then
if C.global.errors_limit == "1" then
UIErrorsFrame:SetHeight(25)
end
if pfUI_config.global.errors_hide == "1" then
if C.global.errors_hide == "1" then
UIErrorsFrame:Hide()
end
end)
+40 -40
View File
@@ -1,13 +1,13 @@
pfUI:RegisterModule("target", function ()
-- do not go further on disabled UFs
if pfUI_config.unitframes.disable == "1" then return end
if C.unitframes.disable == "1" then return end
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.unitframes ~= "-1" then
default_border = pfUI_config.appearance.border.unitframes
local default_border = C.appearance.border.default
if C.appearance.border.unitframes ~= "-1" then
default_border = C.appearance.border.unitframes
end
local spacing = pfUI_config.unitframes.target.pspace
local spacing = C.unitframes.target.pspace
-- Hide Blizzard target frame and unregister all events to prevent it from popping up again
TargetFrame:Hide()
@@ -22,8 +22,8 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.id = ""
pfUI.uf.target:SetFrameStrata("LOW")
pfUI.uf.target:Hide()
pfUI.uf.target:SetWidth(pfUI_config.unitframes.target.width)
pfUI.uf.target:SetHeight(pfUI_config.unitframes.target.height + pfUI_config.unitframes.target.pheight + 2*default_border + spacing)
pfUI.uf.target:SetWidth(C.unitframes.target.width)
pfUI.uf.target:SetHeight(C.unitframes.target.height + C.unitframes.target.pheight + 2*default_border + spacing)
pfUI.uf.target:SetPoint("BOTTOMLEFT", UIParent, "BOTTOM", 75, 125)
pfUI.api:UpdateMovable(pfUI.uf.target)
pfUI.uf.target:RegisterForClicks('LeftButtonUp', 'RightButtonUp', 'MiddleButtonUp', 'Button4Up', 'Button5Up')
@@ -131,17 +131,17 @@ pfUI:RegisterModule("target", function ()
local r, g, b = .2, .2, .2
if pfUI_config.unitframes.custom == "1" then
local cr, cg, cb, ca = pfUI.api.strsplit(",", pfUI_config.unitframes.customcolor)
if C.unitframes.custom == "1" then
local cr, cg, cb, ca = pfUI.api.strsplit(",", C.unitframes.customcolor)
cr, cg, cb = tonumber(cr), tonumber(cg), tonumber(cb)
pfUI.uf.target.hp.bar:SetStatusBarColor(cr, cg, cb, hp / hpmax / 4 + .75)
if pfUI_config.unitframes.pastel == "1" then
if C.unitframes.pastel == "1" then
r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else
r, g, b = color.r, color.g, color.b
end
else
if pfUI_config.unitframes.pastel == "1" then
if C.unitframes.pastel == "1" then
r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else
r, g, b = color.r, color.g, color.b
@@ -200,7 +200,7 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.tapped = nil
-- bypass animation
if event == "PLAYER_TARGET_CHANGED" and (pfUI.uf.target.noanim == "yes" or pfUI_config.unitframes.target.animation == "0") then
if event == "PLAYER_TARGET_CHANGED" and (pfUI.uf.target.noanim == "yes" or C.unitframes.target.animation == "0") then
pfUI.uf.target.hp.bar:SetValue(hp)
pfUI.uf.target.power.bar:SetValue(power)
pfUI.uf.target.noanim = "no"
@@ -216,9 +216,9 @@ pfUI:RegisterModule("target", function ()
local hpDiff = abs(hpReal - hpDisplay)
if hpDisplay < hpReal then
pfUI.uf.target.hp.bar:SetValue(hpDisplay + ceil(hpDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.target.hp.bar:SetValue(hpDisplay + ceil(hpDiff / C.unitframes.animation_speed))
elseif hpDisplay > hpReal then
pfUI.uf.target.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.target.hp.bar:SetValue(hpDisplay - ceil(hpDiff / C.unitframes.animation_speed))
else
pfUI.uf.target.hp.bar:SetValue(hpReal)
end
@@ -228,9 +228,9 @@ pfUI:RegisterModule("target", function ()
local powerDiff = abs(powerReal - powerDisplay)
if powerDisplay < powerReal then
pfUI.uf.target.power.bar:SetValue(powerDisplay + ceil(powerDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.target.power.bar:SetValue(powerDisplay + ceil(powerDiff / C.unitframes.animation_speed))
elseif powerDisplay > powerReal then
pfUI.uf.target.power.bar:SetValue(powerDisplay - ceil(powerDiff / pfUI_config.unitframes.animation_speed))
pfUI.uf.target.power.bar:SetValue(powerDisplay - ceil(powerDiff / C.unitframes.animation_speed))
else
pfUI.uf.target.power.bar:SetValue(powerReal)
end
@@ -243,8 +243,8 @@ pfUI:RegisterModule("target", function ()
end)
pfUI.uf.target.hp = CreateFrame("Frame",nil, pfUI.uf.target)
pfUI.uf.target.hp:SetWidth(pfUI_config.unitframes.target.width)
pfUI.uf.target.hp:SetHeight(pfUI_config.unitframes.target.height)
pfUI.uf.target.hp:SetWidth(C.unitframes.target.width)
pfUI.uf.target.hp:SetHeight(C.unitframes.target.height)
pfUI.uf.target.hp:SetPoint("TOP", 0, 0)
pfUI.api:CreateBackdrop(pfUI.uf.target.hp, default_border)
@@ -282,8 +282,8 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.power = CreateFrame("Frame",nil, pfUI.uf.target)
pfUI.uf.target.power:SetPoint("BOTTOM", 0, 0)
pfUI.uf.target.power:SetWidth(pfUI_config.unitframes.target.width)
pfUI.uf.target.power:SetHeight(pfUI_config.unitframes.target.pheight)
pfUI.uf.target.power:SetWidth(C.unitframes.target.width)
pfUI.uf.target.power:SetHeight(C.unitframes.target.pheight)
pfUI.api:CreateBackdrop(pfUI.uf.target.power, default_border)
pfUI.uf.target.power.bar = CreateFrame("StatusBar", nil, pfUI.uf.target.power)
@@ -291,10 +291,10 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.power.bar:SetAllPoints(pfUI.uf.target.power)
pfUI.uf.target.power.bar:SetMinMaxValues(0, 100)
pfUI.uf:CreatePortrait(pfUI.uf.target, pfUI_config.unitframes.target.portrait, spacing)
pfUI.uf:CreatePortrait(pfUI.uf.target, C.unitframes.target.portrait, spacing)
pfUI.uf.target.hpText = pfUI.uf.target:CreateFontString("Status", "OVERLAY", "GameFontNormal")
pfUI.uf.target.hpText:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.target.hpText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.target.hpText:ClearAllPoints()
pfUI.uf.target.hpText:SetParent(pfUI.uf.target.hp.bar)
pfUI.uf.target.hpText:SetPoint("RIGHT",pfUI.uf.target.hp.bar, "RIGHT", -10, 0)
@@ -303,13 +303,13 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.hpText:SetText("5000")
pfUI.uf.target.powerText = pfUI.uf.target:CreateFontString("Status", "OVERLAY", "GameFontNormal")
pfUI.uf.target.powerText:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.target.powerText:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.target.powerText:ClearAllPoints()
pfUI.uf.target.powerText:SetParent(pfUI.uf.target.hp.bar)
pfUI.uf.target.powerText:SetPoint("LEFT",pfUI.uf.target.hp.bar, "LEFT", 10, 0)
pfUI.uf.target.powerText:SetJustifyH("LEFT")
pfUI.uf.target.powerText:SetFontObject(GameFontWhite)
pfUI.uf.target.powerText:SetHeight(pfUI_config.global.font_size)
pfUI.uf.target.powerText:SetHeight(C.global.font_size)
pfUI.uf.target.powerText:SetNonSpaceWrap(true)
pfUI.uf.target.powerText:SetText("5000")
@@ -335,7 +335,7 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target["combopoint" .. point]:SetWidth(5)
pfUI.uf.target["combopoint" .. point]:SetHeight(5)
pfUI.api:CreateBackdrop(pfUI.uf.target["combopoint" .. point])
pfUI.uf.target["combopoint" .. point]:SetPoint("TOPLEFT", pfUI.uf.target, "TOPRIGHT", pfUI_config.appearance.border.default*3, -(point - 1) * (5 + pfUI_config.appearance.border.default*3))
pfUI.uf.target["combopoint" .. point]:SetPoint("TOPLEFT", pfUI.uf.target, "TOPRIGHT", C.appearance.border.default*3, -(point - 1) * (5 + C.appearance.border.default*3))
if point < 3 then
local tex = pfUI.uf.target["combopoint" .. point]:CreateTexture("OVERLAY")
tex:SetAllPoints(pfUI.uf.target["combopoint" .. point])
@@ -379,7 +379,7 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.buff.buffs[i] = CreateFrame("Button", "pfUITargetBuff" .. i, pfUI.uf.target)
pfUI.uf.target.buff.buffs[i].stacks = pfUI.uf.target.buff.buffs[i]:CreateFontString(nil, "OVERLAY", pfUI.uf.target.buff.buffs[i])
pfUI.uf.target.buff.buffs[i].stacks:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.target.buff.buffs[i].stacks:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.target.buff.buffs[i].stacks:SetPoint("BOTTOMRIGHT", pfUI.uf.target.buff.buffs[i], 2, -2)
pfUI.uf.target.buff.buffs[i].stacks:SetJustifyH("LEFT")
pfUI.uf.target.buff.buffs[i].stacks:SetShadowColor(0, 0, 0)
@@ -390,11 +390,11 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.buff.buffs[i]:ClearAllPoints()
local invert, af, as
if pfUI_config.unitframes.target.buffs == "top" then
if C.unitframes.target.buffs == "top" then
invert = 1
af = "BOTTOMLEFT"
as = "TOPLEFT"
elseif pfUI_config.unitframes.target.buffs == "bottom" then
elseif C.unitframes.target.buffs == "bottom" then
invert = -1
af = "TOPLEFT"
as = "BOTTOMLEFT"
@@ -410,10 +410,10 @@ pfUI:RegisterModule("target", function ()
end
pfUI.uf.target.buff.buffs[i]:SetPoint(af, pfUI.uf.target, as,
(i-1-8*row)*((2*default_border) + pfUI_config.unitframes.buff_size + 1),
invert * (row)*((2*default_border) + pfUI_config.unitframes.buff_size + 1) + invert*(2*default_border + 1))
pfUI.uf.target.buff.buffs[i]:SetWidth(pfUI_config.unitframes.buff_size)
pfUI.uf.target.buff.buffs[i]:SetHeight(pfUI_config.unitframes.buff_size)
(i-1-8*row)*((2*default_border) + C.unitframes.buff_size + 1),
invert * (row)*((2*default_border) + C.unitframes.buff_size + 1) + invert*(2*default_border + 1))
pfUI.uf.target.buff.buffs[i]:SetWidth(C.unitframes.buff_size)
pfUI.uf.target.buff.buffs[i]:SetHeight(C.unitframes.buff_size)
pfUI.uf.target.buff.buffs[i]:SetNormalTexture(nil)
pfUI.uf.target.buff.buffs[i]:SetScript("OnEnter", function()
GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT")
@@ -460,7 +460,7 @@ pfUI:RegisterModule("target", function ()
local id = i
pfUI.uf.target.debuff.debuffs[i] = CreateFrame("Button", "pfUITargetDebuff" .. i, pfUI.uf.target)
pfUI.uf.target.debuff.debuffs[i].stacks = pfUI.uf.target.debuff.debuffs[i]:CreateFontString(nil, "OVERLAY", pfUI.uf.target.debuff.debuffs[i])
pfUI.uf.target.debuff.debuffs[i].stacks:SetFont(pfUI.font_square, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.target.debuff.debuffs[i].stacks:SetFont(pfUI.font_square, C.global.font_size, "OUTLINE")
pfUI.uf.target.debuff.debuffs[i].stacks:SetPoint("BOTTOMRIGHT", pfUI.uf.target.debuff.debuffs[i], 2, -2)
pfUI.uf.target.debuff.debuffs[i].stacks:SetJustifyH("LEFT")
pfUI.uf.target.debuff.debuffs[i].stacks:SetShadowColor(0, 0, 0)
@@ -469,8 +469,8 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
pfUI.uf.target.debuff.debuffs[i]:ClearAllPoints()
pfUI.uf.target.debuff.debuffs[i]:SetWidth(pfUI_config.unitframes.debuff_size)
pfUI.uf.target.debuff.debuffs[i]:SetHeight(pfUI_config.unitframes.debuff_size)
pfUI.uf.target.debuff.debuffs[i]:SetWidth(C.unitframes.debuff_size)
pfUI.uf.target.debuff.debuffs[i]:SetHeight(C.unitframes.debuff_size)
pfUI.uf.target.debuff.debuffs[i]:SetNormalTexture(nil)
pfUI.uf.target.debuff.debuffs[i]:SetScript("OnEnter", function()
GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT")
@@ -493,11 +493,11 @@ pfUI:RegisterModule("target", function ()
if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end
local invert, af, as
if pfUI_config.unitframes.target.buffs == "top" then
if C.unitframes.target.buffs == "top" then
invert = 1
af = "BOTTOMLEFT"
as = "TOPLEFT"
elseif pfUI_config.unitframes.target.buffs == "bottom" then
elseif C.unitframes.target.buffs == "bottom" then
invert = -1
af = "TOPLEFT"
as = "BOTTOMLEFT"
@@ -513,9 +513,9 @@ pfUI:RegisterModule("target", function ()
end
pfUI.uf.target.debuff.debuffs[i]:SetPoint(af, pfUI.uf.target, as,
(i-1-8*row)*((2*default_border) + pfUI_config.unitframes.debuff_size + 1),
invert * (top)*((2*default_border) + pfUI_config.unitframes.buff_size + 1) +
invert * (row)*((2*default_border) + pfUI_config.unitframes.debuff_size + 1) + invert * (2*default_border + 1))
(i-1-8*row)*((2*default_border) + C.unitframes.debuff_size + 1),
invert * (top)*((2*default_border) + C.unitframes.buff_size + 1) +
invert * (row)*((2*default_border) + C.unitframes.debuff_size + 1) + invert * (2*default_border + 1))
local texture, stacks = UnitDebuff("target",i)
pfUI.api:CreateBackdrop(pfUI.uf.target.debuff.debuffs[i], default_border)
+15 -15
View File
@@ -1,13 +1,13 @@
pfUI:RegisterModule("targettarget", function ()
-- do not go further on disabled UFs
if pfUI_config.unitframes.disable == "1" then return end
if C.unitframes.disable == "1" then return end
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.unitframes ~= "-1" then
default_border = pfUI_config.appearance.border.unitframes
local default_border = C.appearance.border.default
if C.appearance.border.unitframes ~= "-1" then
default_border = C.appearance.border.unitframes
end
local spacing = pfUI_config.unitframes.ttarget.pspace
local spacing = C.unitframes.ttarget.pspace
pfUI.uf.targettargetNotify = CreateFrame("Button",nil,UIParent)
pfUI.uf.targettargetNotify:SetScript("OnUpdate", function()
@@ -72,17 +72,17 @@ pfUI:RegisterModule("targettarget", function ()
pfUI.uf.targettarget.hp.bar:SetMinMaxValues(0, UnitHealthMax("targettarget"))
local r, g, b = .2, .2, .2
if color then
if pfUI_config.unitframes.custom == "1" then
local cr, cg, cb, ca = pfUI.api.strsplit(",", pfUI_config.unitframes.customcolor)
if C.unitframes.custom == "1" then
local cr, cg, cb, ca = pfUI.api.strsplit(",", C.unitframes.customcolor)
cr, cg, cb = tonumber(cr), tonumber(cg), tonumber(cb)
pfUI.uf.targettarget.hp.bar:SetStatusBarColor(cr, cg, cb, UnitHealth("targettarget") / UnitHealthMax("targettarget") / 4 + .75)
if pfUI_config.unitframes.pastel == "1" then
if C.unitframes.pastel == "1" then
r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else
r, g, b = color.r, color.g, color.b
end
else
if pfUI_config.unitframes.pastel == "1" then
if C.unitframes.pastel == "1" then
r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else
r, g, b = color.r, color.g, color.b
@@ -99,9 +99,9 @@ pfUI:RegisterModule("targettarget", function ()
real = UnitHealth("targettarget")
diff = abs(real - display)
if display < real then
pfUI.uf.targettarget.hp.bar:SetValue(display + ceil(diff / pfUI_config.unitframes.animation_speed))
pfUI.uf.targettarget.hp.bar:SetValue(display + ceil(diff / C.unitframes.animation_speed))
elseif display > real then
pfUI.uf.targettarget.hp.bar:SetValue(display - ceil(diff / pfUI_config.unitframes.animation_speed))
pfUI.uf.targettarget.hp.bar:SetValue(display - ceil(diff / C.unitframes.animation_speed))
else
pfUI.uf.targettarget.hp.bar:SetValue(real)
end
@@ -115,9 +115,9 @@ pfUI:RegisterModule("targettarget", function ()
real = UnitMana("targettarget")
diff = abs(real - display)
if display < real then
pfUI.uf.targettarget.power.bar:SetValue(display + ceil(diff / pfUI_config.unitframes.animation_speed))
pfUI.uf.targettarget.power.bar:SetValue(display + ceil(diff / C.unitframes.animation_speed))
elseif display > real then
pfUI.uf.targettarget.power.bar:SetValue(display - ceil(diff / pfUI_config.unitframes.animation_speed))
pfUI.uf.targettarget.power.bar:SetValue(display - ceil(diff / C.unitframes.animation_speed))
else
pfUI.uf.targettarget.power.bar:SetValue(real)
end
@@ -156,10 +156,10 @@ pfUI:RegisterModule("targettarget", function ()
pfUI.uf.targettarget.power.bar:SetAllPoints(pfUI.uf.targettarget.power)
pfUI.uf.targettarget.power.bar:SetMinMaxValues(0, 100)
pfUI.uf:CreatePortrait(pfUI.uf.targettarget, pfUI_config.unitframes.ttarget.portrait, spacing)
pfUI.uf:CreatePortrait(pfUI.uf.targettarget, C.unitframes.ttarget.portrait, spacing)
pfUI.uf.targettarget.hp.text = pfUI.uf.targettarget.hp.bar:CreateFontString("Status", "OVERLAY", "GameFontNormal")
pfUI.uf.targettarget.hp.text:SetFont(pfUI.font_square, pfUI_config.global.font_size - 2, "OUTLINE")
pfUI.uf.targettarget.hp.text:SetFont(pfUI.font_square, C.global.font_size - 2, "OUTLINE")
pfUI.uf.targettarget.hp.text:ClearAllPoints()
pfUI.uf.targettarget.hp.text:SetAllPoints(pfUI.uf.targettarget.hp.bar)
pfUI.uf.targettarget.hp.text:SetPoint("CENTER", 0, 0)
+15 -15
View File
@@ -3,7 +3,7 @@ pfUI:RegisterModule("thirdparty", function ()
-- DPSMate Integration
-- Move DPSMate to right chat and let the chat-hide button toggle it
if pfUI_config.thirdparty.dpsmate.enable == "1" then
if C.thirdparty.dpsmate.enable == "1" then
local function pfDPSMateConfig()
-- set DPSMate appearance to match pfUI
@@ -88,7 +88,7 @@ pfUI:RegisterModule("thirdparty", function ()
-- WIM Integration
-- Change the appearance of WIM windows to match pfUI
if pfUI_config.thirdparty.wim.enable == "1" then
if C.thirdparty.wim.enable == "1" then
local pfUIhookWIM = CreateFrame("Frame", nil)
pfUIhookWIM:RegisterEvent("ADDON_LOADED")
@@ -161,7 +161,7 @@ pfUI:RegisterModule("thirdparty", function ()
pfUI.healComm:SetScript("OnEvent", function ()
-- return if already exists
if pfUI.healComm.createIncHeal or pfUI_config.thirdparty.healcomm.enable == "0" then return end
if pfUI.healComm.createIncHeal or C.thirdparty.healcomm.enable == "0" then return end
if AceLibrary and AceLibrary:HasInstance("HealComm-1.0") then
local HealComm = AceLibrary("HealComm-1.0")
@@ -279,7 +279,7 @@ pfUI:RegisterModule("thirdparty", function ()
local healed = HealComm:getHeal(UnitName(unit))
local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit)
if strsub(unit,0,4) == "raid" and pfUI_config.unitframes.raid.invert_healthbar == "1" then
if strsub(unit,0,4) == "raid" and C.unitframes.raid.invert_healthbar == "1" then
health = maxHealth - health
end
@@ -294,7 +294,7 @@ pfUI:RegisterModule("thirdparty", function ()
frame.incHeal:SetWidth(incWidth)
frame.incHeal:ClearAllPoints()
if strsub(unit,0,4) == "raid" and pfUI_config.unitframes.raid.invert_healthbar == "1" then
if strsub(unit,0,4) == "raid" and C.unitframes.raid.invert_healthbar == "1" then
frame.incHeal:SetPoint("TOPLEFT", frame.hp.bar, "TOPLEFT", 0, 0)
frame.incHeal:SetFrameStrata("HIGH")
else
@@ -326,14 +326,14 @@ pfUI:RegisterModule("thirdparty", function ()
if not pfUI.bag.right.sort then
pfUI.bag.right.sort = CreateFrame("Button", "pfBagSlotSort", UIParent)
pfUI.bag.right.sort:SetParent(pfUI.bag.right)
pfUI.bag.right.sort:SetPoint("TOPRIGHT", -pfUI_config.appearance.border.default*14 - 45, -pfUI_config.appearance.border.default)
pfUI.bag.right.sort:SetPoint("TOPRIGHT", pfUI.bag.right.keys, "TOPLEFT", -pfUI_config.appearance.border.default*3, 0)
pfUI.bag.right.sort:SetPoint("TOPRIGHT", -C.appearance.border.default*14 - 45, -C.appearance.border.default)
pfUI.bag.right.sort:SetPoint("TOPRIGHT", pfUI.bag.right.keys, "TOPLEFT", -C.appearance.border.default*3, 0)
pfUI.api:CreateBackdrop(pfUI.bag.right.sort)
pfUI.bag.right.sort:SetHeight(12)
pfUI.bag.right.sort:SetWidth(12)
pfUI.bag.right.sort:SetTextColor(1,1,.25,1)
pfUI.bag.right.sort:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.bag.right.sort:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.bag.right.sort.texture = pfUI.bag.right.sort:CreateTexture("pfBagArrowUp")
pfUI.bag.right.sort.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\sort")
pfUI.bag.right.sort.texture:ClearAllPoints()
@@ -356,22 +356,22 @@ pfUI:RegisterModule("thirdparty", function ()
end)
pfUI.bag.right.search:ClearAllPoints()
pfUI.bag.right.search:SetPoint("TOPLEFT", pfUI.bag.right, "TOPLEFT", pfUI_config.appearance.border.default, -pfUI_config.appearance.border.default)
pfUI.bag.right.search:SetPoint("TOPRIGHT", pfUI.bag.right.sort, "TOPLEFT", -pfUI_config.appearance.border.default*3, -pfUI_config.appearance.border.default)
pfUI.bag.right.search:SetPoint("TOPLEFT", pfUI.bag.right, "TOPLEFT", C.appearance.border.default, -C.appearance.border.default)
pfUI.bag.right.search:SetPoint("TOPRIGHT", pfUI.bag.right.sort, "TOPLEFT", -C.appearance.border.default*3, -C.appearance.border.default)
end
-- draw the button
if not pfUI.bag.left.sort then
pfUI.bag.left.sort = CreateFrame("Button", "pfBankSlotSort", UIParent)
pfUI.bag.left.sort:SetParent(pfUI.bag.left)
pfUI.bag.left.sort:SetPoint("TOPRIGHT", -pfUI_config.appearance.border.default*14 - 45, -pfUI_config.appearance.border.default)
pfUI.bag.left.sort:SetPoint("TOPRIGHT", pfUI.bag.left.bags, "TOPLEFT", -pfUI_config.appearance.border.default*3, 0)
pfUI.bag.left.sort:SetPoint("TOPRIGHT", -C.appearance.border.default*14 - 45, -C.appearance.border.default)
pfUI.bag.left.sort:SetPoint("TOPRIGHT", pfUI.bag.left.bags, "TOPLEFT", -C.appearance.border.default*3, 0)
pfUI.api:CreateBackdrop(pfUI.bag.left.sort)
pfUI.bag.left.sort:SetHeight(12)
pfUI.bag.left.sort:SetWidth(12)
pfUI.bag.left.sort:SetTextColor(1,1,.25,1)
pfUI.bag.left.sort:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.bag.left.sort:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.bag.left.sort.texture = pfUI.bag.left.sort:CreateTexture("pfBagArrowUp")
pfUI.bag.left.sort.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\sort")
pfUI.bag.left.sort.texture:ClearAllPoints()
@@ -396,7 +396,7 @@ pfUI:RegisterModule("thirdparty", function ()
end)
end
if pfUI_config.thirdparty.cleanup.enable == "1" then
if C.thirdparty.cleanup.enable == "1" then
if Clean_Up then
pfSetupClean_Up()
else
@@ -474,7 +474,7 @@ pfUI:RegisterModule("thirdparty", function ()
if KLHTM_SelfFrameBottomLine then KLHTM_SelfFrameBottomLine:Hide() end
end
if pfUI_config.thirdparty.ktm.enable == "1" then
if C.thirdparty.ktm.enable == "1" then
if KLHTM_Gui then
pfSetupKTM()
else
+9 -9
View File
@@ -1,8 +1,8 @@
pfUI:RegisterModule("tooltip", function ()
local alpha = tonumber(pfUI_config.tooltip.alpha)
local alpha = tonumber(C.tooltip.alpha)
pfUI.api:CreateBackdrop(GameTooltip, nil, nil, alpha)
if pfUI_config.tooltip.position == "cursor" then
if C.tooltip.position == "cursor" then
function _G.GameTooltip_SetDefaultAnchor(tooltip, parent)
tooltip:SetOwner(parent, "ANCHOR_CURSOR")
end
@@ -42,16 +42,16 @@ pfUI.api:CreateBackdrop(GameTooltip, nil, nil, alpha)
pfUI.tooltip:Update()
if GameTooltip:GetAnchorType() == "ANCHOR_NONE" then
GameTooltip:ClearAllPoints()
if pfUI_config.tooltip.position == "bottom" then
if C.tooltip.position == "bottom" then
if pfUI.panel then
GameTooltip:SetPoint("BOTTOMRIGHT", pfUI.panel.right, "TOPRIGHT", 0, pfUI_config.appearance.border.default*2)
GameTooltip:SetPoint("BOTTOMRIGHT", pfUI.panel.right, "TOPRIGHT", 0, C.appearance.border.default*2)
else
GameTooltip:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, -pfUI_config.appearance.border.default*2)
GameTooltip:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, -C.appearance.border.default*2)
end
elseif pfUI_config.tooltip.position == "chat" then
elseif C.tooltip.position == "chat" then
local anchor = ChatFrame3
if pfUI.chat then anchor = pfUI.chat.right end
GameTooltip:SetPoint("BOTTOMRIGHT", anchor, "TOPRIGHT", 0, pfUI_config.appearance.border.default*2)
GameTooltip:SetPoint("BOTTOMRIGHT", anchor, "TOPRIGHT", 0, C.appearance.border.default*2)
end
end
end)
@@ -113,7 +113,7 @@ pfUI.api:CreateBackdrop(GameTooltip, nil, nil, alpha)
if guild then
local rank = ""
local lead = ""
if pfUI_config.tooltip.extguild == "1" then
if C.tooltip.extguild == "1" then
if rankstr then rank = " |cffaaaaaa(" .. rankstr .. ")" end
if rankid and rankid == 0 then lead = "|cffffcc00*|r" end
end
@@ -136,7 +136,7 @@ pfUI.api:CreateBackdrop(GameTooltip, nil, nil, alpha)
pfUI.tooltipStatusBar.HP:SetPoint("TOP", 0,8)
pfUI.tooltipStatusBar.HP:SetNonSpaceWrap(false)
pfUI.tooltipStatusBar.HP:SetFontObject(GameFontWhite)
pfUI.tooltipStatusBar.HP:SetFont(pfUI.font_default, pfUI_config.global.font_size + 2, "OUTLINE")
pfUI.tooltipStatusBar.HP:SetFont(pfUI.font_default, C.global.font_size + 2, "OUTLINE")
end
if hp and hpm then
+13 -13
View File
@@ -1,48 +1,48 @@
pfUI:RegisterModule("uf_tukui", function ()
-- do not go further on disabled UFs
if pfUI_config.unitframes.disable == "1" then return end
if C.unitframes.disable == "1" then return end
local default_border = pfUI_config.appearance.border.default
if pfUI_config.appearance.border.unitframes ~= "-1" then
default_border = pfUI_config.appearance.border.unitframes
local default_border = C.appearance.border.default
if C.appearance.border.unitframes ~= "-1" then
default_border = C.appearance.border.unitframes
end
local pspacing = pfUI_config.unitframes.player.pspace
local tspacing = pfUI_config.unitframes.target.pspace
local pspacing = C.unitframes.player.pspace
local tspacing = C.unitframes.target.pspace
if pfUI_config.unitframes.layout == "tukui" then
if C.unitframes.layout == "tukui" then
-- Player
pfUI.uf.player.caption = CreateFrame("Frame", "pfPlayerCaption", pfUI.uf.player)
pfUI.uf.player.caption:SetHeight(pfUI_config.global.font_size + default_border)
pfUI.uf.player.caption:SetHeight(C.global.font_size + default_border)
pfUI.uf.player.caption:SetPoint("TOPRIGHT",pfUI.uf.player,"BOTTOMRIGHT",0, -default_border*2 - pspacing)
pfUI.uf.player.caption:SetPoint("TOPLEFT",pfUI.uf.player,"BOTTOMLEFT",0, -default_border*2 - pspacing)
pfUI.uf.player.hpText:SetParent(pfUI.uf.player.caption)
pfUI.uf.player.hpText:SetAllPoints(pfUI.uf.player.caption)
pfUI.uf.player.hpText:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.player.hpText:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.castbar.player:SetAllPoints(pfUI.uf.player.caption)
pfUI.uf.player.powerText:SetParent(pfUI.uf.player.caption)
pfUI.uf.player.powerText:SetAllPoints(pfUI.uf.player.caption)
pfUI.uf.player.powerText:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.player.powerText:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.api:CreateBackdrop(pfUI.uf.player.caption)
-- Target
pfUI.uf.target.caption = CreateFrame("Frame", "pfTargetCaption", pfUI.uf.target)
pfUI.uf.target.caption:SetHeight(pfUI_config.global.font_size + default_border)
pfUI.uf.target.caption:SetHeight(C.global.font_size + default_border)
pfUI.uf.target.caption:SetPoint("TOPRIGHT",pfUI.uf.target,"BOTTOMRIGHT", 0, -default_border*2 - pspacing)
pfUI.uf.target.caption:SetPoint("TOPLEFT",pfUI.uf.target,"BOTTOMLEFT", 0, -default_border*2 - pspacing)
pfUI.uf.target.hpText:SetParent(pfUI.uf.target.caption)
pfUI.uf.target.hpText:SetAllPoints(pfUI.uf.target.caption)
pfUI.uf.target.hpText:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.target.hpText:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.castbar.target:SetAllPoints(pfUI.uf.target.caption)
pfUI.uf.target.powerText:SetParent(pfUI.uf.target.caption)
pfUI.uf.target.powerText:SetAllPoints(pfUI.uf.target.caption)
pfUI.uf.target.powerText:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
pfUI.uf.target.powerText:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
pfUI.api:CreateBackdrop(pfUI.uf.target.caption)
end
end)
+6 -6
View File
@@ -2,8 +2,8 @@ pfUI:RegisterModule("xpbar", function ()
pfUI.xp = CreateFrame("Frame",nil, UIParent)
pfUI.xp:SetWidth(5)
if pfUI.chat then
pfUI.xp:SetPoint("TOPLEFT", pfUI.chat.left, "TOPRIGHT", pfUI_config.appearance.border.default*2, 0)
pfUI.xp:SetPoint("BOTTOMLEFT", pfUI.chat.left, "BOTTOMRIGHT", pfUI_config.appearance.border.default*2, 0)
pfUI.xp:SetPoint("TOPLEFT", pfUI.chat.left, "TOPRIGHT", C.appearance.border.default*2, 0)
pfUI.xp:SetPoint("BOTTOMLEFT", pfUI.chat.left, "BOTTOMRIGHT", C.appearance.border.default*2, 0)
else
pfUI.xp:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 0, 0)
pfUI.xp:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 0, 0)
@@ -34,7 +34,7 @@ pfUI:RegisterModule("xpbar", function ()
end)
pfUI.xp:SetScript("OnUpdate",function()
if pfUI_config.panel.xp.showalways == "1" then return end
if C.panel.xp.showalways == "1" then return end
if pfUI.xp:GetAlpha() == 0 or pfUI.xp.mouseover == true then return end
if not pfUI.xp.tick then
pfUI.xp.tick = GetTime() + 0.01
@@ -102,8 +102,8 @@ pfUI:RegisterModule("xpbar", function ()
pfUI.rep = CreateFrame("Frame",nil, UIParent)
pfUI.rep:SetWidth(5)
if pfUI.chat then
pfUI.rep:SetPoint("TOPRIGHT",pfUI.chat.right,"TOPLEFT", -pfUI_config.appearance.border.default*2, 0)
pfUI.rep:SetPoint("BOTTOMRIGHT",pfUI.chat.right,"BOTTOMLEFT",-pfUI_config.appearance.border.default*2, 0)
pfUI.rep:SetPoint("TOPRIGHT",pfUI.chat.right,"TOPLEFT", -C.appearance.border.default*2, 0)
pfUI.rep:SetPoint("BOTTOMRIGHT",pfUI.chat.right,"BOTTOMLEFT",-C.appearance.border.default*2, 0)
else
pfUI.rep:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", 0, 0)
pfUI.rep:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0)
@@ -142,7 +142,7 @@ pfUI:RegisterModule("xpbar", function ()
end)
pfUI.rep:SetScript("OnUpdate",function()
if pfUI_config.panel.xp.showalways == "1" then return end
if C.panel.xp.showalways == "1" then return end
if pfUI.rep:GetAlpha() == 0 or pfUI.rep.mouseover == true then return end
if not pfUI.rep.tick then
pfUI.rep.tick = GetTime() + 0.01