mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 02:16:02 +00:00
backdrop api: rework every single frame sizing
This commit breaks alot of compatibility and maybe other things too. The change was necessary, because the old framework ran up against its limits. A lot of new configuration options are now possible and some of them were already added.
This commit is contained in:
Vendored
+16
-1
@@ -1,4 +1,4 @@
|
||||
-- a real "round" instead of ceil or floor
|
||||
-- a real "round" instead of ceil or floor
|
||||
function round(input, places)
|
||||
if not places then places = 0 end
|
||||
if type(input) == "number" and type(places) == "number" then
|
||||
@@ -7,3 +7,18 @@ function round(input, places)
|
||||
return floor(input * pow + 0.5) / pow
|
||||
end
|
||||
end
|
||||
|
||||
function strsplit(delimiter, subject)
|
||||
local ret = {}
|
||||
local sector = subject
|
||||
while true do
|
||||
local pos = strfind(sector, delimiter)
|
||||
if pos then
|
||||
table.insert(ret, strsub(sector,1,pos-1))
|
||||
sector = strsub(sector,pos+1)
|
||||
else
|
||||
table.insert(ret, sector)
|
||||
return unpack(ret)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |
BIN
Binary file not shown.
+71
-93
@@ -1,4 +1,9 @@
|
||||
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
|
||||
end
|
||||
|
||||
-- override defaultUI functions to always show grid
|
||||
function ActionButton_ShowGrid(button) return end
|
||||
function ActionButton_HideGrid(button) return end
|
||||
@@ -78,18 +83,18 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
|
||||
pfUI.bars:SetScript("OnEvent", function()
|
||||
local bpc = 1; if MultiBarBottomLeft:IsShown() then bpc = bpc + 1 end -- bottom panel count
|
||||
pfUI.bars.bottom:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 12 + pfUI_config.bars.border * 12)
|
||||
pfUI.bars.bottom:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * bpc + pfUI_config.bars.border * bpc)
|
||||
pfUI.bars.bottom:SetWidth((pfUI_config.bars.icon_size + default_border*3) * 12 - default_border)
|
||||
pfUI.bars.bottom:SetHeight((pfUI_config.bars.icon_size + default_border*3) * bpc - default_border)
|
||||
|
||||
if (PetHasActionBar()) then
|
||||
PetActionBar_Update()
|
||||
pfUI.bars.pet:Show()
|
||||
pfUI.bars.pet:SetFrameStrata("LOW")
|
||||
pfUI.bars.pet:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, 5)
|
||||
pfUI.bars.pet:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, default_border * 5)
|
||||
pfUI.utils:UpdateMovable(pfUI.bars.pet)
|
||||
pfUI.bars.pet:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.bars.pet:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 10 + pfUI_config.bars.border * 10)
|
||||
pfUI.bars.pet:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 1 + pfUI_config.bars.border)
|
||||
pfUI.utils:CreateBackdrop(pfUI.bars.pet, default_border)
|
||||
pfUI.bars.pet:SetWidth((pfUI_config.bars.icon_size + default_border*3) * 10 - default_border)
|
||||
pfUI.bars.pet:SetHeight((pfUI_config.bars.icon_size + default_border*3) * 1 - default_border)
|
||||
|
||||
PetActionBarFrame:ClearAllPoints()
|
||||
PetActionBarFrame:Hide()
|
||||
@@ -99,10 +104,11 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
local b2 = getglobal("PetActionButton"..i-1) or b
|
||||
b:ClearAllPoints()
|
||||
b:SetParent(pfUI.bars.pet)
|
||||
pfUI.utils:CreateBackdrop(b, default_border)
|
||||
if i == 1 then
|
||||
b:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2)
|
||||
b:SetPoint("BOTTOMLEFT", tonumber(default_border), tonumber(default_border))
|
||||
else
|
||||
b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", default_border*3, 0)
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -124,20 +130,21 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
local b2 = getglobal("ShapeshiftButton"..i-1) or b
|
||||
b:ClearAllPoints()
|
||||
b:SetParent(pfUI.bars.shapeshift)
|
||||
pfUI.utils:CreateBackdrop(b, default_border)
|
||||
if i == 1 then
|
||||
b:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2)
|
||||
b:SetPoint("BOTTOMLEFT", tonumber(default_border), tonumber(default_border))
|
||||
else
|
||||
b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", default_border*3, 0)
|
||||
end
|
||||
if b:IsShown() then shapeshiftbuttons = shapeshiftbuttons + 1 end
|
||||
end
|
||||
|
||||
pfUI.bars.shapeshift:SetFrameStrata("LOW")
|
||||
pfUI.bars.shapeshift:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, 5)
|
||||
--pfUI.bars.shapeshift:SetFrameStrata("LOW")
|
||||
pfUI.bars.shapeshift:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, default_border * 5)
|
||||
pfUI.utils:UpdateMovable(pfUI.bars.shapeshift)
|
||||
pfUI.bars.shapeshift:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.bars.shapeshift:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * shapeshiftbuttons + pfUI_config.bars.border * shapeshiftbuttons)
|
||||
pfUI.bars.shapeshift:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 1 + pfUI_config.bars.border)
|
||||
pfUI.utils:CreateBackdrop(pfUI.bars.shapeshift, default_border)
|
||||
pfUI.bars.shapeshift:SetWidth((pfUI_config.bars.icon_size + default_border*3) * shapeshiftbuttons - default_border)
|
||||
pfUI.bars.shapeshift:SetHeight((pfUI_config.bars.icon_size + default_border*3) * 1 - default_border)
|
||||
|
||||
if SHOW_MULTI_ACTIONBAR_1 then
|
||||
MultiBarBottomLeft:SetParent(pfUI.bars.bottom)
|
||||
@@ -156,9 +163,9 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
b:SetParent(tf)
|
||||
|
||||
if i == 1 then
|
||||
b:SetPoint("BOTTOM", ActionButton1, "TOP", 0, pfUI_config.bars.border)
|
||||
b:SetPoint("TOPLEFT", tonumber(default_border), -tonumber(default_border))
|
||||
else
|
||||
b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", default_border*3, 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -166,11 +173,11 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
if SHOW_MULTI_ACTIONBAR_2 then
|
||||
pfUI.bars.bottomleft:Show()
|
||||
pfUI.bars.bottomleft:SetFrameStrata("LOW")
|
||||
pfUI.bars.bottomleft:SetPoint("BOTTOMRIGHT", pfUI.bars.bottom, "BOTTOMLEFT", -5, 0)
|
||||
pfUI.bars.bottomleft:SetPoint("BOTTOMRIGHT", pfUI.bars.bottom, "BOTTOMLEFT", -default_border*5, 0)
|
||||
pfUI.utils:UpdateMovable(pfUI.bars.bottomleft)
|
||||
pfUI.bars.bottomleft:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.bars.bottomleft:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 6 + pfUI_config.bars.border * 6)
|
||||
pfUI.bars.bottomleft:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 2 + pfUI_config.bars.border * 2)
|
||||
pfUI.utils:CreateBackdrop(pfUI.bars.bottomleft, default_border)
|
||||
pfUI.bars.bottomleft:SetWidth((pfUI_config.bars.icon_size + default_border*3) * 6 - default_border)
|
||||
pfUI.bars.bottomleft:SetHeight((pfUI_config.bars.icon_size + default_border*3) * 2 - default_border)
|
||||
|
||||
MultiBarBottomRight:SetParent(pfUI.bars.bottomleft)
|
||||
MultiBarBottomRight:ClearAllPoints()
|
||||
@@ -188,9 +195,9 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
b:SetParent(tf)
|
||||
|
||||
if i == 1 then
|
||||
b:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2)
|
||||
b:SetPoint("BOTTOMLEFT", tonumber(default_border), tonumber(default_border))
|
||||
else
|
||||
b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", default_border*3, 0)
|
||||
end
|
||||
end
|
||||
for i=7, 12 do
|
||||
@@ -199,7 +206,7 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
b:ClearAllPoints()
|
||||
b:SetParent(tf)
|
||||
|
||||
b:SetPoint("LEFT", b2, "RIGHT", -pfUI_config.bars.icon_size, pfUI_config.bars.icon_size + pfUI_config.bars.border)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", -pfUI_config.bars.icon_size, pfUI_config.bars.icon_size + default_border*3)
|
||||
end
|
||||
else
|
||||
pfUI.bars.bottomleft:Hide()
|
||||
@@ -208,11 +215,12 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
if SHOW_MULTI_ACTIONBAR_3 then
|
||||
pfUI.bars.bottomright:Show()
|
||||
pfUI.bars.bottomright:SetFrameStrata("LOW")
|
||||
pfUI.bars.bottomright:SetPoint("BOTTOMLEFT", pfUI.bars.bottom, "BOTTOMRIGHT", 5, 0)
|
||||
pfUI.bars.bottomright:SetPoint("BOTTOMLEFT", pfUI.bars.bottom, "BOTTOMRIGHT", default_border*5, 0)
|
||||
pfUI.utils:UpdateMovable(pfUI.bars.bottomright)
|
||||
pfUI.bars.bottomright:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.bars.bottomright:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 6 + pfUI_config.bars.border * 6)
|
||||
pfUI.bars.bottomright:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 2 + pfUI_config.bars.border * 2)
|
||||
pfUI.utils:CreateBackdrop(pfUI.bars.bottomright, default_border)
|
||||
|
||||
pfUI.bars.bottomright:SetWidth((pfUI_config.bars.icon_size + default_border*3) * 6 - default_border)
|
||||
pfUI.bars.bottomright:SetHeight((pfUI_config.bars.icon_size + default_border*3) * 2 - default_border)
|
||||
|
||||
MultiBarRight:SetParent(pfUI.bars.bottomright)
|
||||
MultiBarRight:ClearAllPoints()
|
||||
@@ -230,9 +238,9 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
b:SetParent(tf)
|
||||
|
||||
if i == 1 then
|
||||
b:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2)
|
||||
b:SetPoint("BOTTOMLEFT", tonumber(default_border), tonumber(default_border))
|
||||
else
|
||||
b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", default_border*3, 0)
|
||||
end
|
||||
end
|
||||
for i=7, 12 do
|
||||
@@ -241,7 +249,7 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
b:ClearAllPoints()
|
||||
b:SetParent(tf)
|
||||
|
||||
b:SetPoint("LEFT", b2, "RIGHT", -pfUI_config.bars.icon_size, pfUI_config.bars.icon_size + pfUI_config.bars.border)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", -pfUI_config.bars.icon_size, pfUI_config.bars.icon_size + default_border*3)
|
||||
end
|
||||
else
|
||||
pfUI.bars.bottomright:Hide()
|
||||
@@ -252,9 +260,9 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
pfUI.bars.vertical:SetFrameStrata("LOW")
|
||||
pfUI.bars.vertical:SetPoint("RIGHT", -5, 0)
|
||||
pfUI.utils:UpdateMovable(pfUI.bars.vertical)
|
||||
pfUI.bars.vertical:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.bars.vertical:SetWidth(pfUI_config.bars.border*4 + pfUI_config.bars.icon_size)
|
||||
pfUI.bars.vertical:SetHeight(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 12 + pfUI_config.bars.border * 12)
|
||||
pfUI.utils:CreateBackdrop(pfUI.bars.vertical, default_border)
|
||||
pfUI.bars.vertical:SetWidth((pfUI_config.bars.icon_size + default_border*3) * 1 - default_border)
|
||||
pfUI.bars.vertical:SetHeight((pfUI_config.bars.icon_size + default_border*3) * 12 - default_border)
|
||||
|
||||
MultiBarLeft:SetParent(pfUI.bars.vertical)
|
||||
MultiBarLeft:ClearAllPoints()
|
||||
@@ -272,9 +280,9 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
b:SetParent(tf)
|
||||
|
||||
if i == 1 then
|
||||
b:SetPoint("TOPLEFT", pfUI_config.bars.border*2, -pfUI_config.bars.border*2)
|
||||
b:SetPoint("TOPLEFT", tonumber(default_border), -tonumber(default_border))
|
||||
else
|
||||
b:SetPoint("TOP", b2, "BOTTOM", 0, -pfUI_config.bars.border)
|
||||
b:SetPoint("TOP", b2, "BOTTOM", 0, -default_border*3)
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -287,7 +295,7 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
pfUI.bars.bottom:SetFrameStrata("LOW")
|
||||
pfUI.bars.bottom:SetPoint("BOTTOM", 0, 5)
|
||||
pfUI.utils:UpdateMovable(pfUI.bars.bottom)
|
||||
pfUI.bars.bottom:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.bars.bottom, default_border)
|
||||
|
||||
for i=1, 12 do
|
||||
local b = getglobal("ActionButton"..i)
|
||||
@@ -295,9 +303,9 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
b:ClearAllPoints()
|
||||
b:SetParent(pfUI.bars.bottom)
|
||||
if i == 1 then
|
||||
b:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2, pfUI_config.bars.border*2)
|
||||
b:SetPoint("BOTTOMLEFT", tonumber(default_border), tonumber(default_border))
|
||||
else
|
||||
b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", default_border*3, 0)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -312,65 +320,41 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
b:ClearAllPoints()
|
||||
b:SetParent(BonusActionBarFrame)
|
||||
if i == 1 then
|
||||
b:SetPoint("BOTTOMLEFT", pfUI_config.bars.border*2 - 4, pfUI_config.bars.border*2)
|
||||
b:SetPoint("BOTTOMLEFT", tonumber(default_border) - 4, tonumber(default_border))
|
||||
else
|
||||
b:SetPoint("LEFT", b2, "RIGHT", pfUI_config.bars.border, 0)
|
||||
b:SetPoint("LEFT", b2, "RIGHT", default_border*3, 0)
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 10 do
|
||||
getglobal("ShapeshiftButton"..i):SetBackdrop(pfUI.backdrop)
|
||||
getglobal("ShapeshiftButton"..i):SetBackdropColor(0,0,0,0)
|
||||
getglobal("ShapeshiftButton"..i):SetWidth(pfUI_config.bars.icon_size)
|
||||
getglobal("ShapeshiftButton"..i):SetHeight(pfUI_config.bars.icon_size)
|
||||
getglobal("ShapeshiftButton"..i):Show()
|
||||
getglobal("ShapeshiftButton"..i).showgrid = 1
|
||||
getglobal("ShapeshiftButton"..i..'Icon'):SetParent(getglobal("ShapeshiftButton"..i))
|
||||
|
||||
getglobal("ShapeshiftButton"..i..'Icon'):SetAllPoints(getglobal("ShapeshiftButton"..i))
|
||||
getglobal("ShapeshiftButton"..i..'Border'):SetTexture(1,1,0,1)
|
||||
getglobal("ShapeshiftButton"..i..'Icon'):SetTexCoord(.08, .92, .08, .92)
|
||||
|
||||
getglobal("ShapeshiftButton"..i..'NormalTexture'):SetAlpha(0)
|
||||
getglobal("ShapeshiftButton"..i..'NormalTexture'):SetPoint("TOPLEFT", getglobal("ShapeshiftButton"..i) ,"TOPLEFT", -5, 5)
|
||||
getglobal("ShapeshiftButton"..i..'NormalTexture'):SetPoint("BOTTOMRIGHT", getglobal("ShapeshiftButton"..i) ,"BOTTOMRIGHT", 5, -5)
|
||||
getglobal("ShapeshiftButton"..i..'Border'):SetPoint("TOPLEFT", getglobal("ShapeshiftButton"..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal("ShapeshiftButton"..i..'Border'):SetPoint("BOTTOMRIGHT", getglobal("ShapeshiftButton"..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal("ShapeshiftButton"..i..'HotKey'):SetPoint("TOPLEFT", getglobal("ShapeshiftButton"..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal("ShapeshiftButton"..i..'HotKey'):SetPoint("BOTTOMRIGHT", getglobal("ShapeshiftButton"..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal("ShapeshiftButton"..i..'HotKey'):SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size - 2, "OUTLINE")
|
||||
getglobal("ShapeshiftButton"..i..'HotKey'):SetJustifyH("RIGHT")
|
||||
getglobal("ShapeshiftButton"..i..'HotKey'):SetJustifyV("TOP")
|
||||
getglobal("ShapeshiftButton"..i..'Name'):SetPoint("TOPLEFT", getglobal("ShapeshiftButton"..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal("ShapeshiftButton"..i..'Name'):SetPoint("BOTTOMRIGHT", getglobal("ShapeshiftButton"..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal("ShapeshiftButton"..i..'Name'):SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size - 2, "OUTLINE")
|
||||
getglobal("ShapeshiftButton"..i..'Name'):SetJustifyH("CENTER")
|
||||
getglobal("ShapeshiftButton"..i..'Name'):SetJustifyV("BOTTOM")
|
||||
getglobal("ShapeshiftButton"..i..'Border'):SetAlpha(0)
|
||||
end
|
||||
|
||||
for i = 1, 10 do
|
||||
getglobal("PetActionButton"..i):SetBackdrop(pfUI.backdrop)
|
||||
getglobal("PetActionButton"..i):SetBackdropColor(0,0,0,0)
|
||||
getglobal("PetActionButton"..i):SetWidth(pfUI_config.bars.icon_size)
|
||||
getglobal("PetActionButton"..i):SetHeight(pfUI_config.bars.icon_size)
|
||||
getglobal("PetActionButton"..i):Show()
|
||||
getglobal("PetActionButton"..i).showgrid = 1
|
||||
|
||||
getglobal("PetActionButton"..i..'Icon'):SetAllPoints(getglobal("PetActionButton"..i))
|
||||
getglobal("PetActionButton"..i..'Icon'):SetParent(getglobal("PetActionButton"..i))
|
||||
getglobal("PetActionButton"..i..'Icon'):SetTexCoord(.08, .92, .08, .92)
|
||||
|
||||
getglobal("PetActionButton"..i..'NormalTexture2'):SetAlpha(0)
|
||||
getglobal("PetActionButton"..i..'AutoCastable'):SetAlpha(0)
|
||||
getglobal("PetActionButton"..i..'Border'):SetAlpha(0)
|
||||
|
||||
getglobal("PetActionButton"..i..'AutoCast'):SetScale(.75)
|
||||
getglobal("PetActionButton"..i..'AutoCast'):SetAlpha(.50)
|
||||
getglobal("PetActionButton"..i..'AutoCastable'):SetAlpha(0)
|
||||
getglobal("PetActionButton"..i..'Icon'):SetAllPoints(getglobal("PetActionButton"..i))
|
||||
getglobal("PetActionButton"..i..'Border'):SetTexture(1,1,0,1)
|
||||
getglobal("PetActionButton"..i..'NormalTexture2'):SetAlpha(0)
|
||||
getglobal("PetActionButton"..i..'NormalTexture2'):SetPoint("TOPLEFT", getglobal("PetActionButton"..i) ,"TOPLEFT", -5, 5)
|
||||
getglobal("PetActionButton"..i..'NormalTexture2'):SetPoint("BOTTOMRIGHT", getglobal("PetActionButton"..i) ,"BOTTOMRIGHT", 5, -5)
|
||||
getglobal("PetActionButton"..i..'Border'):SetPoint("TOPLEFT", getglobal("PetActionButton"..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal("PetActionButton"..i..'Border'):SetPoint("BOTTOMRIGHT", getglobal("PetActionButton"..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal("PetActionButton"..i..'HotKey'):SetPoint("TOPLEFT", getglobal("PetActionButton"..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal("PetActionButton"..i..'HotKey'):SetPoint("BOTTOMRIGHT", getglobal("PetActionButton"..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal("PetActionButton"..i..'HotKey'):SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size - 2, "OUTLINE")
|
||||
getglobal("PetActionButton"..i..'HotKey'):SetJustifyH("RIGHT")
|
||||
getglobal("PetActionButton"..i..'HotKey'):SetJustifyV("TOP")
|
||||
getglobal("PetActionButton"..i..'Name'):SetPoint("TOPLEFT", getglobal("PetActionButton"..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal("PetActionButton"..i..'Name'):SetPoint("BOTTOMRIGHT", getglobal("PetActionButton"..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal("PetActionButton"..i..'Name'):SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size - 2, "OUTLINE")
|
||||
getglobal("PetActionButton"..i..'Name'):SetJustifyH("CENTER")
|
||||
getglobal("PetActionButton"..i..'Name'):SetJustifyV("BOTTOM")
|
||||
end
|
||||
|
||||
-- theme all actionbars (spacing, size, border, text position and style)
|
||||
@@ -380,28 +364,22 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
for i = 1, 12 do
|
||||
for _, button in pairs(actionbars) do
|
||||
getglobal(button..i..'NormalTexture'):SetAlpha(0)
|
||||
getglobal(button..i):SetBackdrop(pfUI.backdrop)
|
||||
getglobal(button..i):SetBackdropColor(0,0,0,0)
|
||||
|
||||
pfUI.utils:CreateBackdrop(getglobal(button..i), default_border)
|
||||
getglobal(button..i):SetWidth(pfUI_config.bars.icon_size)
|
||||
getglobal(button..i):SetHeight(pfUI_config.bars.icon_size)
|
||||
getglobal(button..i):Show()
|
||||
getglobal(button..i).showgrid = 1
|
||||
|
||||
getglobal(button..i..'Icon'):SetAllPoints(getglobal(button..i))
|
||||
getglobal(button..i..'Border'):SetTexture(1,1,0,1)
|
||||
getglobal(button..i..'NormalTexture'):SetPoint("TOPLEFT", getglobal(button..i) ,"TOPLEFT", -5, 5)
|
||||
getglobal(button..i..'NormalTexture'):SetPoint("BOTTOMRIGHT", getglobal(button..i) ,"BOTTOMRIGHT", 5, -5)
|
||||
getglobal(button..i..'Border'):SetPoint("TOPLEFT", getglobal(button..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal(button..i..'Border'):SetPoint("BOTTOMRIGHT", getglobal(button..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal(button..i..'HotKey'):SetPoint("TOPLEFT", getglobal(button..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal(button..i..'HotKey'):SetPoint("BOTTOMRIGHT", getglobal(button..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal(button..i..'HotKey'):SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size - 2, "OUTLINE")
|
||||
getglobal(button..i..'Icon'):SetTexCoord(.08, .92, .08, .92)
|
||||
getglobal(button..i..'NormalTexture'):SetAllPoints(getglobal(button..i))
|
||||
getglobal(button..i..'NormalTexture'):SetTexCoord(.08, .92, .08, .92)
|
||||
getglobal(button..i..'HotKey'):SetAllPoints(getglobal(button..i))
|
||||
getglobal(button..i..'HotKey'):SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size -2, "OUTLINE")
|
||||
getglobal(button..i..'HotKey'):SetJustifyH("RIGHT")
|
||||
getglobal(button..i..'HotKey'):SetJustifyV("TOP")
|
||||
getglobal(button..i..'Name'):SetPoint("TOPLEFT", getglobal(button..i) ,"TOPLEFT", 1, -1)
|
||||
getglobal(button..i..'Name'):SetPoint("BOTTOMRIGHT", getglobal(button..i) ,"BOTTOMRIGHT", -1, 1)
|
||||
getglobal(button..i..'Name'):SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size - 2, "OUTLINE")
|
||||
getglobal(button..i..'Name'):SetAllPoints(getglobal(button..i))
|
||||
getglobal(button..i..'Name'):SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size -2, "OUTLINE")
|
||||
getglobal(button..i..'Name'):SetJustifyH("CENTER")
|
||||
getglobal(button..i..'Name'):SetJustifyV("BOTTOM")
|
||||
end
|
||||
|
||||
+11
-11
@@ -5,8 +5,7 @@ pfUI:RegisterModule("addons", function ()
|
||||
pfUI.addons:SetWidth(400)
|
||||
pfUI.addons:SetPoint("CENTER", 0,0)
|
||||
pfUI.addons:EnableMouseWheel(1)
|
||||
pfUI.addons:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.addons:SetBackdropColor(0,0,0,.8)
|
||||
pfUI.utils:CreateBackdrop(pfUI.addons, nil, nil, true)
|
||||
pfUI.addons:SetMovable(true)
|
||||
pfUI.addons:EnableMouse(true)
|
||||
pfUI.addons:SetScript("OnMouseDown",function()
|
||||
@@ -34,8 +33,8 @@ pfUI:RegisterModule("addons", function ()
|
||||
pfUI.addons.caption:SetText("Addon List")
|
||||
|
||||
pfUI.addons.close = CreateFrame("Button", "pfBagClose", pfUI.addons)
|
||||
pfUI.addons.close:SetPoint("TOPRIGHT", -pfUI_config.bars.border*2,-pfUI_config.bars.border*2 )
|
||||
pfUI.addons.close:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.addons.close:SetPoint("TOPRIGHT", -pfUI_config.appearance.border.default*2,-pfUI_config.appearance.border.default*2 )
|
||||
pfUI.utils:CreateBackdrop(pfUI.addons.close)
|
||||
pfUI.addons.close:SetHeight(15)
|
||||
pfUI.addons.close:SetWidth(15)
|
||||
pfUI.addons.close.texture = pfUI.addons.close:CreateTexture("pfBagClose")
|
||||
@@ -45,13 +44,12 @@ pfUI:RegisterModule("addons", function ()
|
||||
pfUI.addons.close.texture:SetPoint("BOTTOMRIGHT", pfUI.addons.close, "BOTTOMRIGHT", -4, 4)
|
||||
pfUI.addons.close.texture:SetVertexColor(1,.25,.25,1)
|
||||
pfUI.addons.close:SetScript("OnEnter", function ()
|
||||
pfUI.addons.close:SetBackdrop(pfUI.backdrop_col)
|
||||
pfUI.addons.close:SetBackdropBorderColor(1,.25,.25,1)
|
||||
pfUI.utils:CreateBackdrop(pfUI.addons.close)
|
||||
pfUI.addons.close.backdrop:SetBackdropBorderColor(1,.25,.25,1)
|
||||
end)
|
||||
|
||||
pfUI.addons.close:SetScript("OnLeave", function ()
|
||||
pfUI.addons.close:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.addons.close:SetBackdropBorderColor(1,1,1,1)
|
||||
pfUI.utils:CreateBackdrop(pfUI.addons.close)
|
||||
end)
|
||||
|
||||
pfUI.addons.close:SetScript("OnClick", function()
|
||||
@@ -86,10 +84,13 @@ pfUI:RegisterModule("addons", function ()
|
||||
|
||||
-- input field
|
||||
frame.input = CreateFrame("CheckButton", nil, frame, "UICheckButtonTemplate")
|
||||
frame.input:SetFrameLevel(3)
|
||||
frame.input:SetNormalTexture("")
|
||||
frame.input:SetPushedTexture("")
|
||||
frame.input:SetHighlightTexture("")
|
||||
frame.input:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(frame.input, nil, true)
|
||||
--frame.input:SetBackdrop(pfUI.backdrop)
|
||||
frame.input:SetBackdropBorderColor(.3,.3,.3,1)
|
||||
frame.input:SetWidth(14)
|
||||
frame.input:SetHeight(14)
|
||||
frame.input:SetPoint("TOPRIGHT" , 0, -4)
|
||||
@@ -166,8 +167,7 @@ pfUI:RegisterModule("addons", function ()
|
||||
pfUI.addons.deco:ClearAllPoints()
|
||||
pfUI.addons.deco:SetPoint("TOPLEFT", pfUI.addons.scroll, "TOPLEFT", -5, 5)
|
||||
pfUI.addons.deco:SetPoint("BOTTOMRIGHT", pfUI.addons.scroll, "BOTTOMRIGHT", 5, -5)
|
||||
pfUI.addons.deco:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.addons.deco:SetBackdropColor(0,0,0,.50)
|
||||
pfUI.utils:CreateBackdrop(pfUI.addons.deco, nil, nil, true)
|
||||
|
||||
pfUI.addons.deco.up = CreateFrame("Frame", nil, pfUI.addons.deco)
|
||||
pfUI.addons.deco.up:SetPoint("TOPRIGHT", 0,0)
|
||||
|
||||
+78
-92
@@ -1,4 +1,9 @@
|
||||
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
|
||||
end
|
||||
|
||||
-- overwrite some bag functions
|
||||
function OpenAllBags()
|
||||
if pfUI.bag.right:IsShown() then
|
||||
@@ -177,11 +182,11 @@ pfUI:RegisterModule("bags", function ()
|
||||
end
|
||||
|
||||
frame:SetFrameStrata("HIGH")
|
||||
frame:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(frame, default_border)
|
||||
|
||||
pfUI.bag.button_size = (frame:GetWidth() - pfUI_config.bars.border*3) / 10 - pfUI_config.bars.border
|
||||
|
||||
local topspace = 18
|
||||
pfUI.bag.button_size = (frame:GetWidth() + default_border - 10*default_border*3) / 10
|
||||
--message(frame:GetWidth() .. " should be " .. pfUI.bag.button_size*10 + 10*default_border*3)
|
||||
local topspace = pfUI.bag.right.close:GetHeight() + default_border * 2
|
||||
if object == "bank" then topspace = 0 end
|
||||
|
||||
for id, bag in pairs(iterate) do
|
||||
@@ -197,7 +202,9 @@ pfUI:RegisterModule("bags", function ()
|
||||
pfUI.bag:UpdateSlot(bag, slot)
|
||||
|
||||
pfUI.bags[bag].slots[slot].frame:ClearAllPoints()
|
||||
pfUI.bags[bag].slots[slot].frame:SetPoint("TOPLEFT", x*(pfUI.bag.button_size+pfUI_config.bars.border) + (pfUI_config.bars.border * 2), - (y*(pfUI.bag.button_size+pfUI_config.bars.border) + (pfUI_config.bars.border * 2)+ topspace))
|
||||
pfUI.bags[bag].slots[slot].frame:SetPoint("TOPLEFT",
|
||||
default_border + x*(pfUI.bag.button_size+default_border*3),
|
||||
-default_border*2 - y*(pfUI.bag.button_size+default_border*3) - topspace)
|
||||
pfUI.bags[bag].slots[slot].frame:SetHeight(pfUI.bag.button_size)
|
||||
pfUI.bags[bag].slots[slot].frame:SetWidth(pfUI.bag.button_size)
|
||||
|
||||
@@ -211,7 +218,7 @@ pfUI:RegisterModule("bags", function ()
|
||||
end
|
||||
|
||||
if x > 0 then y = y + 1 end
|
||||
frame:SetHeight( y * pfUI.bag.button_size + y * pfUI_config.bars.border + pfUI_config.bars.border*3 + 17 + topspace )
|
||||
frame:SetHeight( default_border*2 + y*(pfUI.bag.button_size+default_border*3) + topspace + pfUI.panel.right:GetHeight())
|
||||
|
||||
frame:SetScript("OnShow", function() pfUI.bag:CreateBags(object) end)
|
||||
frame:SetScript("OnHide", function() pfUI.bag:CreateBags(object) end)
|
||||
@@ -233,7 +240,7 @@ pfUI:RegisterModule("bags", function ()
|
||||
if bag == -1 then tpl = "BankItemButtonGenericTemplate" end
|
||||
pfUI.bags[bag].slots[slot] = {}
|
||||
pfUI.bags[bag].slots[slot].frame = CreateFrame("Button", "pfBag" .. bag .. "item" .. slot, pfUI.bags[bag], tpl)
|
||||
pfUI.bags[bag].slots[slot].frame:SetBackdrop(pfUI.backdrop_col)
|
||||
pfUI.utils:CreateBackdrop(pfUI.bags[bag].slots[slot].frame, default_border)
|
||||
pfUI.bags[bag].slots[slot].frame:SetNormalTexture("")
|
||||
|
||||
pfUI.bags[bag].slots[slot].bag = bag
|
||||
@@ -260,15 +267,15 @@ pfUI:RegisterModule("bags", function ()
|
||||
local icon = getglobal(pfUI.bags[bag].slots[slot].frame:GetName() .. "IconTexture")
|
||||
icon:SetTexCoord(.08, .92, .08, .92)
|
||||
icon:ClearAllPoints()
|
||||
icon:SetPoint("TOPLEFT", 3, -3)
|
||||
icon:SetPoint("BOTTOMRIGHT", -3, 3)
|
||||
icon:SetPoint("TOPLEFT", 1, -1)
|
||||
icon:SetPoint("BOTTOMRIGHT", -1, 1)
|
||||
|
||||
local border = getglobal(pfUI.bags[bag].slots[slot].frame:GetName() .. "NormalTexture")
|
||||
border:SetTexture("")
|
||||
|
||||
-- detect backdrop border color
|
||||
if quality and quality > 1 then
|
||||
pfUI.bags[bag].slots[slot].frame:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
pfUI.bags[bag].slots[slot].frame.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||
else
|
||||
local bagtype
|
||||
if bag > 0 then
|
||||
@@ -287,15 +294,15 @@ pfUI:RegisterModule("bags", function ()
|
||||
end
|
||||
|
||||
if bagtype == "QUIVER" then
|
||||
pfUI.bags[bag].slots[slot].frame:SetBackdropBorderColor(.8,.8,.2,1)
|
||||
pfUI.bags[bag].slots[slot].frame.backdrop:SetBackdropBorderColor(.8,.8,.2,1)
|
||||
elseif bagtype == "SOULBAG" then
|
||||
pfUI.bags[bag].slots[slot].frame:SetBackdropBorderColor(.5,.2,.2,1)
|
||||
pfUI.bags[bag].slots[slot].frame.backdrop:SetBackdropBorderColor(.5,.2,.2,1)
|
||||
elseif bagtype == "SPECIAL" then
|
||||
pfUI.bags[bag].slots[slot].frame:SetBackdropBorderColor(.2,.2,.8,1)
|
||||
pfUI.bags[bag].slots[slot].frame.backdrop:SetBackdropBorderColor(.2,.2,.8,1)
|
||||
elseif bag == -2 then
|
||||
pfUI.bags[bag].slots[slot].frame:SetBackdropBorderColor(.2,.8,.8,1)
|
||||
pfUI.bags[bag].slots[slot].frame.backdrop:SetBackdropBorderColor(.2,.8,.8,1)
|
||||
else
|
||||
pfUI.bags[bag].slots[slot].frame:SetBackdropBorderColor(.3,.3,.3,1)
|
||||
pfUI.bags[bag].slots[slot].frame.backdrop:SetBackdropBorderColor(.3,.3,.3,1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -321,13 +328,13 @@ pfUI:RegisterModule("bags", function ()
|
||||
position = "LEFT"
|
||||
end
|
||||
|
||||
frame.bagslots:SetPoint("BOTTOM"..position, frame, "TOP"..position, 0, pfUI_config.bars.border)
|
||||
frame.bagslots:SetBackdrop(pfUI.backdrop)
|
||||
frame.bagslots:SetPoint("BOTTOM"..position, frame, "TOP"..position, 0, default_border*3)
|
||||
pfUI.utils:CreateBackdrop(frame.bagslots, default_border)
|
||||
|
||||
local extra = 0
|
||||
if frame == pfUI.bag.left and GetNumBankSlots() < 6 then extra = 1 end
|
||||
local width = 3 * pfUI_config.bars.border + (pfUI.bag.button_size/5*4 + pfUI_config.bars.border) * (max-min+1+extra)
|
||||
local height = 3 * pfUI_config.bars.border + (pfUI.bag.button_size/5*4 + pfUI_config.bars.border)
|
||||
local width = default_border*3 + (pfUI.bag.button_size/5*4 + default_border*2) * (max-min+1+extra)
|
||||
local height = default_border + (pfUI.bag.button_size/5*4 + default_border)
|
||||
|
||||
frame.bagslots:SetWidth(width)
|
||||
frame.bagslots:SetHeight(height)
|
||||
@@ -341,8 +348,8 @@ pfUI:RegisterModule("bags", function ()
|
||||
local border = getglobal(frame.bagslots.slots[slot].frame:GetName() .. "NormalTexture")
|
||||
icon:SetTexCoord(.08, .92, .08, .92)
|
||||
icon:ClearAllPoints()
|
||||
icon:SetPoint("TOPLEFT", 3, -3)
|
||||
icon:SetPoint("BOTTOMRIGHT", -3, 3)
|
||||
icon:SetPoint("TOPLEFT", 1, -1)
|
||||
icon:SetPoint("BOTTOMRIGHT", -1, 1)
|
||||
border:SetTexture("")
|
||||
|
||||
if frame == pfUI.bag.left then
|
||||
@@ -354,18 +361,18 @@ pfUI:RegisterModule("bags", function ()
|
||||
end
|
||||
|
||||
frame.bagslots.slots[slot].frame:SetScript("OnEnter", function()
|
||||
for slot, f in ipairs(pfUI.bags[this.slot + 1].slots) do
|
||||
f.frame:SetBackdrop(pfUI.backdrop_col)
|
||||
f.frame:SetBackdropBorderColor(.2,1,.8,1)
|
||||
end
|
||||
end)
|
||||
for slot, f in ipairs(pfUI.bags[this.slot + 1].slots) do
|
||||
pfUI.utils:CreateBackdrop(f.frame, default_border)
|
||||
f.frame.backdrop:SetBackdropBorderColor(.2,1,.8,1)
|
||||
end
|
||||
end)
|
||||
frame.bagslots.slots[slot].frame:SetScript("OnLeave", function()
|
||||
pfUI.bag:UpdateBag(this.slot + 1)
|
||||
end)
|
||||
end
|
||||
|
||||
local left = (slot-min)*(pfUI.bag.button_size/5*4+pfUI_config.bars.border) + pfUI_config.bars.border*2
|
||||
local top = -2 * pfUI_config.bars.border
|
||||
local left = (slot-min)*(pfUI.bag.button_size/5*4+default_border*3) + default_border
|
||||
local top = -default_border
|
||||
|
||||
frame.bagslots.slots[slot].frame:ClearAllPoints()
|
||||
frame.bagslots.slots[slot].frame:SetPoint("TOPLEFT", frame.bagslots, "TOPLEFT", left, top)
|
||||
@@ -373,7 +380,7 @@ pfUI:RegisterModule("bags", function ()
|
||||
frame.bagslots.slots[slot].frame:SetWidth(pfUI.bag.button_size/5*4)
|
||||
|
||||
local id, texture = GetInventorySlotInfo("Bag" .. slot .. append)
|
||||
frame.bagslots.slots[slot].frame:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(frame.bagslots.slots[slot].frame, default_border)
|
||||
frame.bagslots.slots[slot].frame:Show()
|
||||
|
||||
local numSlots, full = GetNumBankSlots()
|
||||
@@ -389,8 +396,8 @@ pfUI:RegisterModule("bags", function ()
|
||||
if not frame.bagslots.buy then
|
||||
frame.bagslots.buy = CreateFrame("Button", "pfBagSlotBuy", frame.bagslots)
|
||||
end
|
||||
frame.bagslots.buy:SetPoint("RIGHT", frame.bagslots, "RIGHT", -2 * pfUI_config.bars.border, 0)
|
||||
frame.bagslots.buy:SetBackdrop(pfUI.backdrop)
|
||||
frame.bagslots.buy:SetPoint("RIGHT", frame.bagslots, "RIGHT", -2 * default_border, 0)
|
||||
pfUI.utils:CreateBackdrop(frame.bagslots.buy, default_border)
|
||||
frame.bagslots.buy:SetHeight(pfUI.bag.button_size/5*4)
|
||||
frame.bagslots.buy:SetWidth(pfUI.bag.button_size/5*4)
|
||||
frame.bagslots.buy:SetText("+")
|
||||
@@ -412,43 +419,27 @@ pfUI:RegisterModule("bags", function ()
|
||||
end
|
||||
|
||||
function pfUI.bag:CreateAdditions(frame)
|
||||
-- bag money display
|
||||
if not frame.money then
|
||||
frame.money = CreateFrame("Frame", "pfUIBagsMoney", frame, "SmallMoneyFrameTemplate")
|
||||
frame.money:ClearAllPoints()
|
||||
frame.money:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -40, -6)
|
||||
|
||||
pfUIBagsMoneyGoldButton:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
for i,v in ipairs({pfUIBagsMoneyGoldButton:GetRegions()}) do if i == 1 then v:SetHeight(10); v:SetWidth(10) end end
|
||||
pfUIBagsMoneySilverButton:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
for i,v in ipairs({pfUIBagsMoneySilverButton:GetRegions()}) do if i == 1 then v:SetHeight(10); v:SetWidth(10) end end
|
||||
pfUIBagsMoneyCopperButton:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
for i,v in ipairs({pfUIBagsMoneyCopperButton:GetRegions()}) do if i == 1 then v:SetHeight(10); v:SetWidth(10) end end
|
||||
end
|
||||
|
||||
-- bag close button
|
||||
if not frame.close then
|
||||
frame.close = CreateFrame("Button", "pfBagClose", UIParent)
|
||||
frame.close:SetParent(frame)
|
||||
frame.close:SetPoint("TOPRIGHT", -pfUI_config.bars.border*2,-pfUI_config.bars.border*2 )
|
||||
frame.close:SetBackdrop(pfUI.backdrop)
|
||||
frame.close:SetHeight(15)
|
||||
frame.close:SetWidth(15)
|
||||
frame.close:SetPoint("TOPRIGHT", -default_border*1,-default_border )
|
||||
pfUI.utils:CreateBackdrop(frame.close, default_border)
|
||||
frame.close:SetHeight(12)
|
||||
frame.close:SetWidth(12)
|
||||
frame.close.texture = frame.close:CreateTexture("pfBagClose")
|
||||
frame.close.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\close")
|
||||
frame.close.texture:ClearAllPoints()
|
||||
frame.close.texture:SetPoint("TOPLEFT", frame.close, "TOPLEFT", 4, -4)
|
||||
frame.close.texture:SetPoint("BOTTOMRIGHT", frame.close, "BOTTOMRIGHT", -4, 4)
|
||||
frame.close.texture:SetPoint("TOPLEFT", frame.close, "TOPLEFT", 2, -2)
|
||||
frame.close.texture:SetPoint("BOTTOMRIGHT", frame.close, "BOTTOMRIGHT", -2, 2)
|
||||
frame.close.texture:SetVertexColor(1,.25,.25,1)
|
||||
frame.close:SetScript("OnEnter", function ()
|
||||
frame.close:SetBackdrop(pfUI.backdrop_col)
|
||||
frame.close:SetBackdropBorderColor(1,.25,.25,1)
|
||||
end)
|
||||
frame.close.backdrop:SetBackdropBorderColor(1,.25,.25,1)
|
||||
end)
|
||||
|
||||
frame.close:SetScript("OnLeave", function ()
|
||||
frame.close:SetBackdrop(pfUI.backdrop)
|
||||
frame.close:SetBackdropBorderColor(1,1,1,1)
|
||||
end)
|
||||
pfUI.utils:CreateBackdrop(frame.close, default_border)
|
||||
end)
|
||||
|
||||
frame.close:SetScript("OnClick", function()
|
||||
CloseAllBags()
|
||||
@@ -459,30 +450,28 @@ pfUI:RegisterModule("bags", function ()
|
||||
if not frame.bags then
|
||||
frame.bags = CreateFrame("Button", "pfBagSlotShow", UIParent)
|
||||
frame.bags:SetParent(frame)
|
||||
frame.bags:SetPoint("TOPRIGHT", -pfUI_config.bars.border*2 - 15 , -pfUI_config.bars.border*2 )
|
||||
frame.bags:SetBackdrop(pfUI.backdrop)
|
||||
frame.bags:SetHeight(15)
|
||||
frame.bags:SetWidth(15)
|
||||
frame.bags:SetPoint("TOPRIGHT", frame.close, "TOPLEFT", -default_border*3, 0)
|
||||
pfUI.utils:CreateBackdrop(frame.bags, default_border)
|
||||
frame.bags:SetHeight(12)
|
||||
frame.bags:SetWidth(12)
|
||||
frame.bags:SetTextColor(1,1,.25,1)
|
||||
frame.bags:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
frame.bags.texture = frame.bags:CreateTexture("pfBagArrowUp")
|
||||
frame.bags.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\up")
|
||||
frame.bags.texture:ClearAllPoints()
|
||||
frame.bags.texture:SetPoint("TOPLEFT", frame.bags, "TOPLEFT", 5, -3)
|
||||
frame.bags.texture:SetPoint("BOTTOMRIGHT", frame.bags, "BOTTOMRIGHT", -5, 3)
|
||||
frame.bags.texture:SetPoint("TOPLEFT", frame.bags, "TOPLEFT", 3, -1)
|
||||
frame.bags.texture:SetPoint("BOTTOMRIGHT", frame.bags, "BOTTOMRIGHT", -3, 1)
|
||||
frame.bags.texture:SetVertexColor(.25,.25,.25,1)
|
||||
|
||||
frame.bags:SetScript("OnEnter", function ()
|
||||
frame.bags:SetBackdrop(pfUI.backdrop_col)
|
||||
frame.bags:SetBackdropBorderColor(1,1,.25,1)
|
||||
frame.bags.texture:SetVertexColor(1,1,.25,1)
|
||||
end)
|
||||
frame.bags.backdrop:SetBackdropBorderColor(1,1,.25,1)
|
||||
frame.bags.texture:SetVertexColor(1,1,.25,1)
|
||||
end)
|
||||
|
||||
frame.bags:SetScript("OnLeave", function ()
|
||||
frame.bags:SetBackdrop(pfUI.backdrop)
|
||||
frame.bags:SetBackdropBorderColor(1,1,1,1)
|
||||
frame.bags.texture:SetVertexColor(.25,.25,.25,1)
|
||||
end)
|
||||
pfUI.utils:CreateBackdrop(frame.bags, default_border)
|
||||
frame.bags.texture:SetVertexColor(.25,.25,.25,1)
|
||||
end)
|
||||
|
||||
frame.bags:SetScript("OnClick", function()
|
||||
if pfUI.bag.right.bagslots:IsShown() then
|
||||
@@ -499,30 +488,28 @@ pfUI:RegisterModule("bags", function ()
|
||||
if not frame.keys then
|
||||
frame.keys = CreateFrame("Button", "pfBagSlotShow", UIParent)
|
||||
frame.keys:SetParent(frame)
|
||||
frame.keys:SetPoint("TOPRIGHT", -pfUI_config.bars.border*2 - 30 , -pfUI_config.bars.border*2 )
|
||||
frame.keys:SetBackdrop(pfUI.backdrop)
|
||||
frame.keys:SetHeight(15)
|
||||
frame.keys:SetWidth(15)
|
||||
frame.keys:SetPoint("TOPRIGHT", frame.bags, "TOPLEFT", -default_border*3, 0)
|
||||
pfUI.utils:CreateBackdrop(frame.keys, default_border)
|
||||
frame.keys:SetHeight(12)
|
||||
frame.keys:SetWidth(12)
|
||||
frame.keys:SetTextColor(1,1,.25,1)
|
||||
frame.keys:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
frame.keys.texture = frame.keys:CreateTexture("pfBagArrowUp")
|
||||
frame.keys.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\key")
|
||||
frame.keys.texture:ClearAllPoints()
|
||||
frame.keys.texture:SetPoint("TOPLEFT", frame.keys, "TOPLEFT", 5, -3)
|
||||
frame.keys.texture:SetPoint("BOTTOMRIGHT", frame.keys, "BOTTOMRIGHT", -5, 3)
|
||||
frame.keys.texture:SetPoint("TOPLEFT", frame.keys, "TOPLEFT", 3, -1)
|
||||
frame.keys.texture:SetPoint("BOTTOMRIGHT", frame.keys, "BOTTOMRIGHT", -3, 1)
|
||||
frame.keys.texture:SetVertexColor(.25,.25,.25,1)
|
||||
|
||||
frame.keys:SetScript("OnEnter", function ()
|
||||
frame.keys:SetBackdrop(pfUI.backdrop_col)
|
||||
frame.keys:SetBackdropBorderColor(1,1,.25,1)
|
||||
frame.keys.texture:SetVertexColor(1,1,.25,1)
|
||||
end)
|
||||
frame.keys.backdrop:SetBackdropBorderColor(1,1,.25,1)
|
||||
frame.keys.texture:SetVertexColor(1,1,.25,1)
|
||||
end)
|
||||
|
||||
frame.keys:SetScript("OnLeave", function ()
|
||||
frame.keys:SetBackdrop(pfUI.backdrop)
|
||||
frame.keys:SetBackdropBorderColor(1,1,1,1)
|
||||
frame.keys.texture:SetVertexColor(.25,.25,.25,1)
|
||||
end)
|
||||
pfUI.utils:CreateBackdrop(frame.keys, default_border)
|
||||
frame.keys.texture:SetVertexColor(.25,.25,.25,1)
|
||||
end)
|
||||
|
||||
frame.keys:SetScript("OnClick", function()
|
||||
if not pfUI.bag.showKeyring then
|
||||
@@ -538,19 +525,18 @@ pfUI:RegisterModule("bags", function ()
|
||||
if not frame.search then
|
||||
frame.search = CreateFrame("Frame", "pfBagSearch", UIParent)
|
||||
frame.search:SetParent(frame)
|
||||
frame.search:SetHeight(15)
|
||||
frame.search:SetWidth(100)
|
||||
frame.search:SetPoint("TOPLEFT", frame, "TOPLEFT", pfUI_config.bars.border*2, -pfUI_config.bars.border*2)
|
||||
frame.search:SetBackdrop(pfUI.backdrop)
|
||||
frame.search:SetBackdropBorderColor(0,0,0,1)
|
||||
frame.search:SetHeight(12)
|
||||
frame.search:SetPoint("TOPLEFT", frame, "TOPLEFT", default_border, -default_border)
|
||||
frame.search:SetPoint("TOPRIGHT", frame.keys, "TOPLEFT", -default_border*3, -default_border)
|
||||
pfUI.utils:CreateBackdrop(frame.search, default_border)
|
||||
|
||||
frame.search.edit = CreateFrame("EditBox", "pfUIBagSearch", frame.search, "InputBoxTemplate")
|
||||
pfUIBagSearchLeft:SetTexture(nil)
|
||||
pfUIBagSearchMiddle:SetTexture(nil)
|
||||
pfUIBagSearchRight:SetTexture(nil)
|
||||
frame.search.edit:ClearAllPoints()
|
||||
frame.search.edit:SetPoint("TOPLEFT", frame.search, "TOPLEFT", pfUI_config.bars.border*2, 0)
|
||||
frame.search.edit:SetPoint("BOTTOMRIGHT", frame.search, "BOTTOMRIGHT", -pfUI_config.bars.border*2, 0)
|
||||
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("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
frame.search.edit:SetAutoFocus(false)
|
||||
|
||||
+24
-25
@@ -51,13 +51,9 @@ pfUI:RegisterModule("buff", function ()
|
||||
local icon = getglobal(buff:GetName().."Icon")
|
||||
local border = getglobal(buff:GetName().."Border")
|
||||
local _, _, mainhand, _, _, offhand = GetWeaponEnchantInfo()
|
||||
|
||||
if buff then
|
||||
buff:SetBackdrop({
|
||||
bgFile = icon:GetTexture(), tile = false, tileSize = 16,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
pfUI.utils:CreateBackdrop(buff)
|
||||
icon:SetTexCoord(.08, .92, .08, .92)
|
||||
border:Hide()
|
||||
end
|
||||
|
||||
@@ -66,7 +62,7 @@ pfUI:RegisterModule("buff", function ()
|
||||
if not link then break end
|
||||
local _, _, itemLink = string.find(link, "(item:%d+:%d+:%d+:%d+)")
|
||||
local _, _, itemRarity, itemLevel, _, _, _, itemEquipLoc, _ = GetItemInfo(itemLink)
|
||||
if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end
|
||||
if itemRarity then buff.backdrop:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end
|
||||
|
||||
if mainhand and mainhand > 0 then
|
||||
buff.stacks:SetText(mainhand)
|
||||
@@ -79,7 +75,7 @@ pfUI:RegisterModule("buff", function ()
|
||||
if not link then break end
|
||||
local _, _, itemLink = string.find(link, "(item:%d+:%d+:%d+:%d+)")
|
||||
local _, _, itemRarity, itemLevel, _, _, _, itemEquipLoc, _ = GetItemInfo(itemLink)
|
||||
if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end
|
||||
if itemRarity then buff.backdrop:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end
|
||||
if offhand and offhand > 0 then
|
||||
buff.stacks:SetText(offhand)
|
||||
buff.stacks:Show()
|
||||
@@ -90,24 +86,27 @@ pfUI:RegisterModule("buff", function ()
|
||||
end
|
||||
|
||||
-- buffs
|
||||
for i=0,15,1 do
|
||||
for i=0,32 do
|
||||
local buff = getglobal("BuffButton" .. i)
|
||||
local icon = getglobal(buff:GetName().."Icon")
|
||||
local border = getglobal(buff:GetName().."Border")
|
||||
if border then
|
||||
buff:SetBackdrop({
|
||||
bgFile = icon:GetTexture(), tile = false, tileSize = 16,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
buff:SetBackdropBorderColor(border:GetVertexColor())
|
||||
border:Hide()
|
||||
else
|
||||
buff:SetBackdrop({
|
||||
bgFile = icon:GetTexture(), tile = false, tileSize = 16,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
if buff then
|
||||
local icon = getglobal(buff:GetName().."Icon")
|
||||
local border = getglobal(buff:GetName().."Border")
|
||||
local text = getglobal(buff:GetName().."Duration")
|
||||
|
||||
if i < 8 and i > 0 then
|
||||
buff:SetPoint("TOPRIGHT", getglobal("BuffButton" .. i-1), "TOPLEFT", -7, 0)
|
||||
elseif i < 16 and i > 8 then
|
||||
buff:SetPoint("TOPRIGHT", getglobal("BuffButton" .. i-1), "TOPLEFT", -7, 0)
|
||||
elseif i > 16 then
|
||||
buff:SetPoint("TOPRIGHT", getglobal("BuffButton" .. i-1), "TOPLEFT", -7, 0)
|
||||
end
|
||||
pfUI.utils:CreateBackdrop(buff)
|
||||
text:SetPoint("TOP", buff, "BOTTOM", 0 , -pfUI_config.appearance.border.default*2)
|
||||
icon:SetTexCoord(.08, .92, .08, .92)
|
||||
if border then
|
||||
buff.backdrop:SetBackdropBorderColor(border:GetVertexColor())
|
||||
border:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+14
-10
@@ -1,4 +1,10 @@
|
||||
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
|
||||
end
|
||||
|
||||
pfUI.castbar = CreateFrame("Frame")
|
||||
|
||||
if pfUI.uf.player then
|
||||
@@ -11,10 +17,10 @@ pfUI:RegisterModule("castbar", function ()
|
||||
|
||||
-- setup player castbar
|
||||
pfUI.castbar.player = CreateFrame("Frame",nil, pfUI.uf.player)
|
||||
pfUI.castbar.player:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.castbar.player, default_border)
|
||||
pfUI.castbar.player:SetHeight(pfUI_config.global.font_size * 2)
|
||||
pfUI.castbar.player:SetPoint("TOPRIGHT",pfUI.uf.player,"BOTTOMRIGHT",0,-1)
|
||||
pfUI.castbar.player:SetPoint("TOPLEFT",pfUI.uf.player,"BOTTOMLEFT",0,-1)
|
||||
pfUI.castbar.player:SetPoint("TOPRIGHT",pfUI.uf.player,"BOTTOMRIGHT",0,-default_border*3)
|
||||
pfUI.castbar.player:SetPoint("TOPLEFT",pfUI.uf.player,"BOTTOMLEFT",0,-default_border*3)
|
||||
pfUI.castbar.player:Hide()
|
||||
pfUI.castbar.player.delay = 0
|
||||
|
||||
@@ -22,8 +28,7 @@ pfUI:RegisterModule("castbar", function ()
|
||||
pfUI.castbar.player.bar = CreateFrame("StatusBar", nil, pfUI.castbar.player)
|
||||
pfUI.castbar.player.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.castbar.player.bar:ClearAllPoints()
|
||||
pfUI.castbar.player.bar:SetPoint("TOPLEFT", pfUI.castbar.player, "TOPLEFT", 3, -3)
|
||||
pfUI.castbar.player.bar:SetPoint("BOTTOMRIGHT", pfUI.castbar.player, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.castbar.player.bar:SetAllPoints(pfUI.castbar.player)
|
||||
pfUI.castbar.player.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.castbar.player.bar:SetValue(20)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(.7,.7,.9,.8)
|
||||
@@ -194,17 +199,16 @@ pfUI:RegisterModule("castbar", function ()
|
||||
|
||||
if pfUI.uf.target then
|
||||
pfUI.castbar.target = CreateFrame("Frame")
|
||||
pfUI.castbar.target:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.castbar.target, default_border)
|
||||
pfUI.castbar.target:SetHeight(pfUI_config.global.font_size * 2)
|
||||
pfUI.castbar.target:SetPoint("TOPRIGHT",pfUI.uf.target,"BOTTOMRIGHT",0,-1)
|
||||
pfUI.castbar.target:SetPoint("TOPLEFT",pfUI.uf.target,"BOTTOMLEFT",0,-1)
|
||||
pfUI.castbar.target:SetPoint("TOPRIGHT",pfUI.uf.target,"BOTTOMRIGHT",0,-default_border*3)
|
||||
pfUI.castbar.target:SetPoint("TOPLEFT",pfUI.uf.target,"BOTTOMLEFT",0,-default_border*3)
|
||||
|
||||
-- statusbar
|
||||
pfUI.castbar.target.bar = CreateFrame("StatusBar", nil, pfUI.castbar.target)
|
||||
pfUI.castbar.target.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.castbar.target.bar:ClearAllPoints()
|
||||
pfUI.castbar.target.bar:SetPoint("TOPLEFT", pfUI.castbar.target, "TOPLEFT", 3, -3)
|
||||
pfUI.castbar.target.bar:SetPoint("BOTTOMRIGHT", pfUI.castbar.target, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.castbar.target.bar:SetAllPoints(pfUI.castbar.target)
|
||||
pfUI.castbar.target.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.castbar.target.bar:SetValue(20)
|
||||
pfUI.castbar.target.bar:SetStatusBarColor(.7,.7,.9,.8)
|
||||
|
||||
+35
-30
@@ -1,4 +1,9 @@
|
||||
pfUI:RegisterModule("chat", function ()
|
||||
local default_border = pfUI_config.appearance.border.default
|
||||
if pfUI_config.appearance.border.chat ~= "-1" then
|
||||
default_border = pfUI_config.appearance.border.chat
|
||||
end
|
||||
|
||||
pfUI.chat = CreateFrame("Frame",nil,UIParent)
|
||||
|
||||
pfUI.chat.left = CreateFrame("Frame", "pfChatLeft", UIParent)
|
||||
@@ -7,16 +12,14 @@ pfUI:RegisterModule("chat", function ()
|
||||
pfUI.chat.left:SetHeight(pfUI_config.chat.left.height)
|
||||
pfUI.chat.left:SetPoint("BOTTOMLEFT", 5,5)
|
||||
pfUI.utils:UpdateMovable(pfUI.chat.left)
|
||||
pfUI.chat.left:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.chat.left:SetBackdropColor(0,0,0,.75)
|
||||
pfUI.utils:CreateBackdrop(pfUI.chat.left, default_border, nil, true)
|
||||
|
||||
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*2)
|
||||
pfUI.chat.left.panelTop:SetPoint("TOPLEFT", pfUI.chat.left, "TOPLEFT", 2, -2)
|
||||
pfUI.chat.left.panelTop:SetPoint("TOPRIGHT", pfUI.chat.left, "TOPRIGHT", -2, -2)
|
||||
pfUI.chat.left.panelTop:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.chat.left.panelTop:SetBackdropColor(0,0,0,.75)
|
||||
pfUI.chat.left.panelTop:SetHeight(pfUI_config.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)
|
||||
pfUI.utils:CreateBackdrop(pfUI.chat.left.panelTop, default_border, nil, true)
|
||||
|
||||
-- whisper forwarding
|
||||
pfUI.chat.left.panelTop.proxy = CreateFrame("Button", "leftChatWhisperProxy", pfUI.chat.left.panelTop)
|
||||
@@ -87,7 +90,7 @@ pfUI:RegisterModule("chat", function ()
|
||||
pfUI.chat.left.panelTop.proxyName:SetPoint("CENTER", 0, 0)
|
||||
pfUI.chat.left.panelTop.proxyName:SetHeight(100)
|
||||
pfUI.chat.left.panelTop.proxyName:SetWidth(200)
|
||||
pfUI.chat.left.panelTop.proxyName:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.chat.left.panelTop.proxyName, default_border)
|
||||
pfUI.chat.left.panelTop.proxyName:SetScript("OnShow", function()
|
||||
pfUI.chat.left.panelTop.proxyName.input:SetText(pfUI.chat.left.panelTop.proxy.forwardto)
|
||||
end)
|
||||
@@ -102,7 +105,7 @@ pfUI:RegisterModule("chat", function ()
|
||||
pfUI.chat.left.panelTop.proxyName.input = CreateFrame("EditBox", nil, pfUI.chat.left.panelTop.proxyName)
|
||||
pfUI.chat.left.panelTop.proxyName.input:SetTextColor(.2,1.1,1)
|
||||
pfUI.chat.left.panelTop.proxyName.input:SetJustifyH("CENTER")
|
||||
pfUI.chat.left.panelTop.proxyName.input:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.chat.left.panelTop.proxyName.input, default_border)
|
||||
pfUI.chat.left.panelTop.proxyName.input:SetPoint("TOPLEFT" , pfUI.chat.left.panelTop.proxyName, "TOPLEFT", 20, -40)
|
||||
pfUI.chat.left.panelTop.proxyName.input:SetPoint("BOTTOMRIGHT" , pfUI.chat.left.panelTop.proxyName, "BOTTOMRIGHT", -20, 40)
|
||||
pfUI.chat.left.panelTop.proxyName.input:SetFontObject(GameFontWhite)
|
||||
@@ -116,7 +119,7 @@ pfUI:RegisterModule("chat", function ()
|
||||
pfUI.chat.left.panelTop.proxyName.okay:SetWidth(80)
|
||||
pfUI.chat.left.panelTop.proxyName.okay:SetHeight(20)
|
||||
pfUI.chat.left.panelTop.proxyName.okay:SetPoint("BOTTOMRIGHT", -10, 10)
|
||||
pfUI.chat.left.panelTop.proxyName.okay:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils: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("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
pfUI.chat.left.panelTop.proxyName.okay.text:ClearAllPoints()
|
||||
@@ -136,7 +139,7 @@ pfUI:RegisterModule("chat", function ()
|
||||
pfUI.chat.left.panelTop.proxyName.abort:SetWidth(80)
|
||||
pfUI.chat.left.panelTop.proxyName.abort:SetHeight(20)
|
||||
pfUI.chat.left.panelTop.proxyName.abort:SetPoint("BOTTOMLEFT", 10, 10)
|
||||
pfUI.chat.left.panelTop.proxyName.abort:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils: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("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
pfUI.chat.left.panelTop.proxyName.abort.text:ClearAllPoints()
|
||||
@@ -157,16 +160,14 @@ pfUI:RegisterModule("chat", function ()
|
||||
pfUI.chat.right:SetHeight(pfUI_config.chat.right.height)
|
||||
pfUI.chat.right:SetPoint("BOTTOMRIGHT", -5,5)
|
||||
pfUI.utils:UpdateMovable(pfUI.chat.right)
|
||||
pfUI.chat.right:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.chat.right:SetBackdropColor(0,0,0,.75)
|
||||
pfUI.utils:CreateBackdrop(pfUI.chat.right, default_border, nil, true)
|
||||
|
||||
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*2)
|
||||
pfUI.chat.right.panelTop:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", 2, -2)
|
||||
pfUI.chat.right.panelTop:SetPoint("TOPRIGHT", pfUI.chat.right, "TOPRIGHT", -2, -2)
|
||||
pfUI.chat.right.panelTop:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.chat.right.panelTop:SetBackdropColor(0,0,0,.75)
|
||||
pfUI.chat.right.panelTop:SetHeight(pfUI_config.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)
|
||||
pfUI.utils:CreateBackdrop(pfUI.chat.right.panelTop, default_border, nil, true)
|
||||
|
||||
pfUI.chat:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
pfUI.chat:RegisterEvent("UI_SCALE_CHANGED")
|
||||
@@ -180,6 +181,8 @@ pfUI:RegisterModule("chat", function ()
|
||||
|
||||
pfUI.chat:SetScript("OnEvent", function()
|
||||
if event == "PLAYER_ENTERING_WORLD" or event == "UI_SCALE_CHANGED" then
|
||||
local panelheight = pfUI_config.global.font_size+default_border*5
|
||||
|
||||
for i,v in ipairs({ChatFrameMenuButton:GetRegions()}) do
|
||||
v:SetAllPoints(ChatFrameMenuButton)
|
||||
local _, class = UnitClass("player")
|
||||
@@ -188,12 +191,12 @@ pfUI:RegisterModule("chat", function ()
|
||||
end
|
||||
|
||||
ChatFrame1:ClearAllPoints()
|
||||
ChatFrame1:SetPoint("TOPLEFT", pfUI.chat.left ,"TOPLEFT", 5, -25)
|
||||
ChatFrame1:SetPoint("BOTTOMRIGHT", pfUI.chat.left ,"BOTTOMRIGHT", -5, 25)
|
||||
ChatFrame1:SetPoint("TOPLEFT", pfUI.chat.left ,"TOPLEFT", default_border, -panelheight)
|
||||
ChatFrame1:SetPoint("BOTTOMRIGHT", pfUI.chat.left ,"BOTTOMRIGHT", -default_border, panelheight)
|
||||
|
||||
ChatFrame3:ClearAllPoints()
|
||||
ChatFrame3:SetPoint("TOPLEFT", pfUI.chat.right ,"TOPLEFT", 5, -25)
|
||||
ChatFrame3:SetPoint("BOTTOMRIGHT", pfUI.chat.right ,"BOTTOMRIGHT", -5, 25)
|
||||
ChatFrame3:SetPoint("TOPLEFT", pfUI.chat.right ,"TOPLEFT", default_border, -panelheight)
|
||||
ChatFrame3:SetPoint("BOTTOMRIGHT", pfUI.chat.right ,"BOTTOMRIGHT", -default_border, panelheight)
|
||||
|
||||
if not pfUI_init["chat"] then
|
||||
pfUI.chat.SetupPositions()
|
||||
@@ -204,6 +207,7 @@ pfUI:RegisterModule("chat", function ()
|
||||
for i=1, NUM_CHAT_WINDOWS do
|
||||
for j,v in ipairs({getglobal("ChatFrame" .. i .. "Tab"):GetRegions()}) do
|
||||
if j==5 then v:SetTexture(0,0,0,0) end
|
||||
v:SetHeight(pfUI_config.global.font_size+default_border*2)
|
||||
end
|
||||
|
||||
getglobal("ChatFrame" .. i .. "ResizeBottom"):Hide()
|
||||
@@ -218,8 +222,9 @@ pfUI:RegisterModule("chat", function ()
|
||||
getglobal("ChatFrame" .. i .. "Tab"):SetParent(pfUI.chat.left.panelTop)
|
||||
getglobal("ChatFrame" .. i):SetParent(pfUI.chat.left)
|
||||
end
|
||||
|
||||
getglobal("ChatFrame" .. i .. "TabText"):SetJustifyV("TOP")
|
||||
getglobal("ChatFrame" .. i .. "TabText"):SetJustifyV("CENTER")
|
||||
getglobal("ChatFrame" .. i .. "TabText"):SetHeight(pfUI_config.global.font_size+default_border*2)
|
||||
getglobal("ChatFrame" .. i .. "TabText"):SetPoint("BOTTOM", 0, default_border)
|
||||
getglobal("ChatFrame" .. i .. "TabLeft"):SetAlpha(0)
|
||||
getglobal("ChatFrame" .. i .. "TabMiddle"):SetAlpha(0)
|
||||
getglobal("ChatFrame" .. i .. "TabRight"):SetAlpha(0)
|
||||
@@ -460,19 +465,19 @@ pfUI:RegisterModule("chat", function ()
|
||||
pfUI.chat.editbox:SetHeight(pfUI_config.chat.text.input_height)
|
||||
end
|
||||
|
||||
pfUI.chat.editbox:ClearAllPoints()
|
||||
pfUI.chat.editbox:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, default_border*4)
|
||||
pfUI.utils:UpdateMovable(pfUI.chat.editbox)
|
||||
|
||||
if pfUI_config.chat.text.input_width == "0" then
|
||||
pfUI.chat.editbox:SetWidth(pfUI_config.bars.border*3 + pfUI_config.bars.icon_size * 12 + pfUI_config.bars.border * 12) -- actionbar size
|
||||
pfUI.chat.editbox:SetWidth(default_border*3 + pfUI_config.bars.icon_size * 12 + default_border * 12) -- actionbar size
|
||||
else
|
||||
pfUI.chat.editbox:SetWidth(pfUI_config.chat.text.input_width)
|
||||
end
|
||||
|
||||
pfUI.chat.editbox:ClearAllPoints()
|
||||
pfUI.chat.editbox:SetPoint("BOTTOM", pfUI.bars.bottom, "TOP", 0, 5)
|
||||
pfUI.utils:UpdateMovable(pfUI.chat.editbox)
|
||||
|
||||
ChatFrameEditBox:SetParent(pfUI.chat.editbox)
|
||||
ChatFrameEditBox:SetBackdrop(pfUI.backdrop)
|
||||
ChatFrameEditBox:SetAllPoints(pfUI.chat.editbox)
|
||||
pfUI.utils:CreateBackdrop(ChatFrameEditBox, default_border)
|
||||
|
||||
for i,v in ipairs({ChatFrameEditBox:GetRegions()}) do
|
||||
if i==6 or i==7 or i==8 then v:Hide() end
|
||||
|
||||
+19
-4
@@ -8,29 +8,44 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("global", nil, "font_square", "homespun")
|
||||
pfUI:UpdateConfig("global", nil, "font_combat", "diediedie")
|
||||
pfUI:UpdateConfig("global", nil, "cooldown_min", "2")
|
||||
pfUI:UpdateConfig("appearance", "border", "background", "0, 0, 0, 1")
|
||||
pfUI:UpdateConfig("appearance", "border", "color", "0.3, 0.3, 0.3, 1")
|
||||
pfUI:UpdateConfig("appearance", "border", "default", "3")
|
||||
pfUI:UpdateConfig("appearance", "border", "actionbars", "-1")
|
||||
pfUI:UpdateConfig("appearance", "border", "unitframes", "-1")
|
||||
pfUI:UpdateConfig("appearance", "border", "groupframes", "-1")
|
||||
pfUI:UpdateConfig("appearance", "border", "raidframes", "-1")
|
||||
pfUI:UpdateConfig("appearance", "border", "panels", "-1")
|
||||
pfUI:UpdateConfig("appearance", "border", "chat", "-1")
|
||||
pfUI:UpdateConfig("appearance", "border", "bags", "-1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "disable", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "animation_speed", "5")
|
||||
pfUI:UpdateConfig("unitframes", nil, "portrait", "1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "buff_size", "22")
|
||||
pfUI:UpdateConfig("unitframes", nil, "debuff_size", "22")
|
||||
pfUI:UpdateConfig("unitframes", nil, "buff_size", "20")
|
||||
pfUI:UpdateConfig("unitframes", nil, "debuff_size", "20")
|
||||
pfUI:UpdateConfig("unitframes", nil, "layout", "default")
|
||||
pfUI:UpdateConfig("unitframes", "player", "width", "200")
|
||||
pfUI:UpdateConfig("unitframes", "player", "height", "50")
|
||||
pfUI:UpdateConfig("unitframes", "player", "pheight", "10")
|
||||
pfUI:UpdateConfig("unitframes", "player", "pspace", "-3")
|
||||
pfUI:UpdateConfig("unitframes", "player", "showPVPMinimap", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "showPVP", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "width", "200")
|
||||
pfUI:UpdateConfig("unitframes", "target", "height", "50")
|
||||
pfUI:UpdateConfig("unitframes", "target", "pheight", "10")
|
||||
pfUI:UpdateConfig("unitframes", "target", "pspace", "-3")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "pspace", "-3")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "pspace", "-3")
|
||||
pfUI:UpdateConfig("unitframes", "group", "hide_in_raid", "0")
|
||||
pfUI:UpdateConfig("unitframes", "group", "pspace", "-3")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "invert_healthbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "pspace", "-3")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "show_missing", "0")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "clickcast", "")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "clickcast_shift", "")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "clickcast_alt", "")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "clickcast_ctrl", "")
|
||||
pfUI:UpdateConfig("bars", nil, "icon_size", "22")
|
||||
pfUI:UpdateConfig("bars", nil, "border", "2")
|
||||
pfUI:UpdateConfig("bars", nil, "icon_size", "18")
|
||||
pfUI:UpdateConfig("panel", "left", "left", "guild")
|
||||
pfUI:UpdateConfig("panel", "left", "center", "durability")
|
||||
pfUI:UpdateConfig("panel", "left", "right", "friends")
|
||||
|
||||
+15
-20
@@ -2,6 +2,11 @@ pfUI:RegisterModule("group", function ()
|
||||
-- do not go further on disabled UFs
|
||||
if pfUI_config.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
|
||||
end
|
||||
|
||||
-- hide blizzard group frames
|
||||
for i=1, 4 do
|
||||
if getglobal("PartyMemberFrame" .. i) then
|
||||
@@ -79,43 +84,33 @@ pfUI:RegisterModule("group", function ()
|
||||
pfUI.uf.group[i] = CreateFrame("Button","pfGroup" .. i,UIParent)
|
||||
|
||||
pfUI.uf.group[i]:SetWidth(175)
|
||||
pfUI.uf.group[i]:SetHeight(40)
|
||||
pfUI.uf.group[i]:SetHeight(40 + 2*default_border + pfUI_config.unitframes.group.pspace)
|
||||
pfUI.uf.group[i]:SetPoint("TOPLEFT", 5, -5 - ((i-1)*55))
|
||||
pfUI.utils:UpdateMovable(pfUI.uf.group[i])
|
||||
pfUI.uf.group[i]:Hide()
|
||||
pfUI.uf.group[i].id = i
|
||||
|
||||
pfUI.uf.group[i].hp = CreateFrame("Frame",nil, pfUI.uf.group[i])
|
||||
pfUI.uf.group[i].hp:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.group[i].hp:SetWidth(175)
|
||||
pfUI.uf.group[i].hp:SetHeight(30)
|
||||
pfUI.uf.group[i].hp:SetPoint("TOPLEFT",pfUI.uf.group[i],"TOPLEFT")
|
||||
pfUI.uf.group[i].hp:SetPoint("TOPRIGHT",pfUI.uf.group[i],"TOPRIGHT")
|
||||
pfUI.uf.group[i].hp:SetPoint("TOP", 0, 0)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.group[i].hp, default_border)
|
||||
|
||||
pfUI.uf.group[i].hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.group[i].hp)
|
||||
pfUI.uf.group[i].hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
pfUI.uf.group[i].hp.bar:ClearAllPoints()
|
||||
pfUI.uf.group[i].hp.bar:SetPoint("TOPLEFT", pfUI.uf.group[i].hp, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.group[i].hp.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.group[i].hp, "BOTTOMRIGHT", -3, 3)
|
||||
|
||||
pfUI.uf.group[i].hp.bar:SetStatusBarColor(0,1,0)
|
||||
pfUI.uf.group[i].hp.bar:SetAllPoints(pfUI.uf.group[i].hp)
|
||||
pfUI.uf.group[i].hp.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.group[i].hp.bar:SetValue(i*10)
|
||||
|
||||
pfUI.uf.group[i].power = CreateFrame("Frame",nil, pfUI.uf.group[i])
|
||||
pfUI.uf.group[i].power:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.group[i].power:SetPoint("TOPLEFT",pfUI.uf.group[i].hp,"BOTTOMLEFT",0,3)
|
||||
pfUI.uf.group[i].power:SetPoint("BOTTOMRIGHT",pfUI.uf.group[i],"BOTTOMRIGHT",0,0)
|
||||
pfUI.uf.group[i].power:SetWidth(175)
|
||||
pfUI.uf.group[i].power:SetHeight(10)
|
||||
pfUI.uf.group[i].power:SetPoint("BOTTOM", 0, 0)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.group[i].power, default_border)
|
||||
|
||||
pfUI.uf.group[i].power.bar = CreateFrame("StatusBar", nil, pfUI.uf.group[i].power)
|
||||
pfUI.uf.group[i].power.bar:ClearAllPoints()
|
||||
pfUI.uf.group[i].power.bar:SetPoint("TOPLEFT", pfUI.uf.group[i].power, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.group[i].power.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.group[i].power, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.uf.group[i].power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
pfUI.uf.group[i].power.bar:SetStatusBarColor(1,0,0)
|
||||
pfUI.uf.group[i].power.bar:SetAllPoints(pfUI.uf.group[i].power)
|
||||
pfUI.uf.group[i].power.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.group[i].power.bar:SetValue(i*20)
|
||||
|
||||
pfUI.uf.group[i].caption = pfUI.uf.group[i]:CreateFontString("Status", "HIGH", "GameFontNormal")
|
||||
pfUI.uf.group[i].caption:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
|
||||
+59
-49
@@ -1,15 +1,16 @@
|
||||
pfUI:RegisterModule("gui", function ()
|
||||
local default_border = tonumber(pfUI_config.appearance.border.default)
|
||||
|
||||
pfUI.gui = CreateFrame("Frame",nil,UIParent)
|
||||
|
||||
pfUI.gui:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
|
||||
pfUI.gui:SetFrameStrata("DIALOG")
|
||||
pfUI.gui:SetWidth(480)
|
||||
pfUI.gui:SetHeight(360)
|
||||
pfUI.gui:SetWidth(500)
|
||||
pfUI.gui:SetHeight(500)
|
||||
pfUI.gui:Hide()
|
||||
|
||||
pfUI.gui:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.gui:SetBackdropColor(0,0,0,.75)
|
||||
pfUI.utils:CreateBackdrop(pfUI.gui, nil, nil, true)
|
||||
pfUI.gui:SetPoint("CENTER",0,0)
|
||||
pfUI.gui:SetMovable(true)
|
||||
pfUI.gui:EnableMouse(true)
|
||||
@@ -49,7 +50,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui.reloadDialog:Hide()
|
||||
tinsert(UISpecialFrames, "pfReloadDiag")
|
||||
|
||||
pfUI.gui.reloadDialog:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.gui.reloadDialog)
|
||||
pfUI.gui.reloadDialog:SetPoint("CENTER",0,0)
|
||||
|
||||
pfUI.gui.reloadDialog.text = pfUI.gui.reloadDialog:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||
@@ -58,7 +59,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui.reloadDialog.text:SetText("Some settings need to reload the UI to take effect.\nDo you want to reloadUI now?")
|
||||
|
||||
pfUI.gui.reloadDialog.yes = CreateFrame("Button", "pfReloadYes", pfUI.gui.reloadDialog, "UIPanelButtonTemplate")
|
||||
pfUI.gui.reloadDialog.yes:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.gui.reloadDialog.yes, nil, true)
|
||||
pfUI.gui.reloadDialog.yes:SetWidth(100)
|
||||
pfUI.gui.reloadDialog.yes:SetHeight(20)
|
||||
pfUI.gui.reloadDialog.yes:SetPoint("BOTTOMLEFT", 20,15)
|
||||
@@ -156,9 +157,8 @@ pfUI:RegisterModule("gui", function ()
|
||||
frame.drag = CreateFrame("Frame", nil, frame)
|
||||
frame.drag:SetAllPoints(frame)
|
||||
frame.drag:SetFrameStrata("DIALOG")
|
||||
frame.drag:SetBackdrop(pfUI.backdrop_col)
|
||||
frame.drag:SetBackdropBorderColor(.2, 1, .8)
|
||||
frame.drag:SetBackdropColor(1,1,1,.75)
|
||||
pfUI.utils:CreateBackdrop(frame.drag, nil, nil, true)
|
||||
frame.drag.backdrop:SetBackdropBorderColor(.2, 1, .8)
|
||||
frame.drag:EnableMouseWheel(1)
|
||||
frame.drag.text = frame.drag:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||
frame.drag.text:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
@@ -199,7 +199,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
local cframe = getglobal("pfRaid" .. i)
|
||||
cframe:StartMoving()
|
||||
cframe:StopMovingOrSizing()
|
||||
cframe.drag:SetBackdropBorderColor(1,1,1,1)
|
||||
cframe.drag.backdrop:SetBackdropBorderColor(1,1,1,1)
|
||||
end
|
||||
end
|
||||
if strsub(frame:GetName(),0,7) == "pfGroup" then
|
||||
@@ -207,7 +207,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
local cframe = getglobal("pfGroup" .. i)
|
||||
cframe:StartMoving()
|
||||
cframe:StopMovingOrSizing()
|
||||
cframe.drag:SetBackdropBorderColor(1,1,1,1)
|
||||
cframe.drag.backdrop:SetBackdropBorderColor(1,1,1,1)
|
||||
end
|
||||
end
|
||||
_, _, _, xpos, ypos = frame:GetPoint()
|
||||
@@ -215,14 +215,14 @@ pfUI:RegisterModule("gui", function ()
|
||||
else
|
||||
frame.oldPos = nil
|
||||
end
|
||||
frame.drag:SetBackdropBorderColor(1,1,1,1)
|
||||
frame.drag.backdrop:SetBackdropBorderColor(1,1,1,1)
|
||||
frame:StartMoving()
|
||||
end)
|
||||
|
||||
frame.drag:SetScript("OnMouseUp",function()
|
||||
frame:StopMovingOrSizing()
|
||||
_, _, _, xpos, ypos = frame:GetPoint()
|
||||
frame.drag:SetBackdropBorderColor(.2,1,.8,1)
|
||||
frame.drag.backdrop:SetBackdropBorderColor(.2,1,.8,1)
|
||||
|
||||
if frame.oldPos then
|
||||
local diffxpos = frame.oldPos[1] - xpos
|
||||
@@ -231,7 +231,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
if strsub(frame:GetName(),0,6) == "pfRaid" then
|
||||
for i=1,40 do
|
||||
local cframe = getglobal("pfRaid" .. i)
|
||||
cframe.drag:SetBackdropBorderColor(.2,1,.8,1)
|
||||
cframe.drag.backdrop:SetBackdropBorderColor(.2,1,.8,1)
|
||||
if cframe:GetName() ~= frame:GetName() then
|
||||
local _, _, _, xpos, ypos = cframe:GetPoint()
|
||||
cframe:SetPoint("TOPLEFT", xpos - diffxpos, ypos - diffypos)
|
||||
@@ -249,7 +249,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
elseif strsub(frame:GetName(),0,7) == "pfGroup" then
|
||||
for i=1,4 do
|
||||
local cframe = getglobal("pfGroup" .. i)
|
||||
cframe.drag:SetBackdropBorderColor(.2,1,.8,1)
|
||||
cframe.drag.backdrop:SetBackdropBorderColor(.2,1,.8,1)
|
||||
if cframe:GetName() ~= frame:GetName() then
|
||||
local _, _, _, xpos, ypos = cframe:GetPoint()
|
||||
cframe:SetPoint("TOPLEFT", xpos - diffxpos, ypos - diffypos)
|
||||
@@ -293,18 +293,20 @@ pfUI:RegisterModule("gui", function ()
|
||||
end
|
||||
|
||||
function pfUI.gui:SwitchTab(frame)
|
||||
local elements = { pfUI.gui.global, pfUI.gui.modules, pfUI.gui.uf , pfUI.gui.bar, pfUI.gui.panel,
|
||||
pfUI.gui.tooltip, pfUI.gui.castbar, pfUI.gui.thirdparty, pfUI.gui.chat, pfUI.gui.nameplates }
|
||||
local elements = {
|
||||
pfUI.gui.global, pfUI.gui.appearance, pfUI.gui.modules, pfUI.gui.uf,
|
||||
pfUI.gui.bar, pfUI.gui.panel, pfUI.gui.tooltip, pfUI.gui.castbar,
|
||||
pfUI.gui.thirdparty, pfUI.gui.chat, pfUI.gui.nameplates,
|
||||
}
|
||||
|
||||
for _, hide in pairs(elements) do
|
||||
hide:Hide()
|
||||
hide.switch:SetBackdropBorderColor(1,1,1)
|
||||
hide.switch:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(hide.switch, nil, true)
|
||||
end
|
||||
pfUI.gui.scroll:SetScrollChild(frame)
|
||||
pfUI.gui.scroll:UpdateScrollState()
|
||||
pfUI.gui.scroll:SetVerticalScroll(0)
|
||||
frame.switch:SetBackdrop(pfUI.backdrop_col)
|
||||
pfUI.utils:CreateBackdrop(frame.switch, nil, true)
|
||||
frame.switch:SetBackdropBorderColor(.2,1,.8)
|
||||
frame:Show()
|
||||
end
|
||||
@@ -326,23 +328,22 @@ pfUI:RegisterModule("gui", function ()
|
||||
end
|
||||
|
||||
local frame = CreateFrame("Frame", nil, pfUI.gui)
|
||||
frame:SetWidth(400)
|
||||
frame:SetWidth(pfUI.gui:GetWidth() - 3*default_border - 100)
|
||||
frame:SetHeight(100)
|
||||
|
||||
frame.switch = CreateFrame("Button", nil, pfUI.gui)
|
||||
frame.switch:ClearAllPoints()
|
||||
frame.switch:SetWidth(80)
|
||||
frame.switch:SetHeight(20)
|
||||
frame.switch:SetWidth(100)
|
||||
frame.switch:SetHeight(22)
|
||||
|
||||
if bottom then
|
||||
frame.switch:SetPoint("BOTTOMLEFT", 0, pfUI.gui.tabBottom * 20)
|
||||
frame.switch:SetPoint("BOTTOMLEFT", default_border, pfUI.gui.tabBottom * (22 + default_border) + default_border)
|
||||
else
|
||||
frame.switch:SetPoint("TOPLEFT", 0, -pfUI.gui.tabTop * 20)
|
||||
frame.switch:SetPoint("TOPLEFT", default_border, -pfUI.gui.tabTop* (22 + default_border) -default_border)
|
||||
end
|
||||
frame.switch:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(frame.switch, nil, true)
|
||||
frame.switch.text = frame.switch:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||
frame.switch.text:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
frame.switch.text:ClearAllPoints()
|
||||
frame.switch.text:SetAllPoints(frame.switch)
|
||||
frame.switch.text:SetPoint("CENTER", 0, 0)
|
||||
frame.switch.text:SetFontObject(GameFontWhite)
|
||||
@@ -397,7 +398,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
frame.config = config
|
||||
|
||||
if widget == "warning" then
|
||||
frame:SetBackdrop(pfUI.backdrop_col)
|
||||
pfUI.utils:CreateBackdrop(frame, nil, true)
|
||||
frame:SetBackdropBorderColor(1,.5,.5)
|
||||
frame:SetHeight(50)
|
||||
frame:SetPoint("TOPLEFT", 25, parent.objectCount * -35)
|
||||
@@ -436,7 +437,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
frame.input:SetNormalTexture("")
|
||||
frame.input:SetPushedTexture("")
|
||||
frame.input:SetHighlightTexture("")
|
||||
frame.input:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(frame.input, nil, true)
|
||||
frame.input:SetWidth(14)
|
||||
frame.input:SetHeight(14)
|
||||
frame.input:SetPoint("TOPRIGHT" , 0, -4)
|
||||
@@ -491,7 +492,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
for i,v in ipairs({frame.input:GetRegions()}) do
|
||||
if v.SetTexture then v:Hide() end
|
||||
if v.SetTextColor then v:SetTextColor(.2,1,.8) end
|
||||
if v.SetBackdrop then v:SetBackdrop(pfUI.backdrop) end
|
||||
if v.SetBackdrop then pfUI.utils:CreateBackdrop(v) end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -501,15 +502,14 @@ pfUI:RegisterModule("gui", function ()
|
||||
-- [[ config section ]] --
|
||||
pfUI.gui.deco = CreateFrame("Frame", nil, pfUI.gui)
|
||||
pfUI.gui.deco:ClearAllPoints()
|
||||
pfUI.gui.deco:SetPoint("TOPLEFT", pfUI.gui, "TOPLEFT", 80,0)
|
||||
pfUI.gui.deco:SetPoint("BOTTOMRIGHT", pfUI.gui, "BOTTOMRIGHT", 0,0)
|
||||
pfUI.gui.deco:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.gui.deco:SetBackdropColor(0,0,0,.50)
|
||||
pfUI.gui.deco:SetPoint("TOPLEFT", pfUI.gui, "TOPLEFT", 4*default_border + 100,-2*default_border)
|
||||
pfUI.gui.deco:SetPoint("BOTTOMRIGHT", pfUI.gui, "BOTTOMRIGHT", -2*default_border,2*default_border)
|
||||
pfUI.utils:CreateBackdrop(pfUI.gui.deco, nil, nil, true)
|
||||
|
||||
pfUI.gui.deco.up = CreateFrame("Frame", nil, pfUI.gui.deco)
|
||||
pfUI.gui.deco.up:SetPoint("TOPRIGHT", 0,0)
|
||||
pfUI.gui.deco.up:SetPoint("TOPLEFT", pfUI.gui.deco, "TOPLEFT", 0,0)
|
||||
pfUI.gui.deco.up:SetPoint("TOPRIGHT", pfUI.gui.deco, "TOPRIGHT", 0,0)
|
||||
pfUI.gui.deco.up:SetHeight(16)
|
||||
pfUI.gui.deco.up:SetWidth(400)
|
||||
pfUI.gui.deco.up:SetAlpha(0)
|
||||
pfUI.gui.deco.up.visible = 0
|
||||
pfUI.gui.deco.up.texture = pfUI.gui.deco.up:CreateTexture()
|
||||
@@ -523,16 +523,12 @@ pfUI:RegisterModule("gui", function ()
|
||||
elseif pfUI.gui.deco.up.visible == 0 and pfUI.gui.deco.up:GetAlpha() <= 0 then
|
||||
pfUI.gui.deco.up:Hide()
|
||||
end
|
||||
|
||||
if pfUI.gui.deco.up.visible == 1 and pfUI.gui.deco.up:GetAlpha() > .15 then
|
||||
pfUI.gui.deco.up:SetAlpha(pfUI.gui.deco.up:GetAlpha() - 0.01)
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.gui.deco.down = CreateFrame("Frame", nil, pfUI.gui.deco)
|
||||
pfUI.gui.deco.down:SetPoint("BOTTOMRIGHT", 0,0)
|
||||
pfUI.gui.deco.down:SetPoint("BOTTOMLEFT", pfUI.gui.deco, "BOTTOMLEFT", 0,0)
|
||||
pfUI.gui.deco.down:SetPoint("BOTTOMRIGHT", pfUI.gui.deco, "BOTTOMRIGHT", 0,0)
|
||||
pfUI.gui.deco.down:SetHeight(16)
|
||||
pfUI.gui.deco.down:SetWidth(400)
|
||||
pfUI.gui.deco.down:SetAlpha(0)
|
||||
pfUI.gui.deco.down.visible = 0
|
||||
pfUI.gui.deco.down.texture = pfUI.gui.deco.down:CreateTexture()
|
||||
@@ -546,16 +542,12 @@ pfUI:RegisterModule("gui", function ()
|
||||
elseif pfUI.gui.deco.down.visible == 0 and pfUI.gui.deco.down:GetAlpha() <= 0 then
|
||||
pfUI.gui.deco.down:Hide()
|
||||
end
|
||||
|
||||
if pfUI.gui.deco.down.visible == 1 and pfUI.gui.deco.down:GetAlpha() > .15 then
|
||||
pfUI.gui.deco.down:SetAlpha(pfUI.gui.deco.down:GetAlpha() - 0.01)
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.gui.scroll = CreateFrame("ScrollFrame", nil, pfUI.gui)
|
||||
pfUI.gui.scroll:ClearAllPoints()
|
||||
pfUI.gui.scroll:SetPoint("TOPLEFT", pfUI.gui, "TOPLEFT", 80,-10)
|
||||
pfUI.gui.scroll:SetPoint("BOTTOMRIGHT", pfUI.gui, "BOTTOMRIGHT", 0,10)
|
||||
pfUI.gui.scroll:SetPoint("TOPLEFT", pfUI.gui, "TOPLEFT", 2*default_border + 100,-10)
|
||||
pfUI.gui.scroll:SetPoint("BOTTOMRIGHT", pfUI.gui, "BOTTOMRIGHT", -default_border,10)
|
||||
pfUI.gui.scroll:EnableMouseWheel(1)
|
||||
function pfUI.gui.scroll:UpdateScrollState()
|
||||
local current = ceil(pfUI.gui.scroll:GetVerticalScroll())
|
||||
@@ -612,6 +604,19 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.global, "Combat Font", pfUI_config.global, "font_combat", "dropdown", values)
|
||||
pfUI.gui:CreateConfig(pfUI.gui.global, "Minimal Cooldown duration (seconds)", pfUI_config.global, "cooldown_min")
|
||||
|
||||
-- appearance
|
||||
pfUI.gui.appearance = pfUI.gui:CreateConfigTab("Appearance")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Background Color", pfUI_config.appearance.border, "background")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Border Color", pfUI_config.appearance.border, "color")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Default Bordersize", pfUI_config.appearance.border, "default")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Actionbar Bordersize", pfUI_config.appearance.border, "actionbars")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "UnitFrame Bordersize", pfUI_config.appearance.border, "unitframes")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "GroupFrame Bordersize", pfUI_config.appearance.border, "groupframes")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "RaidFrame Bordersize", pfUI_config.appearance.border, "raidframes")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Panel Bordersize", pfUI_config.appearance.border, "panels")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Chat Bordersize", pfUI_config.appearance.border, "chat")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.appearance, "Bags Bordersize", pfUI_config.appearance.border, "bags")
|
||||
|
||||
-- modules
|
||||
pfUI.gui.modules = pfUI.gui:CreateConfigTab("Modules")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.modules, "|cffff5555Warning:\n|cffffaaaa Disabling modules is highly experimental.\nDo not disable modules if you don't know how to fix errors.|r", nil, nil, "warning")
|
||||
@@ -633,12 +638,18 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Player width", pfUI_config.unitframes.player, "width")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Player height", pfUI_config.unitframes.player, "height")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Player powerbar height", pfUI_config.unitframes.player, "pheight")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Player powerbar spacing", pfUI_config.unitframes.player, "pspace")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show 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, "Target width", pfUI_config.unitframes.target, "width")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Target height", pfUI_config.unitframes.target, "height")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Target powerbar height", pfUI_config.unitframes.target, "pheight")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Target powerbar spacing", pfUI_config.unitframes.target, "pspace")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "TargetTarget powerbar spacing", pfUI_config.unitframes.ttarget, "pspace")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Pet powerbar spacing", pfUI_config.unitframes.pet, "pspace")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Group powerbar spacing", pfUI_config.unitframes.group, "pspace")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Hide group while in raid", pfUI_config.unitframes.group, "hide_in_raid", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Raid powerbar spacing", pfUI_config.unitframes.raid, "pspace")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Invert Raid-healthbar", pfUI_config.unitframes.raid, "invert_healthbar", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Show missing HP on raidframes", pfUI_config.unitframes.raid, "show_missing", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.uf, "Click-cast on Raidframe", pfUI_config.unitframes.raid, "clickcast")
|
||||
@@ -649,7 +660,6 @@ pfUI:RegisterModule("gui", function ()
|
||||
-- actionbar
|
||||
pfUI.gui.bar = pfUI.gui:CreateConfigTab("ActionBar")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Icon Size", pfUI_config.bars, "icon_size")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.bar, "Border", pfUI_config.bars, "border")
|
||||
|
||||
-- panels
|
||||
pfUI.gui.panel = pfUI.gui:CreateConfigTab("Panel")
|
||||
|
||||
+15
-17
@@ -8,16 +8,16 @@ pfUI:RegisterModule("loot", function ()
|
||||
pfUI.loot:RegisterEvent("OPEN_MASTER_LOOT_LIST")
|
||||
pfUI.loot:RegisterEvent("UPDATE_MASTER_LOOT_LIST")
|
||||
|
||||
pfUI.loot:SetWidth(160+pfUI_config.bars.border*2)
|
||||
pfUI.loot:SetWidth(160+pfUI_config.appearance.border.default*2)
|
||||
pfUI.loot.slots = {}
|
||||
function pfUI.loot:CreateSlot(id)
|
||||
local frame = CreateFrame("LootButton", 'pfLootButton'..id, pfUI.loot)
|
||||
frame:SetPoint("LEFT", pfUI_config.bars.border*2, 0)
|
||||
frame:SetPoint("RIGHT", -pfUI_config.bars.border*2, 0)
|
||||
frame:SetPoint("LEFT", pfUI_config.appearance.border.default*2, 0)
|
||||
frame:SetPoint("RIGHT", -pfUI_config.appearance.border.default*2, 0)
|
||||
frame:SetHeight(22)
|
||||
frame:SetID(id)
|
||||
frame:SetSlot(id)
|
||||
frame:SetPoint("TOP", pfUI.loot, 4, (-pfUI_config.bars.border*2+22)-(id*22))
|
||||
frame:SetPoint("TOP", pfUI.loot, 4, (-pfUI_config.appearance.border.default*2+22)-(id*22))
|
||||
|
||||
frame:SetScript("OnClick", function()
|
||||
if ( IsControlKeyDown() ) then
|
||||
@@ -56,16 +56,15 @@ pfUI:RegisterModule("loot", function ()
|
||||
end)
|
||||
|
||||
frame.ficon = CreateFrame("Frame", "pfLootButtonIcon", frame)
|
||||
frame.ficon:SetHeight(22)
|
||||
frame.ficon:SetWidth(22)
|
||||
frame.ficon:SetHeight(frame:GetHeight() - 2*pfUI_config.appearance.border.default)
|
||||
frame.ficon:SetWidth(frame:GetHeight() - 2*pfUI_config.appearance.border.default)
|
||||
frame.ficon:ClearAllPoints()
|
||||
frame.ficon:SetPoint("RIGHT", frame)
|
||||
frame.ficon:SetBackdrop(pfUI.backdrop_col)
|
||||
pfUI.utils:CreateBackdrop(frame.ficon)
|
||||
|
||||
frame.icon = frame.ficon:CreateTexture(nil, "ARTWORK")
|
||||
frame.icon:SetTexCoord(.07, .93, .07, .93)
|
||||
frame.icon:SetPoint("TOPLEFT", frame.ficon, "TOPLEFT", 2, -2)
|
||||
frame.icon:SetPoint("BOTTOMRIGHT", frame.ficon, "BOTTOMRIGHT", -2, 2)
|
||||
frame.icon:SetAllPoints(frame.ficon)
|
||||
|
||||
frame.count = frame.ficon:CreateFontString(nil, "OVERLAY")
|
||||
frame.count:ClearAllPoints()
|
||||
@@ -149,10 +148,10 @@ pfUI:RegisterModule("loot", function ()
|
||||
|
||||
if(quality > 1) then
|
||||
slot.rarity:SetVertexColor(color.r, color.g, color.b)
|
||||
slot.ficon:SetBackdropBorderColor(color.r, color.g, color.b)
|
||||
slot.ficon.backdrop:SetBackdropBorderColor(color.r, color.g, color.b)
|
||||
slot.rarity:Show()
|
||||
else
|
||||
slot.ficon:SetBackdropBorderColor(.5,.5,.5)
|
||||
slot.ficon.backdrop:SetBackdropBorderColor(.3,.3,.3)
|
||||
slot.rarity:Hide()
|
||||
end
|
||||
|
||||
@@ -169,14 +168,13 @@ pfUI:RegisterModule("loot", function ()
|
||||
end
|
||||
local color = ITEM_QUALITY_COLORS[maxrarity]
|
||||
if maxrarity <= 1 then
|
||||
this:SetBackdrop(pfUI.backdrop)
|
||||
this:SetBackdropBorderColor(1, 1, 1)
|
||||
pfUI.utils:CreateBackdrop(this)
|
||||
else
|
||||
this:SetBackdrop(pfUI.backdrop_col)
|
||||
this:SetBackdropBorderColor(color.r, color.g, color.b, 1)
|
||||
pfUI.utils:CreateBackdrop(this)
|
||||
this.backdrop:SetBackdropBorderColor(color.r, color.g, color.b, 1)
|
||||
end
|
||||
this:SetHeight(math.max((items*22)+4*pfUI_config.bars.border), 20)
|
||||
this:SetWidth(maxwidth + 22 + 8*pfUI_config.bars.border )
|
||||
this:SetHeight(math.max((items*22)+4*pfUI_config.appearance.border.default), 20)
|
||||
this:SetWidth(maxwidth + 22 + 8*pfUI_config.appearance.border.default )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+4
-6
@@ -15,18 +15,16 @@ pfUI:RegisterModule("minimap", function ()
|
||||
end)
|
||||
|
||||
pfUI.minimap = CreateFrame("Frame","pfMinimap",UIParent)
|
||||
pfUI.minimap:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.minimap:SetBackdropColor(0,0,0,0)
|
||||
pfUI.utils:CreateBackdrop(pfUI.minimap)
|
||||
pfUI.minimap:SetPoint("TOPRIGHT", UIParent, -5, -5)
|
||||
pfUI.utils:UpdateMovable(pfUI.minimap)
|
||||
pfUI.minimap:SetWidth(Minimap:GetWidth() + 5)
|
||||
pfUI.minimap:SetHeight(Minimap:GetHeight() + 5)
|
||||
pfUI.minimap:SetWidth(Minimap:GetWidth())
|
||||
pfUI.minimap:SetHeight(Minimap:GetHeight())
|
||||
pfUI.minimap:SetFrameStrata("BACKGROUND")
|
||||
|
||||
Minimap:SetParent(pfUI.minimap)
|
||||
Minimap:ClearAllPoints()
|
||||
Minimap:SetPoint("TOPLEFT", pfUI.minimap, "TOPLEFT", 3, -3)
|
||||
Minimap:SetPoint("BOTTOMRIGHT", pfUI.minimap, "BOTTOMRIGHT", -2, 2)
|
||||
Minimap:SetAllPoints(pfUI.minimap)
|
||||
|
||||
-- Set new mail frame position to top right corner of the minimap
|
||||
-- mostly taken from TukUI
|
||||
|
||||
+22
-20
@@ -1,4 +1,9 @@
|
||||
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
|
||||
end
|
||||
|
||||
pfUI.panel = CreateFrame("Frame",nil,UIParent)
|
||||
pfUI.panel:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
pfUI.panel:RegisterEvent("PLAYER_MONEY")
|
||||
@@ -345,23 +350,22 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel.left:SetScale(pfUI.chat.left:GetScale())
|
||||
pfUI.panel.left:SetFrameStrata("HIGH")
|
||||
pfUI.panel.left:ClearAllPoints()
|
||||
pfUI.panel.left:SetHeight(pfUI_config.global.font_size*2)
|
||||
pfUI.panel.left:SetHeight(pfUI_config.global.font_size+default_border*2)
|
||||
pfUI.panel.left:SetPoint("BOTTOMLEFT", pfUI.chat.left, "BOTTOMLEFT", 2, 2)
|
||||
pfUI.panel.left:SetPoint("BOTTOMRIGHT", pfUI.chat.left, "BOTTOMRIGHT", -2, 2)
|
||||
pfUI.panel.left:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.panel.left:SetBackdropColor(0,0,0,.75)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.left, default_border, nil, true)
|
||||
|
||||
pfUI.panel.left.hide = CreateFrame("Button", nil, pfUI.panel.left)
|
||||
pfUI.panel.left.hide:ClearAllPoints()
|
||||
pfUI.panel.left.hide:SetWidth(16)
|
||||
pfUI.panel.left.hide:SetWidth(12)
|
||||
pfUI.panel.left.hide:SetHeight(pfUI.panel.left:GetHeight())
|
||||
pfUI.panel.left.hide:SetPoint("LEFT", 0, 0)
|
||||
pfUI.panel.left.hide:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.left.hide, default_border)
|
||||
pfUI.panel.left.hide.texture = pfUI.panel.left.hide:CreateTexture("pfPanelLeftHide")
|
||||
pfUI.panel.left.hide.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\left")
|
||||
pfUI.panel.left.hide.texture:ClearAllPoints()
|
||||
pfUI.panel.left.hide.texture:SetPoint("TOPLEFT", pfUI.panel.left.hide, "TOPLEFT", 4, -6)
|
||||
pfUI.panel.left.hide.texture:SetPoint("BOTTOMRIGHT", pfUI.panel.left.hide, "BOTTOMRIGHT", -4, 6)
|
||||
pfUI.panel.left.hide.texture:SetPoint("TOPLEFT", pfUI.panel.left.hide, "TOPLEFT", 2, -4)
|
||||
pfUI.panel.left.hide.texture:SetPoint("BOTTOMRIGHT", pfUI.panel.left.hide, "BOTTOMRIGHT", -2, 4)
|
||||
pfUI.panel.left.hide.texture:SetVertexColor(.25,.25,.25,1)
|
||||
pfUI.panel.left.hide:SetScript("OnClick", function()
|
||||
if pfUI.chat.left:IsShown() then pfUI.chat.left:Hide() else pfUI.chat.left:Show() end
|
||||
@@ -410,23 +414,22 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel.right:SetScale(pfUI.chat.right:GetScale())
|
||||
pfUI.panel.right:SetFrameStrata("HIGH")
|
||||
pfUI.panel.right:ClearAllPoints()
|
||||
pfUI.panel.right:SetHeight(pfUI_config.global.font_size*2)
|
||||
pfUI.panel.right:SetHeight(pfUI_config.global.font_size+default_border*2)
|
||||
pfUI.panel.right:SetPoint("BOTTOMLEFT", pfUI.chat.right, "BOTTOMLEFT", 2, 2)
|
||||
pfUI.panel.right:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", -2, 2)
|
||||
pfUI.panel.right:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.panel.right:SetBackdropColor(0,0,0,.75)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.right, default_border, nil, true)
|
||||
|
||||
pfUI.panel.right.hide = CreateFrame("Button", nil, pfUI.panel.right)
|
||||
pfUI.panel.right.hide:ClearAllPoints()
|
||||
pfUI.panel.right.hide:SetWidth(16)
|
||||
pfUI.panel.right.hide:SetWidth(12)
|
||||
pfUI.panel.right.hide:SetHeight(pfUI.panel.right:GetHeight())
|
||||
pfUI.panel.right.hide:SetPoint("RIGHT", 0, 0)
|
||||
pfUI.panel.right.hide:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.right.hide, default_border)
|
||||
pfUI.panel.right.hide.texture = pfUI.panel.right.hide:CreateTexture("pfPanelRightHide")
|
||||
pfUI.panel.right.hide.texture:SetTexture("Interface\\AddOns\\pfUI\\img\\right")
|
||||
pfUI.panel.right.hide.texture:ClearAllPoints()
|
||||
pfUI.panel.right.hide.texture:SetPoint("TOPLEFT", pfUI.panel.right.hide, "TOPLEFT", 4, -6)
|
||||
pfUI.panel.right.hide.texture:SetPoint("BOTTOMRIGHT", pfUI.panel.right.hide, "BOTTOMRIGHT", -4, 6)
|
||||
pfUI.panel.right.hide.texture:SetPoint("TOPLEFT", pfUI.panel.right.hide, "TOPLEFT", 2, -4)
|
||||
pfUI.panel.right.hide.texture:SetPoint("BOTTOMRIGHT", pfUI.panel.right.hide, "BOTTOMRIGHT", -2, 4)
|
||||
pfUI.panel.right.hide.texture:SetVertexColor(.25,.25,.25,1)
|
||||
pfUI.panel.right.hide:SetScript("OnClick", function()
|
||||
if pfUI.chat.right:IsShown() then pfUI.chat.right:Hide() else pfUI.chat.right:Show() end
|
||||
@@ -472,11 +475,11 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel.right.right.text:SetText("[DUMMY]")
|
||||
|
||||
pfUI.panel.minimap = CreateFrame("Button", "pfPanelMinimap", UIParent)
|
||||
pfUI.panel.minimap:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.panel.minimap:SetPoint("TOPRIGHT",UIParent, -5, -7 - Minimap:GetHeight() - 5)
|
||||
pfUI.utils:CreateBackdrop(pfUI.panel.minimap, default_border)
|
||||
pfUI.panel.minimap:SetPoint("TOP", pfUI.minimap, "BOTTOM", 0 , -default_border*3)
|
||||
pfUI.utils:UpdateMovable(pfUI.panel.minimap)
|
||||
pfUI.panel.minimap:SetHeight(pfUI_config.global.font_size * 2)
|
||||
pfUI.panel.minimap:SetWidth(Minimap:GetWidth() + 5)
|
||||
pfUI.panel.minimap:SetHeight(pfUI_config.global.font_size+default_border*2)
|
||||
pfUI.panel.minimap:SetWidth(pfUI.minimap:GetWidth())
|
||||
pfUI.panel.minimap:SetFrameStrata("BACKGROUND")
|
||||
pfUI.panel.minimap.text = pfUI.panel.minimap:CreateFontString("MinimapZoneText", "LOW", "GameFontNormal")
|
||||
pfUI.panel.minimap.text:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
@@ -515,8 +518,7 @@ pfUI:RegisterModule("panel", function ()
|
||||
button.frame:SetScale(1.4)
|
||||
button.frame:SetPoint("TOPLEFT", button, "TOPLEFT", 1, -16)
|
||||
button.frame:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -1, 1)
|
||||
button.frame:SetBackdrop(pfUI.backdrop)
|
||||
button.frame:SetBackdropColor(0,0,0,0)
|
||||
pfUI.utils:CreateBackdrop(button.frame, default_border)
|
||||
button:Show()
|
||||
end
|
||||
end
|
||||
|
||||
+40
-47
@@ -2,10 +2,15 @@ pfUI:RegisterModule("pet", function ()
|
||||
-- do not go further on disabled UFs
|
||||
if pfUI_config.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
|
||||
end
|
||||
|
||||
pfUI.uf.pet = CreateFrame("Button","pfPet",UIParent)
|
||||
|
||||
pfUI.uf.pet:SetWidth(100)
|
||||
pfUI.uf.pet:SetHeight(23)
|
||||
pfUI.uf.pet:SetHeight(20 + 2*default_border + pfUI_config.unitframes.pet.pspace)
|
||||
pfUI.uf.pet:ClearAllPoints()
|
||||
pfUI.uf.pet:SetPoint("BOTTOM", UIParent , "BOTTOM", 0, 163)
|
||||
pfUI.utils:UpdateMovable(pfUI.uf.pet)
|
||||
@@ -104,17 +109,15 @@ pfUI:RegisterModule("pet", function ()
|
||||
end)
|
||||
|
||||
pfUI.uf.pet.hp = CreateFrame("Frame",nil, pfUI.uf.pet)
|
||||
pfUI.uf.pet.hp:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.pet.hp:SetWidth(100)
|
||||
pfUI.uf.pet.hp:SetHeight(20)
|
||||
pfUI.uf.pet.hp:SetPoint("TOP",pfUI.uf.pet,"TOP")
|
||||
pfUI.uf.pet.hp:SetHeight(17)
|
||||
pfUI.uf.pet.hp:SetPoint("TOP", 0, 0)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.pet.hp, default_border)
|
||||
|
||||
pfUI.uf.pet.hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.pet.hp)
|
||||
pfUI.uf.pet.hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.uf.pet.hp.bar:ClearAllPoints()
|
||||
pfUI.uf.pet.hp.bar:SetPoint("TOPLEFT", pfUI.uf.pet.hp, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.pet.hp.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.pet.hp, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.uf.pet.hp.bar:SetAllPoints(pfUI.uf.pet.hp)
|
||||
pfUI.uf.pet.hp.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.pet.hp.bar:SetValue(100)
|
||||
|
||||
pfUI.uf.pet.hp.raidIcon = CreateFrame("Frame",nil,pfUI.uf.pet.hp)
|
||||
pfUI.uf.pet.hp.raidIcon:SetFrameStrata("MEDIUM")
|
||||
@@ -128,19 +131,15 @@ pfUI:RegisterModule("pet", function ()
|
||||
pfUI.uf.pet.hp.raidIcon:Hide()
|
||||
|
||||
pfUI.uf.pet.power = CreateFrame("Frame",nil, pfUI.uf.pet)
|
||||
pfUI.uf.pet.power:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.pet.power:SetPoint("BOTTOM", 0, 0)
|
||||
pfUI.uf.pet.power:SetWidth(100)
|
||||
pfUI.uf.pet.power:SetHeight(8)
|
||||
pfUI.uf.pet.power:SetPoint("TOPLEFT",pfUI.uf.pet.hp,"BOTTOMLEFT",0,3)
|
||||
pfUI.uf.pet.power:SetHeight(3)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.pet.power, default_border)
|
||||
|
||||
pfUI.uf.pet.power.bar = CreateFrame("StatusBar", nil, pfUI.uf.pet.power)
|
||||
pfUI.uf.pet.power.bar:ClearAllPoints()
|
||||
pfUI.uf.pet.power.bar:SetPoint("TOPLEFT", pfUI.uf.pet.power, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.pet.power.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.pet.power, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.uf.pet.power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.uf.pet.power.bar:SetBackdropColor(0,0,0,1)
|
||||
pfUI.uf.pet.power.bar:SetStatusBarColor(0,0,0)
|
||||
pfUI.uf.pet.power.bar:SetAllPoints(pfUI.uf.pet.power)
|
||||
pfUI.uf.pet.power.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.pet.power.bar:SetValue(100)
|
||||
|
||||
pfUI.uf.pet.hp.text = pfUI.uf.pet.hp.bar:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||
pfUI.uf.pet.hp.text:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size - 2, "OUTLINE")
|
||||
@@ -178,7 +177,9 @@ pfUI:RegisterModule("pet", function ()
|
||||
|
||||
pfUI.uf.pet.buff.buffs[i]:RegisterForClicks("RightButtonUp")
|
||||
pfUI.uf.pet.buff.buffs[i]:ClearAllPoints()
|
||||
pfUI.uf.pet.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.pet.hp, "TOPLEFT", (i-8*row)*1 + (i-8*row)*buffsize - buffsize -1 , 1*row + buffsize*row +1)
|
||||
pfUI.uf.pet.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.pet.hp, "TOPLEFT",
|
||||
(i-1-8*row)*((2*default_border) + buffsize + 1),
|
||||
(row)*((2*default_border) + buffsize + 1) + 2*default_border + 1)
|
||||
pfUI.uf.pet.buff.buffs[i]:SetWidth(buffsize)
|
||||
pfUI.uf.pet.buff.buffs[i]:SetHeight(buffsize)
|
||||
pfUI.uf.pet.buff.buffs[i]:SetNormalTexture(nil)
|
||||
@@ -196,11 +197,11 @@ pfUI:RegisterModule("pet", function ()
|
||||
local buffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
|
||||
for i=1, 16 do
|
||||
local texture, stacks = UnitBuff("pet",i)
|
||||
pfUI.uf.pet.buff.buffs[i]:SetBackdrop(
|
||||
{ bgFile = texture, tile = false, tileSize = buffsize,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.pet.buff.buffs[i], default_border)
|
||||
pfUI.uf.pet.buff.buffs[i]:SetNormalTexture(texture)
|
||||
for i,v in ipairs({pfUI.uf.pet.buff.buffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
end
|
||||
|
||||
if texture then
|
||||
pfUI.uf.pet.buff.buffs[i]:Show()
|
||||
@@ -226,6 +227,8 @@ pfUI:RegisterModule("pet", function ()
|
||||
pfUI.uf.pet.debuff.debuffs = {}
|
||||
for i=1, 16 do
|
||||
local id = i
|
||||
local debuffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
|
||||
|
||||
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("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
@@ -237,18 +240,6 @@ pfUI:RegisterModule("pet", function ()
|
||||
pfUI.uf.pet.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
|
||||
pfUI.uf.pet.debuff.debuffs[i]:ClearAllPoints()
|
||||
|
||||
local row = 0
|
||||
local top = 0
|
||||
local debuffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
|
||||
if i > 8 then row = 1 end
|
||||
if pfUI.uf.pet.buff.buffs[1]:IsShown() then top = top + 1 end
|
||||
if pfUI.uf.pet.buff.buffs[9]:IsShown() then top = top + 1 end
|
||||
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.pet.hp, "TOPLEFT",
|
||||
(i-8*row)*1 + (i-8*row)*debuffsize - debuffsize -1 ,
|
||||
1*row + debuffsize*row +1 + (top*(debuffsize+1))
|
||||
)
|
||||
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetWidth(debuffsize)
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetHeight(debuffsize)
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetNormalTexture(nil)
|
||||
@@ -272,27 +263,29 @@ pfUI:RegisterModule("pet", function ()
|
||||
if i > 8 then row = 1 end
|
||||
if pfUI.uf.pet.buff.buffs[1]:IsShown() then top = top + 1 end
|
||||
if pfUI.uf.pet.buff.buffs[9]:IsShown() then top = top + 1 end
|
||||
local buffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
|
||||
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.pet.hp, "TOPLEFT",
|
||||
(i-8*row)*1 + (i-8*row)*debuffsize - debuffsize -1 ,
|
||||
1*row + debuffsize*row +1 + (top*(debuffsize+1))
|
||||
)
|
||||
(i-1-row)*((2*default_border) + buffsize + 1),
|
||||
(top)*((2*default_border) + buffsize + 1) +
|
||||
(row)*((2*default_border) + buffsize + 1) + (2*default_border + 1))
|
||||
|
||||
local texture, stacks = UnitDebuff("pet",i)
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetBackdrop(
|
||||
{ bgFile = texture, tile = false, tileSize = debuffsize,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.pet.debuff.debuffs[i], default_border)
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetNormalTexture(texture)
|
||||
for i,v in ipairs({pfUI.uf.pet.debuff.debuffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
end
|
||||
|
||||
local _,_,dtype = UnitDebuff("pet", i)
|
||||
if dtype == "Magic" then
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetBackdropBorderColor(0,1,1,1)
|
||||
pfUI.uf.pet.debuff.debuffs[i].backdrop:SetBackdropBorderColor(0,1,1,1)
|
||||
elseif dtype == "Poison" then
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetBackdropBorderColor(0,1,0,1)
|
||||
pfUI.uf.pet.debuff.debuffs[i].backdrop:SetBackdropBorderColor(0,1,0,1)
|
||||
elseif dtype == "Curse" then
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetBackdropBorderColor(1,0,1,1)
|
||||
pfUI.uf.pet.debuff.debuffs[i].backdrop:SetBackdropBorderColor(1,0,1,1)
|
||||
else
|
||||
pfUI.uf.pet.debuff.debuffs[i]:SetBackdropBorderColor(1,0,0,1)
|
||||
pfUI.uf.pet.debuff.debuffs[i].backdrop:SetBackdropBorderColor(1,0,0,1)
|
||||
end
|
||||
|
||||
if texture then
|
||||
|
||||
+42
-54
@@ -2,12 +2,17 @@ pfUI:RegisterModule("player", function ()
|
||||
-- do not go further on disabled UFs
|
||||
if pfUI_config.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
|
||||
end
|
||||
|
||||
PlayerFrame:Hide()
|
||||
PlayerFrame:UnregisterAllEvents()
|
||||
|
||||
pfUI.uf.player = CreateFrame("Button","pfPlayer",UIParent)
|
||||
pfUI.uf.player:SetWidth(pfUI_config.unitframes.player.width)
|
||||
pfUI.uf.player:SetHeight(pfUI_config.unitframes.player.height+pfUI_config.unitframes.player.pheight)
|
||||
pfUI.uf.player:SetHeight(pfUI_config.unitframes.player.height + pfUI_config.unitframes.player.pheight + 2*default_border + pfUI_config.unitframes.player.pspace)
|
||||
pfUI.uf.player:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOM", -75, 125)
|
||||
pfUI.utils:UpdateMovable(pfUI.uf.player)
|
||||
pfUI.uf.player:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
|
||||
@@ -177,10 +182,15 @@ pfUI:RegisterModule("player", function ()
|
||||
end)
|
||||
|
||||
pfUI.uf.player.hp = CreateFrame("Frame",nil, pfUI.uf.player)
|
||||
pfUI.uf.player.hp:SetBackdrop(pfUI.backdrop)
|
||||
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:SetPoint("TOPRIGHT",pfUI.uf.player,"TOPRIGHT")
|
||||
pfUI.uf.player.hp:SetPoint("TOPLEFT",pfUI.uf.player,"TOPLEFT")
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.player.hp, default_border)
|
||||
|
||||
pfUI.uf.player.hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.player.hp)
|
||||
pfUI.uf.player.hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.uf.player.hp.bar:SetAllPoints(pfUI.uf.player.hp)
|
||||
pfUI.uf.player.hp.bar:SetMinMaxValues(0, 100)
|
||||
|
||||
pfUI.uf.player.hp.leaderIcon = CreateFrame("Frame",nil,pfUI.uf.player.hp)
|
||||
pfUI.uf.player.hp.leaderIcon:SetWidth(10)
|
||||
@@ -210,15 +220,6 @@ pfUI:RegisterModule("player", function ()
|
||||
pfUI.uf.player.hp.raidIcon:SetPoint("TOP", pfUI.uf.player.hp, "TOP", 0, 6)
|
||||
pfUI.uf.player.hp.raidIcon:Hide()
|
||||
|
||||
pfUI.uf.player.hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.player.hp)
|
||||
pfUI.uf.player.hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
pfUI.uf.player.hp.bar:ClearAllPoints()
|
||||
pfUI.uf.player.hp.bar:SetPoint("TOPLEFT", pfUI.uf.player.hp, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.player.hp.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.player.hp, "BOTTOMRIGHT", -3, 3)
|
||||
|
||||
pfUI.uf.player.hp.bar:SetMinMaxValues(0, 100)
|
||||
|
||||
if pfUI_config.unitframes.portrait == "1" then
|
||||
pfUI.uf.player.hp.bar.portrait = CreateFrame("PlayerModel",nil,pfUI.uf.player.hp.bar)
|
||||
pfUI.uf.player.hp.bar.portrait:SetAllPoints(pfUI.uf.player.hp.bar)
|
||||
@@ -236,19 +237,14 @@ pfUI:RegisterModule("player", function ()
|
||||
end
|
||||
|
||||
pfUI.uf.player.power = CreateFrame("Frame",nil, pfUI.uf.player)
|
||||
pfUI.uf.player.power:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.player.power:SetPoint("TOPLEFT",pfUI.uf.player.hp,"BOTTOMLEFT",0,3)
|
||||
pfUI.uf.player.power:SetPoint("BOTTOMRIGHT",pfUI.uf.player,"BOTTOMRIGHT",0,0)
|
||||
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.utils:CreateBackdrop(pfUI.uf.player.power, default_border)
|
||||
|
||||
pfUI.uf.player.power.bar = CreateFrame("StatusBar", nil, pfUI.uf.player.power)
|
||||
pfUI.uf.player.power.bar:ClearAllPoints()
|
||||
pfUI.uf.player.power.bar:SetPoint("TOPLEFT", pfUI.uf.player.power, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.player.power.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.player.power, "BOTTOMRIGHT", -3, 3)
|
||||
|
||||
pfUI.uf.player.power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
pfUI.uf.player.power.bar:SetBackdropColor(0,0,0,1)
|
||||
pfUI.uf.player.power.bar:SetStatusBarColor(0,1,0)
|
||||
pfUI.uf.player.power.bar:SetAllPoints(pfUI.uf.player.power)
|
||||
pfUI.uf.player.power.bar:SetMinMaxValues(0, 100)
|
||||
|
||||
pfUI.uf.player.hpText = pfUI.uf.player:CreateFontString("Status", "HIGH", "GameFontNormal")
|
||||
@@ -302,10 +298,11 @@ pfUI:RegisterModule("player", function ()
|
||||
|
||||
pfUI.uf.player.buff.buffs[i]:RegisterForClicks("RightButtonUp")
|
||||
pfUI.uf.player.buff.buffs[i]:ClearAllPoints()
|
||||
pfUI.uf.player.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.buff_size - pfUI_config.unitframes.buff_size -1 , 1*row + pfUI_config.unitframes.buff_size*row +1)
|
||||
pfUI.uf.player.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT",
|
||||
(i-1-8*row)*((2*default_border) + pfUI_config.unitframes.buff_size + 1),
|
||||
(row)*((2*default_border) + pfUI_config.unitframes.buff_size + 1) + 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)
|
||||
pfUI.uf.player.buff.buffs[i]:SetNormalTexture(nil)
|
||||
pfUI.uf.player.buff.buffs[i]:SetScript("OnEnter", function()
|
||||
GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT")
|
||||
GameTooltip:SetPlayerBuff(GetPlayerBuff(id-1,"HELPFUL"))
|
||||
@@ -343,11 +340,11 @@ pfUI:RegisterModule("player", function ()
|
||||
function pfUI.uf.player.buff.RefreshBuffs()
|
||||
for i=1, 16 do
|
||||
local stacks = GetPlayerBuffApplications(GetPlayerBuff(i-1,"HELPFUL"))
|
||||
pfUI.uf.player.buff.buffs[i]:SetBackdrop(
|
||||
{ bgFile = GetPlayerBuffTexture(GetPlayerBuff(i-1,"HELPFUL")), tile = false, tileSize = pfUI_config.unitframes.buff_size,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.player.buff.buffs[i], default_border)
|
||||
pfUI.uf.player.buff.buffs[i]:SetNormalTexture(GetPlayerBuffTexture(GetPlayerBuff(i-1,"HELPFUL")))
|
||||
for i,v in ipairs({pfUI.uf.player.buff.buffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
end
|
||||
|
||||
if GetPlayerBuffTexture(GetPlayerBuff(i-1,"HELPFUL")) then
|
||||
pfUI.uf.player.buff.buffs[i]:Show()
|
||||
@@ -360,7 +357,6 @@ pfUI:RegisterModule("player", function ()
|
||||
else
|
||||
pfUI.uf.player.buff.buffs[i]:Hide()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -392,15 +388,6 @@ pfUI:RegisterModule("player", function ()
|
||||
|
||||
pfUI.uf.player.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
|
||||
pfUI.uf.player.debuff.debuffs[i]:ClearAllPoints()
|
||||
|
||||
local row = 0
|
||||
local top = 0
|
||||
if i > 8 then row = 1 end
|
||||
if pfUI.uf.player.buff.buffs[1]:IsShown() then top = top + 1 end
|
||||
if pfUI.uf.player.buff.buffs[9]:IsShown() then top = top + 1 end
|
||||
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.debuff_size - pfUI_config.unitframes.debuff_size -1 , 1*row + pfUI_config.unitframes.debuff_size*row +1)
|
||||
|
||||
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]:SetNormalTexture(nil)
|
||||
@@ -447,30 +434,31 @@ pfUI:RegisterModule("player", function ()
|
||||
if pfUI.uf.player.buff.buffs[1]:IsShown() then top = top + 1 end
|
||||
if pfUI.uf.player.buff.buffs[9]:IsShown() then top = top + 1 end
|
||||
|
||||
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.player, "TOPLEFT",
|
||||
(i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.debuff_size - pfUI_config.unitframes.debuff_size -1 ,
|
||||
1*row + pfUI_config.unitframes.debuff_size*row +1 + (top*(pfUI_config.unitframes.debuff_size+1))
|
||||
)
|
||||
(i-1-row)*((2*default_border) + pfUI_config.unitframes.debuff_size + 1),
|
||||
(top)*((2*default_border) + pfUI_config.unitframes.buff_size + 1) +
|
||||
(row)*((2*default_border) + pfUI_config.unitframes.debuff_size + 1) + (2*default_border + 1))
|
||||
|
||||
|
||||
local stacks = GetPlayerBuffApplications(GetPlayerBuff(i-1,"HARMFUL"))
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetBackdrop(
|
||||
{ bgFile = GetPlayerBuffTexture(GetPlayerBuff(i-1,"HARMFUL")), tile = false, tileSize = pfUI_config.unitframes.debuff_size,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.player.debuff.debuffs[i], default_border)
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetNormalTexture(GetPlayerBuffTexture(GetPlayerBuff(i-1,"HARMFUL")))
|
||||
for i,v in ipairs({pfUI.uf.player.debuff.debuffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
end
|
||||
|
||||
local _,_,dtype = UnitDebuff("player", i)
|
||||
if dtype == "Magic" then
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetBackdropBorderColor(0,1,1,1)
|
||||
pfUI.uf.player.debuff.debuffs[i].backdrop:SetBackdropBorderColor(0,1,1,1)
|
||||
elseif dtype == "Poison" then
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetBackdropBorderColor(0,1,0,1)
|
||||
pfUI.uf.player.debuff.debuffs[i].backdrop:SetBackdropBorderColor(0,1,0,1)
|
||||
elseif dtype == "Curse" then
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetBackdropBorderColor(1,0,1,1)
|
||||
pfUI.uf.player.debuff.debuffs[i].backdrop:SetBackdropBorderColor(1,0,1,1)
|
||||
elseif dtype == "Disease" then
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetBackdropBorderColor(1,1,0,1)
|
||||
|
||||
pfUI.uf.player.debuff.debuffs[i].backdrop:SetBackdropBorderColor(1,1,0,1)
|
||||
else
|
||||
pfUI.uf.player.debuff.debuffs[i]:SetBackdropBorderColor(1,0,0,1)
|
||||
pfUI.uf.player.debuff.debuffs[i].backdrop:SetBackdropBorderColor(1,0,0,1)
|
||||
end
|
||||
|
||||
if GetPlayerBuffTexture(GetPlayerBuff(i-1,"HARMFUL")) then
|
||||
|
||||
+18
-23
@@ -2,6 +2,11 @@ pfUI:RegisterModule("raid", function ()
|
||||
-- do not go further on disabled UFs
|
||||
if pfUI_config.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
|
||||
end
|
||||
|
||||
pfUI.uf.raid = CreateFrame("Button","pfRaid",UIParent)
|
||||
pfUI.uf.raid:Hide()
|
||||
|
||||
@@ -70,42 +75,32 @@ pfUI:RegisterModule("raid", function ()
|
||||
pfUI.uf.raid[i] = CreateFrame("Button","pfRaid" .. i,UIParent)
|
||||
|
||||
pfUI.uf.raid[i]:SetWidth(50)
|
||||
pfUI.uf.raid[i]:SetHeight(35)
|
||||
pfUI.uf.raid[i]:SetPoint("BOTTOMLEFT", (r-1) * 52 + 5, 160 + ((g-1)*37))
|
||||
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, 160 + ((g-1)*(37+default_border))+default_border)
|
||||
pfUI.utils:UpdateMovable(pfUI.uf.raid[i])
|
||||
pfUI.uf.raid[i]:Hide()
|
||||
pfUI.uf.raid[i].id = 0
|
||||
|
||||
pfUI.uf.raid[i].hp = CreateFrame("Frame",nil, pfUI.uf.raid[i])
|
||||
pfUI.uf.raid[i].hp:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.raid[i].hp:SetHeight(30)
|
||||
pfUI.uf.raid[i].hp:SetPoint("TOPLEFT",pfUI.uf.raid[i],"TOPLEFT")
|
||||
pfUI.uf.raid[i].hp:SetPoint("TOPRIGHT",pfUI.uf.raid[i],"TOPRIGHT")
|
||||
pfUI.uf.raid[i].hp:SetPoint("TOP", 0, 0)
|
||||
pfUI.uf.raid[i].hp:SetWidth(50)
|
||||
pfUI.uf.raid[i].hp:SetHeight(27)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.raid[i].hp, default_border)
|
||||
|
||||
pfUI.uf.raid[i].hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.raid[i].hp)
|
||||
pfUI.uf.raid[i].hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
pfUI.uf.raid[i].hp.bar:ClearAllPoints()
|
||||
pfUI.uf.raid[i].hp.bar:SetPoint("TOPLEFT", pfUI.uf.raid[i].hp, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.raid[i].hp.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.raid[i].hp, "BOTTOMRIGHT", -3, 3)
|
||||
|
||||
pfUI.uf.raid[i].hp.bar:SetStatusBarColor(0,1,0)
|
||||
|
||||
pfUI.uf.raid[i].hp.bar:SetAllPoints(pfUI.uf.raid[i].hp)
|
||||
pfUI.uf.raid[i].hp.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.raid[i].hp.bar:SetValue(0)
|
||||
|
||||
pfUI.uf.raid[i].power = CreateFrame("Frame",nil, pfUI.uf.raid[i])
|
||||
pfUI.uf.raid[i].power:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.raid[i].power:SetPoint("TOPLEFT",pfUI.uf.raid[i].hp,"BOTTOMLEFT",0,3)
|
||||
pfUI.uf.raid[i].power:SetPoint("BOTTOMRIGHT",pfUI.uf.raid[i],"BOTTOMRIGHT",0,0)
|
||||
pfUI.uf.raid[i].power:SetPoint("BOTTOM", 0, 0)
|
||||
pfUI.uf.raid[i].power:SetWidth(50)
|
||||
pfUI.uf.raid[i].power:SetHeight(3)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.raid[i].power, default_border)
|
||||
|
||||
pfUI.uf.raid[i].power.bar = CreateFrame("StatusBar", nil, pfUI.uf.raid[i].power)
|
||||
pfUI.uf.raid[i].power.bar:ClearAllPoints()
|
||||
pfUI.uf.raid[i].power.bar:SetPoint("TOPLEFT", pfUI.uf.raid[i].power, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.raid[i].power.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.raid[i].power, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.uf.raid[i].power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
pfUI.uf.raid[i].power.bar:SetStatusBarColor(1,0,0)
|
||||
pfUI.uf.raid[i].power.bar:SetAllPoints(pfUI.uf.raid[i].power)
|
||||
pfUI.uf.raid[i].power.bar:SetMinMaxValues(0, 100)
|
||||
|
||||
pfUI.uf.raid[i].caption = pfUI.uf.raid[i]:CreateFontString("Status", "HIGH", "GameFontNormal")
|
||||
@@ -252,7 +247,7 @@ pfUI:RegisterModule("raid", function ()
|
||||
elseif hpDisplay > hpReal then
|
||||
this.hp.bar:SetValue(hpDisplay - ceil(hpDiff / pfUI_config.unitframes.animation_speed))
|
||||
else
|
||||
this.hp.bar:SetValue(this.cache.hp)
|
||||
this.hp.bar:SetValue(hpReal)
|
||||
end
|
||||
|
||||
local powerDisplay = this.power.bar:GetValue()
|
||||
|
||||
+10
-12
@@ -47,26 +47,24 @@ pfUI:RegisterModule("skin", function ()
|
||||
|
||||
for _, button in pairs(buttons) do
|
||||
local b = getglobal(button)
|
||||
b:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(b, nil, true)
|
||||
b:SetNormalTexture(nil)
|
||||
b:SetHighlightTexture(nil)
|
||||
b:SetPushedTexture(nil)
|
||||
b:SetDisabledTexture(nil)
|
||||
b:SetScript("OnEnter", function()
|
||||
b:SetBackdrop(pfUI.backdrop_col)
|
||||
b:SetBackdropBorderColor(cr,cg,cb,1)
|
||||
end)
|
||||
pfUI.utils:CreateBackdrop(b, nil, true)
|
||||
b:SetBackdropBorderColor(cr,cg,cb,1)
|
||||
end)
|
||||
b:SetScript("OnLeave", function()
|
||||
b:SetBackdrop(pfUI.backdrop)
|
||||
b:SetBackdropBorderColor(1,1,1,1)
|
||||
end)
|
||||
pfUI.utils:CreateBackdrop(b, nil, true)
|
||||
end)
|
||||
b:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
end
|
||||
|
||||
for _, box in pairs(boxes) do
|
||||
local b = getglobal(box)
|
||||
b:SetBackdrop(pfUI.backdrop)
|
||||
b:SetBackdropColor(0,0,0,.5)
|
||||
pfUI.utils:CreateBackdrop(b, nil, true, true)
|
||||
end
|
||||
|
||||
for i,v in ipairs({GameMenuFrame:GetRegions()}) do
|
||||
@@ -77,10 +75,10 @@ pfUI:RegisterModule("skin", function ()
|
||||
end
|
||||
end
|
||||
|
||||
ShoppingTooltip1:SetBackdrop(pfUI.backdrop)
|
||||
ShoppingTooltip2:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(ShoppingTooltip1)
|
||||
pfUI.utils:CreateBackdrop(ShoppingTooltip2)
|
||||
|
||||
TicketStatusFrame:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(TicketStatusFrame)
|
||||
TicketStatusFrame:ClearAllPoints()
|
||||
TicketStatusFrame:SetPoint("TOP", 0, -5)
|
||||
function TicketStatusFrame_OnEvent()
|
||||
|
||||
+49
-60
@@ -2,6 +2,11 @@ pfUI:RegisterModule("target", function ()
|
||||
-- do not go further on disabled UFs
|
||||
if pfUI_config.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
|
||||
end
|
||||
|
||||
-- Hide Blizzard target frame and unregister all events to prevent it from popping up again
|
||||
TargetFrame:Hide()
|
||||
TargetFrame:UnregisterAllEvents()
|
||||
@@ -13,7 +18,7 @@ pfUI:RegisterModule("target", function ()
|
||||
pfUI.uf.target = CreateFrame("Button","pfTarget",UIParent)
|
||||
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)
|
||||
pfUI.uf.target:SetHeight(pfUI_config.unitframes.target.height + pfUI_config.unitframes.target.pheight + 2*default_border + pfUI_config.unitframes.target.pspace)
|
||||
pfUI.uf.target:SetPoint("BOTTOMLEFT", UIParent, "BOTTOM", 75, 125)
|
||||
pfUI.utils:UpdateMovable(pfUI.uf.target)
|
||||
|
||||
@@ -204,18 +209,15 @@ pfUI:RegisterModule("target", function ()
|
||||
end)
|
||||
|
||||
pfUI.uf.target.hp = CreateFrame("Frame",nil, pfUI.uf.target)
|
||||
pfUI.uf.target.hp:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.target.hp:SetWidth(pfUI_config.unitframes.target.width)
|
||||
pfUI.uf.target.hp:SetHeight(pfUI_config.unitframes.target.height)
|
||||
pfUI.uf.target.hp:SetPoint("TOPLEFT",pfUI.uf.target,"TOPLEFT")
|
||||
pfUI.uf.target.hp:SetPoint("TOPRIGHT",pfUI.uf.target,"TOPRIGHT")
|
||||
pfUI.uf.target.hp:SetPoint("TOP", 0, 0)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.target.hp, default_border)
|
||||
|
||||
pfUI.uf.target.hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.target.hp)
|
||||
pfUI.uf.target.hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.uf.target.hp.bar:ClearAllPoints()
|
||||
pfUI.uf.target.hp.bar:SetPoint("TOPLEFT", pfUI.uf.target.hp, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.target.hp.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.target.hp, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.uf.target.hp.bar:SetAllPoints(pfUI.uf.target.hp)
|
||||
pfUI.uf.target.hp.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.target.hp.bar:SetValue(100)
|
||||
|
||||
pfUI.uf.target.hp.leaderIcon = CreateFrame("Frame",nil,pfUI.uf.target.hp)
|
||||
pfUI.uf.target.hp.leaderIcon:SetWidth(10)
|
||||
@@ -266,21 +268,15 @@ pfUI:RegisterModule("target", function ()
|
||||
end
|
||||
|
||||
pfUI.uf.target.power = CreateFrame("Frame",nil, pfUI.uf.target)
|
||||
|
||||
pfUI.uf.target.power:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.target.power:SetPoint("TOPLEFT",pfUI.uf.target.hp,"BOTTOMLEFT",0,3)
|
||||
pfUI.uf.target.power:SetPoint("BOTTOMRIGHT",pfUI.uf.target,"BOTTOMRIGHT",0,0)
|
||||
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.utils:CreateBackdrop(pfUI.uf.target.power, default_border)
|
||||
|
||||
pfUI.uf.target.power.bar = CreateFrame("StatusBar", nil, pfUI.uf.target.power)
|
||||
pfUI.uf.target.power.bar:ClearAllPoints()
|
||||
pfUI.uf.target.power.bar:SetPoint("TOPLEFT", pfUI.uf.target.power, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.target.power.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.target.power, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.uf.target.power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
pfUI.uf.target.power.bar:SetBackdropColor(0,0,0,1)
|
||||
pfUI.uf.target.power.bar:SetStatusBarColor(0,0,0)
|
||||
pfUI.uf.target.power.bar:SetAllPoints(pfUI.uf.target.power)
|
||||
pfUI.uf.target.power.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.target.power.bar:SetValue(100)
|
||||
|
||||
pfUI.uf.target.hpText = pfUI.uf.target:CreateFontString("Status", "HIGH", "GameFontNormal")
|
||||
pfUI.uf.target.hpText:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size, "OUTLINE")
|
||||
@@ -321,21 +317,22 @@ pfUI:RegisterModule("target", function ()
|
||||
if event == "PLAYER_ENTERING_WORLD" then
|
||||
for point=1, 5 do
|
||||
pfUI.uf.target["combopoint" .. point]:SetFrameStrata("HIGH")
|
||||
pfUI.uf.target["combopoint" .. point]:SetWidth(12)
|
||||
pfUI.uf.target["combopoint" .. point]:SetHeight(12)
|
||||
pfUI.uf.target["combopoint" .. point]:SetBackdrop({
|
||||
bgFile = "Interface\\AddOns\\pfUI\\img\\bar", tile = true, tileSize = 8,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0},
|
||||
})
|
||||
pfUI.uf.target["combopoint" .. point]:SetPoint("TOPLEFT", pfUI.uf.target, "TOPRIGHT", 3, -(point - 1) * 13)
|
||||
|
||||
pfUI.uf.target["combopoint" .. point]:SetWidth(5)
|
||||
pfUI.uf.target["combopoint" .. point]:SetHeight(5)
|
||||
pfUI.utils: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))
|
||||
if point < 3 then
|
||||
pfUI.uf.target["combopoint" .. point]:SetBackdropColor(1, .3, .3, .75)
|
||||
local tex = pfUI.uf.target["combopoint" .. point]:CreateTexture("OVERLAY")
|
||||
tex:SetAllPoints(pfUI.uf.target["combopoint" .. point])
|
||||
tex:SetTexture(1, .3, .3, .75)
|
||||
elseif point < 4 then
|
||||
pfUI.uf.target["combopoint" .. point]:SetBackdropColor(1, 1, .3, .75)
|
||||
local tex = pfUI.uf.target["combopoint" .. point]:CreateTexture("OVERLAY")
|
||||
tex:SetAllPoints(pfUI.uf.target["combopoint" .. point])
|
||||
tex:SetTexture(1, 1, .3, .75)
|
||||
else
|
||||
pfUI.uf.target["combopoint" .. point]:SetBackdropColor(.3, 1, .3, .75)
|
||||
local tex = pfUI.uf.target["combopoint" .. point]:CreateTexture("OVERLAY")
|
||||
tex:SetAllPoints(pfUI.uf.target["combopoint" .. point])
|
||||
tex:SetTexture(.3, 1, .3, .75)
|
||||
end
|
||||
pfUI.uf.target["combopoint" .. point]:Hide()
|
||||
end
|
||||
@@ -376,7 +373,9 @@ pfUI:RegisterModule("target", function ()
|
||||
|
||||
pfUI.uf.target.buff.buffs[i]:RegisterForClicks("RightButtonUp")
|
||||
pfUI.uf.target.buff.buffs[i]:ClearAllPoints()
|
||||
pfUI.uf.target.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.target, "TOPLEFT", (i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.buff_size - pfUI_config.unitframes.buff_size -1 , 1*row + pfUI_config.unitframes.buff_size*row +1)
|
||||
pfUI.uf.target.buff.buffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.target, "TOPLEFT",
|
||||
(i-1-8*row)*((2*default_border) + pfUI_config.unitframes.buff_size + 1),
|
||||
(row)*((2*default_border) + pfUI_config.unitframes.buff_size + 1) + 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)
|
||||
pfUI.uf.target.buff.buffs[i]:SetNormalTexture(nil)
|
||||
@@ -393,11 +392,11 @@ pfUI:RegisterModule("target", function ()
|
||||
function pfUI.uf.target.buff.RefreshBuffs()
|
||||
for i=1, 16 do
|
||||
local texture, stacks = UnitBuff("target",i)
|
||||
pfUI.uf.target.buff.buffs[i]:SetBackdrop(
|
||||
{ bgFile = texture, tile = false, tileSize = pfUI_config.unitframes.buff_size,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.target.buff.buffs[i], default_border)
|
||||
pfUI.uf.target.buff.buffs[i]:SetNormalTexture(texture)
|
||||
for i,v in ipairs({pfUI.uf.target.buff.buffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
end
|
||||
|
||||
if texture then
|
||||
pfUI.uf.target.buff.buffs[i]:Show()
|
||||
@@ -434,17 +433,6 @@ pfUI:RegisterModule("target", function ()
|
||||
pfUI.uf.target.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
|
||||
pfUI.uf.target.debuff.debuffs[i]:ClearAllPoints()
|
||||
|
||||
local row = 0
|
||||
local top = 0
|
||||
if i > 8 then row = 1 end
|
||||
if pfUI.uf.target.buff.buffs[1]:IsShown() then top = top + 1 end
|
||||
if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end
|
||||
|
||||
pfUI.uf.target.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.target, "TOPLEFT",
|
||||
(i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.debuff_size - pfUI_config.unitframes.debuff_size -1 ,
|
||||
1*row + pfUI_config.unitframes.debuff_size*row +1 + (top*(pfUI_config.unitframes.debuff_size+1))
|
||||
)
|
||||
|
||||
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]:SetNormalTexture(nil)
|
||||
@@ -469,25 +457,26 @@ pfUI:RegisterModule("target", function ()
|
||||
if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end
|
||||
|
||||
pfUI.uf.target.debuff.debuffs[i]:SetPoint("BOTTOMLEFT", pfUI.uf.target, "TOPLEFT",
|
||||
(i-8*row)*1 + (i-8*row)*pfUI_config.unitframes.debuff_size - pfUI_config.unitframes.debuff_size -1 ,
|
||||
1*row + pfUI_config.unitframes.debuff_size*row +1 + (top*(pfUI_config.unitframes.debuff_size+1))
|
||||
)
|
||||
(i-1-row)*((2*default_border) + pfUI_config.unitframes.debuff_size + 1),
|
||||
(top)*((2*default_border) + pfUI_config.unitframes.buff_size + 1) +
|
||||
(row)*((2*default_border) + pfUI_config.unitframes.debuff_size + 1) + (2*default_border + 1))
|
||||
|
||||
local texture, stacks = UnitDebuff("target",i)
|
||||
pfUI.uf.target.debuff.debuffs[i]:SetBackdrop(
|
||||
{ bgFile = texture, tile = false, tileSize = pfUI_config.unitframes.debuff_size,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8,
|
||||
insets = { left = 0, right = 0, top = 0, bottom = 0}
|
||||
})
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.target.debuff.debuffs[i], default_border)
|
||||
pfUI.uf.target.debuff.debuffs[i]:SetNormalTexture(texture)
|
||||
for i,v in ipairs({pfUI.uf.target.debuff.debuffs[i]:GetRegions()}) do
|
||||
if v.SetTexCoord then v:SetTexCoord(.08, .92, .08, .92) end
|
||||
end
|
||||
|
||||
local _,_,dtype = UnitDebuff("target", i)
|
||||
if dtype == "Magic" then
|
||||
pfUI.uf.target.debuff.debuffs[i]:SetBackdropBorderColor(0,1,1,1)
|
||||
pfUI.uf.target.debuff.debuffs[i].backdrop:SetBackdropBorderColor(0,1,1,1)
|
||||
elseif dtype == "Poison" then
|
||||
pfUI.uf.target.debuff.debuffs[i]:SetBackdropBorderColor(0,1,0,1)
|
||||
pfUI.uf.target.debuff.debuffs[i].backdrop:SetBackdropBorderColor(0,1,0,1)
|
||||
elseif dtype == "Curse" then
|
||||
pfUI.uf.target.debuff.debuffs[i]:SetBackdropBorderColor(1,0,1,1)
|
||||
pfUI.uf.target.debuff.debuffs[i].backdrop:SetBackdropBorderColor(1,0,1,1)
|
||||
else
|
||||
pfUI.uf.target.debuff.debuffs[i]:SetBackdropBorderColor(1,0,0,1)
|
||||
pfUI.uf.target.debuff.debuffs[i].backdrop:SetBackdropBorderColor(1,0,0,1)
|
||||
end
|
||||
|
||||
if texture then
|
||||
|
||||
+18
-24
@@ -2,6 +2,11 @@ pfUI:RegisterModule("targettarget", function ()
|
||||
-- do not go further on disabled UFs
|
||||
if pfUI_config.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
|
||||
end
|
||||
|
||||
pfUI.uf.targettargetNotify = CreateFrame("Button",nil,UIParent)
|
||||
pfUI.uf.targettargetNotify:SetScript("OnUpdate", function()
|
||||
if UnitExists("targettarget") or (pfUI.gitter and pfUI.gitter:IsShown()) then
|
||||
@@ -14,18 +19,14 @@ pfUI:RegisterModule("targettarget", function ()
|
||||
pfUI.uf.targettarget = CreateFrame("Button","pfTargetTarget",UIParent)
|
||||
|
||||
pfUI.uf.targettarget:SetWidth(100)
|
||||
pfUI.uf.targettarget:SetHeight(25)
|
||||
pfUI.uf.targettarget:SetHeight(20 + 2*default_border + pfUI_config.unitframes.ttarget.pspace)
|
||||
pfUI.uf.targettarget:SetPoint("BOTTOM", UIParent , "BOTTOM", 0, 125)
|
||||
pfUI.utils:UpdateMovable(pfUI.uf.targettarget)
|
||||
pfUI.uf.targettarget:SetBackdrop(pfUI.backdrop)
|
||||
|
||||
pfUI.uf.targettarget:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
|
||||
pfUI.uf.targettarget:SetScript("OnClick", function ()
|
||||
TargetUnit("targettarget")
|
||||
end)
|
||||
pfUI.uf.targettarget.bg = CreateFrame("Frame",nil,pfUI.uf.targettarget)
|
||||
pfUI.uf.targettarget.bg = pfUI.uf.targettarget:CreateTexture(nil,"BACKGROUND")
|
||||
pfUI.uf.targettarget.bg:SetAllPoints(pfUI.uf.targettarget)
|
||||
|
||||
pfUI.uf.targettarget:SetScript("OnUpdate", function()
|
||||
if UnitExists("targettarget") then
|
||||
@@ -89,17 +90,15 @@ pfUI:RegisterModule("targettarget", function ()
|
||||
end)
|
||||
|
||||
pfUI.uf.targettarget.hp = CreateFrame("Frame",nil, pfUI.uf.targettarget)
|
||||
pfUI.uf.targettarget.hp:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.targettarget.hp:SetPoint("TOPLEFT", pfUI.uf.targettarget, "TOPLEFT", 0, 0)
|
||||
pfUI.uf.targettarget.hp:SetPoint("BOTTOMRIGHT", pfUI.uf.targettarget, "BOTTOMRIGHT", 0, 0)
|
||||
pfUI.uf.targettarget.hp:SetPoint("TOP",pfUI.uf.targettarget,"TOP")
|
||||
pfUI.uf.targettarget.hp:SetPoint("TOP", 0, 0)
|
||||
pfUI.uf.targettarget.hp:SetWidth(100)
|
||||
pfUI.uf.targettarget.hp:SetHeight(17)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.targettarget.hp, default_border)
|
||||
|
||||
pfUI.uf.targettarget.hp.bar = CreateFrame("StatusBar", nil, pfUI.uf.targettarget.hp)
|
||||
pfUI.uf.targettarget.hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.uf.targettarget.hp.bar:ClearAllPoints()
|
||||
pfUI.uf.targettarget.hp.bar:SetPoint("TOPLEFT", pfUI.uf.targettarget.hp, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.targettarget.hp.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.targettarget.hp, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.uf.targettarget.hp.bar:SetAllPoints(pfUI.uf.targettarget.hp)
|
||||
pfUI.uf.targettarget.hp.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.targettarget.hp.bar:SetValue(100)
|
||||
|
||||
pfUI.uf.targettarget.hp.raidIcon = CreateFrame("Frame",nil,pfUI.uf.targettarget.hp)
|
||||
pfUI.uf.targettarget.hp.raidIcon:SetFrameStrata("MEDIUM")
|
||||
@@ -131,20 +130,15 @@ pfUI:RegisterModule("targettarget", function ()
|
||||
end
|
||||
|
||||
pfUI.uf.targettarget.power = CreateFrame("Frame",nil, pfUI.uf.targettarget)
|
||||
pfUI.uf.targettarget.power:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.uf.targettarget.power:SetPoint("TOPLEFT", pfUI.uf.targettarget.hp, "BOTTOMLEFT", 0, -3)
|
||||
pfUI.uf.targettarget.power:SetPoint("TOPRIGHT", pfUI.uf.targettarget.hp, "BOTTOMRIGHT", 0, -3)
|
||||
pfUI.uf.targettarget.power:SetHeight(8)
|
||||
pfUI.uf.targettarget.power:SetPoint("TOPLEFT",pfUI.uf.targettarget.hp,"BOTTOMLEFT",0,3)
|
||||
pfUI.utils:CreateBackdrop(pfUI.uf.targettarget.power, default_border)
|
||||
pfUI.uf.targettarget.power:SetPoint("BOTTOM", 0, 0)
|
||||
pfUI.uf.targettarget.power:SetWidth(100)
|
||||
pfUI.uf.targettarget.power:SetHeight(4)
|
||||
|
||||
pfUI.uf.targettarget.power.bar = CreateFrame("StatusBar", nil, pfUI.uf.targettarget.power)
|
||||
pfUI.uf.targettarget.power.bar:ClearAllPoints()
|
||||
pfUI.uf.targettarget.power.bar:SetPoint("TOPLEFT", pfUI.uf.targettarget.power, "TOPLEFT", 3, -3)
|
||||
pfUI.uf.targettarget.power.bar:SetPoint("BOTTOMRIGHT", pfUI.uf.targettarget.power, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.uf.targettarget.power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.uf.targettarget.power.bar:SetBackdropColor(0,0,0,1)
|
||||
pfUI.uf.targettarget.power.bar:SetStatusBarColor(0,0,0)
|
||||
pfUI.uf.targettarget.power.bar:SetAllPoints(pfUI.uf.targettarget.power)
|
||||
pfUI.uf.targettarget.power.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.uf.targettarget.power.bar:SetValue(100)
|
||||
|
||||
pfUI.uf.targettarget.hp.text = pfUI.uf.targettarget.hp.bar:CreateFontString("Status", "LOW", "GameFontNormal")
|
||||
pfUI.uf.targettarget.hp.text:SetFont("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_square .. ".ttf", pfUI_config.global.font_size - 2, "OUTLINE")
|
||||
|
||||
+38
-39
@@ -35,17 +35,15 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
pfUIhookDPSMate_Show(DPSMate_DPSMate)
|
||||
DPSMate_DPSMate:ClearAllPoints()
|
||||
DPSMate_DPSMate:SetAllPoints(pfUI.chat.right)
|
||||
DPSMate_DPSMate:SetWidth(pfUI.chat.right:GetWidth()-6)
|
||||
DPSMate_DPSMate:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", 3, -3)
|
||||
DPSMate_DPSMate:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", -3, 3)
|
||||
|
||||
if DPSMate_DPSMate_ScrollFrame then
|
||||
DPSMate_DPSMate_ScrollFrame:ClearAllPoints()
|
||||
DPSMate_DPSMate_ScrollFrame:SetAllPoints(pfUI.chat.right)
|
||||
DPSMate_DPSMate_ScrollFrame:SetWidth(pfUI.chat.right:GetWidth()-6)
|
||||
DPSMate_DPSMate_ScrollFrame:SetWidth(pfUI.chat.right:GetWidth())
|
||||
|
||||
DPSMate_DPSMate_ScrollFrame:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", 3, -23)
|
||||
DPSMate_DPSMate_ScrollFrame:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", -3, 23)
|
||||
DPSMate_DPSMate_ScrollFrame:SetPoint("TOPLEFT", DPSMate_DPSMate_Head, "BOTTOMLEFT", 0, 0)
|
||||
DPSMate_DPSMate_ScrollFrame:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, pfUI.panel.right:GetHeight())
|
||||
DPSMate_DPSMate_Resize:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -70,7 +68,7 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
pfUIhookWIM_PostMessage = WIM_PostMessage
|
||||
WIM_PostMessage = function(user, msg, ttype, from, raw_msg)
|
||||
pfUIhookWIM_PostMessage(user, msg, ttype, from, raw_msg)
|
||||
getglobal("WIM_msgFrame" .. user):SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(getglobal("WIM_msgFrame" .. user))
|
||||
getglobal("WIM_msgFrame" .. user .. "From"):ClearAllPoints()
|
||||
getglobal("WIM_msgFrame" .. user .. "From"):SetPoint("TOP", 0, -10)
|
||||
|
||||
@@ -88,37 +86,37 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"):SetPoint("BOTTOMRIGHT", getglobal("WIM_msgFrame" .. user), "BOTTOMRIGHT", -32, 32)
|
||||
getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"):SetFont(STANDARD_TEXT_FONT, 12)
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(getglobal("WIM_msgFrame" .. user .. "MsgBox"))
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):ClearAllPoints()
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetPoint("TOPLEFT", getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"), "BOTTOMLEFT", 0, -2)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetPoint("TOPRIGHT", getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"), "BOTTOMRIGHT", 0, -2)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetPoint("TOPLEFT", getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"), "BOTTOMLEFT", 0, -5)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetPoint("TOPRIGHT", getglobal("WIM_msgFrame" .. user .. "ScrollingMessageFrame"), "BOTTOMRIGHT", 0, -5)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetTextInsets(5, 5, 5, 5)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetHeight(24)
|
||||
getglobal("WIM_msgFrame" .. user .. "MsgBox"):SetHeight(20)
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "MsgBox"):GetRegions()}) do
|
||||
if i==6 then v:SetTexture(.1,.1,.1,.5) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton1"):SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton1"))
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton1"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton2"):SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton2"))
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton2"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton3"):SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton3"))
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton3"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton4"):SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton4"))
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton4"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
|
||||
getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton5"):SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton5"))
|
||||
for i,v in ipairs({getglobal("WIM_msgFrame" .. user .. "ShortcutFrameButton5"):GetRegions()}) do
|
||||
if i >= 2 and i < 7 then v:SetTexture(.1,.1,.1,0) end
|
||||
end
|
||||
@@ -148,7 +146,7 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
pfUI.uf.player.incHeal:SetMinMaxValues(0, 1)
|
||||
pfUI.uf.player.incHeal:SetValue(1)
|
||||
pfUI.uf.player.incHeal:SetStatusBarColor(0, 1, 0, 0.5)
|
||||
pfUI.uf.player.incHeal:SetHeight(pfUI.uf.player.hp:GetHeight() - (2*3))
|
||||
pfUI.uf.player.incHeal:SetHeight(pfUI.uf.player.hp:GetHeight())
|
||||
pfUI.uf.player.incHeal:Hide()
|
||||
end
|
||||
return pfUI.uf.player
|
||||
@@ -161,7 +159,7 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
pfUI.uf.target.incHeal:SetMinMaxValues(0, 1)
|
||||
pfUI.uf.target.incHeal:SetValue(1)
|
||||
pfUI.uf.target.incHeal:SetStatusBarColor(0, 1, 0, 0.5)
|
||||
pfUI.uf.target.incHeal:SetHeight(pfUI.uf.target.hp:GetHeight() - (2*3))
|
||||
pfUI.uf.target.incHeal:SetHeight(pfUI.uf.target.hp:GetHeight())
|
||||
pfUI.uf.target.incHeal:Hide()
|
||||
end
|
||||
return pfUI.uf.target
|
||||
@@ -175,7 +173,7 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
pfUI.uf.group[id].incHeal:SetMinMaxValues(0, 1)
|
||||
pfUI.uf.group[id].incHeal:SetValue(1)
|
||||
pfUI.uf.group[id].incHeal:SetStatusBarColor(0, 1, 0, 0.5)
|
||||
pfUI.uf.group[id].incHeal:SetHeight(pfUI.uf.group[id].hp:GetHeight() - (2*3))
|
||||
pfUI.uf.group[id].incHeal:SetHeight(pfUI.uf.group[id].hp:GetHeight())
|
||||
pfUI.uf.group[id].incHeal:Hide()
|
||||
end
|
||||
return pfUI.uf.group[id]
|
||||
@@ -197,7 +195,7 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
pfUI.uf.raid[id].incHeal:SetMinMaxValues(0, 1)
|
||||
pfUI.uf.raid[id].incHeal:SetValue(1)
|
||||
pfUI.uf.raid[id].incHeal:SetStatusBarColor(0, 1, 0, 0.5)
|
||||
pfUI.uf.raid[id].incHeal:SetHeight(pfUI.uf.raid[id].hp:GetHeight() - (2*3))
|
||||
pfUI.uf.raid[id].incHeal:SetHeight(pfUI.uf.raid[id].hp:GetHeight())
|
||||
pfUI.uf.raid[id].incHeal:Hide()
|
||||
end
|
||||
return pfUI.uf.raid[id]
|
||||
@@ -260,10 +258,10 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
frame.incHeal:ClearAllPoints()
|
||||
|
||||
if strsub(unit,0,4) == "raid" and pfUI_config.unitframes.raid.invert_healthbar == "1" then
|
||||
frame.incHeal:SetPoint("TOPLEFT", frame, "TOPLEFT", 3, -3)
|
||||
frame.incHeal:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, 0)
|
||||
frame.incHeal:SetFrameStrata("HIGH")
|
||||
else
|
||||
frame.incHeal:SetPoint("TOPLEFT", frame, "TOPLEFT", healthWidth-3, -3)
|
||||
frame.incHeal:SetPoint("TOPLEFT", frame, "TOPLEFT", healthWidth, 0)
|
||||
end
|
||||
else
|
||||
frame.incHeal:Hide()
|
||||
@@ -290,39 +288,40 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
|
||||
-- draw the button
|
||||
if not pfUI.bag.right.sort then
|
||||
pfUI.bag.right.money:ClearAllPoints()
|
||||
pfUI.bag.right.money:SetPoint("TOPRIGHT", pfUI.bag.right, "TOPRIGHT", -55, -6)
|
||||
|
||||
pfUI.bag.right.sort = CreateFrame("Button", "pfBagSlotShow", UIParent)
|
||||
pfUI.bag.right.sort:SetParent(pfUI.bag.right)
|
||||
pfUI.bag.right.sort:SetPoint("TOPRIGHT", -pfUI_config.bars.border*2 - 45 , -pfUI_config.bars.border*2 )
|
||||
pfUI.bag.right.sort:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.bag.right.sort:SetHeight(15)
|
||||
pfUI.bag.right.sort:SetWidth(15)
|
||||
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.utils: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("Interface\\AddOns\\pfUI\\fonts\\" .. pfUI_config.global.font_default .. ".ttf", pfUI_config.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()
|
||||
pfUI.bag.right.sort.texture:SetPoint("TOPLEFT", pfUI.bag.right.sort, "TOPLEFT", 3, -3)
|
||||
pfUI.bag.right.sort.texture:SetPoint("BOTTOMRIGHT", pfUI.bag.right.sort, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.bag.right.sort.texture:SetPoint("TOPLEFT", pfUI.bag.right.sort, "TOPLEFT", 2, -2)
|
||||
pfUI.bag.right.sort.texture:SetPoint("BOTTOMRIGHT", pfUI.bag.right.sort, "BOTTOMRIGHT", -2, 2)
|
||||
pfUI.bag.right.sort.texture:SetVertexColor(.25,.25,.25,1)
|
||||
|
||||
pfUI.bag.right.sort:SetScript("OnEnter", function ()
|
||||
pfUI.bag.right.sort:SetBackdrop(pfUI.backdrop_col)
|
||||
pfUI.bag.right.sort:SetBackdropBorderColor(1,1,.25,1)
|
||||
pfUI.bag.right.sort.texture:SetVertexColor(1,1,.25,1)
|
||||
end)
|
||||
pfUI.bag.right.sort.backdrop:SetBackdropBorderColor(1,1,.25,1)
|
||||
pfUI.bag.right.sort.texture:SetVertexColor(1,1,.25,1)
|
||||
end)
|
||||
|
||||
pfUI.bag.right.sort:SetScript("OnLeave", function ()
|
||||
pfUI.bag.right.sort:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.bag.right.sort:SetBackdropBorderColor(1,1,1,1)
|
||||
pfUI.bag.right.sort.texture:SetVertexColor(.25,.25,.25,1)
|
||||
end)
|
||||
pfUI.utils:CreateBackdrop(pfUI.bag.right.sort)
|
||||
pfUI.bag.right.sort.texture:SetVertexColor(.25,.25,.25,1)
|
||||
end)
|
||||
|
||||
pfUI.bag.right.sort:SetScript("OnClick", function()
|
||||
Clean_Up("bags")
|
||||
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)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
+6
-10
@@ -1,5 +1,5 @@
|
||||
pfUI:RegisterModule("tooltip", function ()
|
||||
GameTooltip:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop( GameTooltip)
|
||||
|
||||
if pfUI_config.tooltip.position == "cursor" then
|
||||
function GameTooltip_SetDefaultAnchor(tooltip, parent)
|
||||
@@ -42,15 +42,13 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
if GameTooltip:GetAnchorType() == "ANCHOR_NONE" then
|
||||
GameTooltip:ClearAllPoints()
|
||||
if pfUI_config.tooltip.position == "bottom" then
|
||||
GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.panel.right,"TOPRIGHT",0,0)
|
||||
GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.panel.right,"TOPRIGHT",0,pfUI_config.appearance.border.default*2)
|
||||
elseif pfUI_config.tooltip.position == "chat" then
|
||||
GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.chat.right,"TOPRIGHT",0,0)
|
||||
GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.chat.right,"TOPRIGHT",0,pfUI_config.appearance.border.default*2)
|
||||
end
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
|
||||
pfUI.tooltipStatusBar = CreateFrame('Frame', nil, GameTooltipStatusBar)
|
||||
pfUI.tooltipStatusBar:SetScript("OnUpdate", function()
|
||||
hp = GameTooltipStatusBar:GetValue()
|
||||
@@ -65,12 +63,10 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
|
||||
GameTooltipStatusBar:SetHeight(6)
|
||||
GameTooltipStatusBar:ClearAllPoints()
|
||||
GameTooltipStatusBar:SetPoint("BOTTOMLEFT", GameTooltip, "TOPLEFT", 1, 2)
|
||||
GameTooltipStatusBar:SetPoint("BOTTOMRIGHT", GameTooltip, "TOPRIGHT", -1, 2)
|
||||
GameTooltipStatusBar:SetPoint("BOTTOMLEFT", GameTooltip, "TOPLEFT", 0, 0)
|
||||
GameTooltipStatusBar:SetPoint("BOTTOMRIGHT", GameTooltip, "TOPRIGHT", 0, 0)
|
||||
GameTooltipStatusBar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
GameTooltipStatusBar:SetBackdrop( { bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
|
||||
insets = {left = -1, right = -1, top = -1, bottom = -1} })
|
||||
GameTooltipStatusBar:SetBackdropColor(0, 0, 0, 1)
|
||||
pfUI.utils:CreateBackdrop(GameTooltipStatusBar)
|
||||
GameTooltipStatusBar.SetStatusBarColor_orig = GameTooltipStatusBar.SetStatusBarColor
|
||||
GameTooltipStatusBar.SetStatusBarColor = function() return end
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ pfUI:RegisterModule("uf_tukui", function ()
|
||||
|
||||
if pfUI_config.unitframes.layout == "tukui" then
|
||||
pfUI.uf.player.caption = CreateFrame("Frame",nil, pfUI.uf.player)
|
||||
pfUI.uf.player.caption:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop( pfUI.uf.player.caption)
|
||||
pfUI.uf.player.caption:SetHeight(pfUI_config.global.font_size * 2)
|
||||
pfUI.uf.player.caption:SetPoint("TOPRIGHT",pfUI.uf.player,"BOTTOMRIGHT",0,-1)
|
||||
pfUI.uf.player.caption:SetPoint("TOPLEFT",pfUI.uf.player,"BOTTOMLEFT",0,-1)
|
||||
@@ -16,7 +16,7 @@ pfUI:RegisterModule("uf_tukui", function ()
|
||||
pfUI.uf.player.powerText:SetPoint("LEFT",pfUI.uf.player.caption, "LEFT", 5, 0)
|
||||
|
||||
pfUI.uf.target.caption = CreateFrame("Frame",nil, pfUI.uf.target)
|
||||
pfUI.uf.target.caption:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop( pfUI.uf.target.caption)
|
||||
pfUI.uf.target.caption:SetHeight(pfUI_config.global.font_size * 2)
|
||||
pfUI.uf.target.caption:SetPoint("TOPRIGHT",pfUI.uf.target,"BOTTOMRIGHT",0,-1)
|
||||
pfUI.uf.target.caption:SetPoint("TOPLEFT",pfUI.uf.target,"BOTTOMLEFT",0,-1)
|
||||
|
||||
+11
-14
@@ -1,10 +1,10 @@
|
||||
pfUI:RegisterModule("xpbar", function ()
|
||||
pfUI.xp = CreateFrame("Frame",nil, pfUI.bars.bottom)
|
||||
pfUI.xp:SetWidth(10)
|
||||
pfUI.xp:SetPoint("TOPLEFT",pfUI.chat.left,"TOPRIGHT", 1, 0)
|
||||
pfUI.xp:SetPoint("BOTTOMLEFT",pfUI.chat.left,"BOTTOMRIGHT",1, 0)
|
||||
pfUI.xp:SetWidth(5)
|
||||
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:SetFrameStrata("BACKGROUND")
|
||||
pfUI.xp:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.xp)
|
||||
pfUI.xp:RegisterEvent("PLAYER_LEVEL_UP")
|
||||
pfUI.xp:RegisterEvent("PLAYER_XP_UPDATE")
|
||||
pfUI.xp:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
@@ -78,8 +78,7 @@ pfUI:RegisterModule("xpbar", function ()
|
||||
pfUI.xp.bar = CreateFrame("StatusBar", nil, pfUI.xp)
|
||||
pfUI.xp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.xp.bar:ClearAllPoints()
|
||||
pfUI.xp.bar:SetPoint("TOPLEFT", pfUI.xp, "TOPLEFT", 3, -3)
|
||||
pfUI.xp.bar:SetPoint("BOTTOMRIGHT", pfUI.xp, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.xp.bar:SetAllPoints(pfUI.xp)
|
||||
pfUI.xp.bar:SetFrameStrata("MEDIUM")
|
||||
pfUI.xp.bar:SetStatusBarColor(.25,.25,1,1)
|
||||
pfUI.xp.bar:SetMinMaxValues(0, 100)
|
||||
@@ -89,25 +88,23 @@ pfUI:RegisterModule("xpbar", function ()
|
||||
pfUI.xp.restedbar = CreateFrame("StatusBar", nil, pfUI.xp)
|
||||
pfUI.xp.restedbar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.xp.restedbar:ClearAllPoints()
|
||||
pfUI.xp.restedbar:SetPoint("TOPLEFT", pfUI.xp, "TOPLEFT", 3, -3)
|
||||
pfUI.xp.restedbar:SetPoint("BOTTOMRIGHT", pfUI.xp, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.xp.restedbar:SetAllPoints(pfUI.xp)
|
||||
pfUI.xp.restedbar:SetFrameStrata("HIGH")
|
||||
pfUI.xp.restedbar:SetStatusBarColor(1,.25,1,.5)
|
||||
pfUI.xp.restedbar:SetMinMaxValues(0, 100)
|
||||
pfUI.xp.restedbar:SetOrientation("VERTICAL")
|
||||
|
||||
pfUI.rep = CreateFrame("Frame",nil, pfUI.bars.bottom)
|
||||
pfUI.rep:SetWidth(10)
|
||||
pfUI.rep:SetPoint("TOPRIGHT",pfUI.chat.right,"TOPLEFT", -1, 0)
|
||||
pfUI.rep:SetPoint("BOTTOMRIGHT",pfUI.chat.right,"BOTTOMLEFT",-1, 0)
|
||||
pfUI.rep:SetWidth(5)
|
||||
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:SetFrameStrata("BACKGROUND")
|
||||
pfUI.rep:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.utils:CreateBackdrop(pfUI.rep)
|
||||
|
||||
pfUI.rep.bar = CreateFrame("StatusBar", nil, pfUI.rep)
|
||||
pfUI.rep.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
|
||||
pfUI.rep.bar:ClearAllPoints()
|
||||
pfUI.rep.bar:SetPoint("TOPLEFT", pfUI.rep, "TOPLEFT", 3, -3)
|
||||
pfUI.rep.bar:SetPoint("BOTTOMRIGHT", pfUI.rep, "BOTTOMRIGHT", -3, 3)
|
||||
pfUI.rep.bar:SetAllPoints(pfUI.rep)
|
||||
pfUI.rep.bar:SetMinMaxValues(0, 100)
|
||||
pfUI.rep.bar:SetOrientation("VERTICAL")
|
||||
pfUI.rep.bar:SetValue(59)
|
||||
|
||||
@@ -19,7 +19,6 @@ end
|
||||
|
||||
pfUI = CreateFrame("Frame",nil,UIParent)
|
||||
pfUI:RegisterEvent("ADDON_LOADED")
|
||||
--pfUI:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
|
||||
-- initialize default variables
|
||||
pfUI.cache = {}
|
||||
@@ -36,15 +35,6 @@ pfLocaleSpellEvents = {}
|
||||
pfLocaleSpellInterrupts = {}
|
||||
|
||||
pfUI:SetScript("OnEvent", function()
|
||||
pfUI.cache["locale"] = GetLocale()
|
||||
if pfUI.cache["locale"] ~= "enUS" and
|
||||
pfUI.cache["locale"] ~= "frFR" and
|
||||
pfUI.cache["locale"] ~= "deDE" and
|
||||
pfUI.cache["locale"] ~= "zhCN" and
|
||||
pfUI.cache["locale"] ~= "ruRU" then
|
||||
pfUI.cache["locale"] = "enUS"
|
||||
end
|
||||
|
||||
if not pfUI_init then
|
||||
pfUI_init = {}
|
||||
end
|
||||
@@ -55,6 +45,16 @@ pfUI:SetScript("OnEvent", function()
|
||||
pfUI.environment:UpdateFonts()
|
||||
pfUI.environment:UpdateColors()
|
||||
|
||||
-- fill the cache
|
||||
pfUI.cache["locale"] = GetLocale()
|
||||
if pfUI.cache["locale"] ~= "enUS" and
|
||||
pfUI.cache["locale"] ~= "frFR" and
|
||||
pfUI.cache["locale"] ~= "deDE" and
|
||||
pfUI.cache["locale"] ~= "zhCN" and
|
||||
pfUI.cache["locale"] ~= "ruRU" then
|
||||
pfUI.cache["locale"] = "enUS"
|
||||
end
|
||||
|
||||
if arg1 == "pfUI" then
|
||||
for i,m in pairs(this.modules) do
|
||||
-- do not load disabled modules
|
||||
@@ -65,6 +65,8 @@ pfUI:SetScript("OnEvent", function()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end)
|
||||
|
||||
function pfUI:RegisterModule(n, f)
|
||||
@@ -73,15 +75,14 @@ function pfUI:RegisterModule(n, f)
|
||||
end
|
||||
|
||||
pfUI.backdrop = {
|
||||
bgFile = "Interface\\AddOns\\pfUI\\img\\bg", tile = true, tileSize = 8,
|
||||
bgFile = "Interface\\AddOns\\pfUI\\img\\col", tile = true, tileSize = 8,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0},
|
||||
insets = {left = -1, right = -1, top = -1, bottom = -1},
|
||||
}
|
||||
|
||||
pfUI.backdrop_col = {
|
||||
bgFile = "Interface\\AddOns\\pfUI\\img\\bg", tile = true, tileSize = 8,
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0},
|
||||
pfUI.backdrop_small = {
|
||||
bgFile = "Interface\\AddOns\\pfUI\\img\\col", tile = true, tileSize = 8,
|
||||
insets = {left = -1, right = -1, top = -1, bottom = -1},
|
||||
}
|
||||
|
||||
pfUI.backdrop_underline = {
|
||||
@@ -111,6 +112,62 @@ function pfUI.utils:UpdateMovable(frame)
|
||||
end
|
||||
end
|
||||
|
||||
function pfUI.utils:CreateBackdrop(f, inset, legacy, transp)
|
||||
-- use default inset if nothing is given
|
||||
local border = inset
|
||||
if not border then
|
||||
border = tonumber(pfUI_config.appearance.border.default)
|
||||
end
|
||||
|
||||
-- bg and edge colors
|
||||
if not pfUI.cache.br then
|
||||
local br, bg, bb, ba = strsplit(",", pfUI_config.appearance.border.background)
|
||||
local er, eg, eb, ea = strsplit(",", pfUI_config.appearance.border.color)
|
||||
pfUI.cache.br, pfUI.cache.bg, pfUI.cache.bb, pfUI.cache.ba = br, bg, bb, ba
|
||||
pfUI.cache.er, pfUI.cache.eg, pfUI.cache.eb, pfUI.cache.ea = er, eg, eb, ea
|
||||
end
|
||||
|
||||
local br, bg, bb, ba = pfUI.cache.br, pfUI.cache.bg, pfUI.cache.bb, pfUI.cache.ba
|
||||
local er, eg, eb, ea = pfUI.cache.er, pfUI.cache.eg, pfUI.cache.eb, pfUI.cache.ea
|
||||
if transp then ba = .8 end
|
||||
|
||||
-- use legacy backdrop handling
|
||||
if legacy then
|
||||
f:SetBackdrop(pfUI.backdrop)
|
||||
f:SetBackdropColor(br, bg, bb, ba)
|
||||
f:SetBackdropBorderColor(er, eg, eb , ea)
|
||||
return
|
||||
end
|
||||
|
||||
-- use new backdrop behaviour
|
||||
if not f.backdrop then
|
||||
f:SetBackdrop(nil)
|
||||
|
||||
local border = tonumber(border) - 1
|
||||
local backdrop = pfUI.backdrop
|
||||
if border < 1 then backdrop = pfUI.backdrop_small end
|
||||
local b = CreateFrame("Frame", nil, f)
|
||||
b:SetPoint("TOPLEFT", f, "TOPLEFT", -border, border)
|
||||
b:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", border, -border)
|
||||
|
||||
local level = f:GetFrameLevel()
|
||||
if level < 1 then
|
||||
--f:SetFrameLevel(level + 1)
|
||||
b:SetFrameLevel(level)
|
||||
else
|
||||
b:SetFrameLevel(level - 1)
|
||||
end
|
||||
|
||||
f.backdrop = b
|
||||
b:SetBackdrop(backdrop)
|
||||
end
|
||||
|
||||
local b = f.backdrop
|
||||
b:SetBackdropColor(br, bg, bb, ba)
|
||||
b:SetBackdropBorderColor(er, eg, eb , ea)
|
||||
end
|
||||
|
||||
|
||||
message = function (msg)
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffcccc33INFO: |cffffff55"..msg)
|
||||
end
|
||||
@@ -147,8 +204,7 @@ function pfUI.info:ShowInfoBox(text, time, parent, height)
|
||||
|
||||
pfUI.info:SetWidth(pfUI.info.text:GetStringWidth() + 50)
|
||||
pfUI.info:SetHeight(height)
|
||||
pfUI.info:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.info:SetBackdropColor(0,0,0,.75)
|
||||
pfUI.utils:CreateBackdrop(pfUI.info)
|
||||
pfUI.info:SetPoint("TOP", 0, -25)
|
||||
|
||||
pfUI.info.timeout:ClearAllPoints()
|
||||
|
||||
@@ -29,6 +29,7 @@ modules\actionbar.lua
|
||||
modules\chat.lua
|
||||
modules\font.lua
|
||||
modules\addons.lua
|
||||
modules\minimap.lua
|
||||
modules\panel.lua
|
||||
modules\player.lua
|
||||
modules\target.lua
|
||||
@@ -37,7 +38,6 @@ modules\pet.lua
|
||||
modules\group.lua
|
||||
modules\raid.lua
|
||||
modules\castbar.lua
|
||||
modules\minimap.lua
|
||||
modules\skin.lua
|
||||
modules\xpbar.lua
|
||||
modules\autoshift.lua
|
||||
|
||||
Reference in New Issue
Block a user