mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-17 18:20:49 +00:00
Merge branch 'master' into sp-haste-display
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
[](https://github.com/me0wg4ming/pfUI)
|
[](https://github.com/me0wg4ming/pfUI)
|
||||||
[](https://turtlecraft.gg/)
|
[](https://turtlecraft.gg/)
|
||||||
[](https://github.com/balakethelock/SuperWoW)
|
[](https://github.com/balakethelock/SuperWoW)
|
||||||
[](https://gitea.com/avitasia/nampower)
|
[](https://gitea.com/avitasia/nampower)
|
||||||
[](https://codeberg.org/konaka/UnitXP_SP3)
|
[](https://codeberg.org/konaka/UnitXP_SP3)
|
||||||
|
|
||||||
**A pfUI fork specifically optimized for [Turtle WoW](https://turtlecraft.gg/) which requires SuperWoW and Nampower with optional UnitXP_SP3 DLL integration.**
|
**A pfUI fork specifically optimized for [Turtle WoW](https://turtlecraft.gg/) which requires SuperWoW and Nampower with optional UnitXP_SP3 DLL integration.**
|
||||||
|
|||||||
@@ -925,6 +925,7 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("thirdparty", "bag_sort", "enable", "1")
|
pfUI:UpdateConfig("thirdparty", "bag_sort", "enable", "1")
|
||||||
pfUI:UpdateConfig("thirdparty", "mrplow", "enable", "1")
|
pfUI:UpdateConfig("thirdparty", "mrplow", "enable", "1")
|
||||||
pfUI:UpdateConfig("thirdparty", "bcs", "enable", "1")
|
pfUI:UpdateConfig("thirdparty", "bcs", "enable", "1")
|
||||||
|
pfUI:UpdateConfig("thirdparty", "statcompare", "enable", "1")
|
||||||
pfUI:UpdateConfig("thirdparty", "crafty", "enable", "1")
|
pfUI:UpdateConfig("thirdparty", "crafty", "enable", "1")
|
||||||
pfUI:UpdateConfig("thirdparty", "clevermacro", "enable", "1")
|
pfUI:UpdateConfig("thirdparty", "clevermacro", "enable", "1")
|
||||||
pfUI:UpdateConfig("thirdparty", "supercleveroidmacros", "enable", "1")
|
pfUI:UpdateConfig("thirdparty", "supercleveroidmacros", "enable", "1")
|
||||||
|
|||||||
@@ -2814,6 +2814,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
|||||||
CreateConfig(nil, "Bag_Sort", C.thirdparty.bag_sort, "enable", "checkbox", nil, nil, nil, nil, "tbc")
|
CreateConfig(nil, "Bag_Sort", C.thirdparty.bag_sort, "enable", "checkbox", nil, nil, nil, nil, "tbc")
|
||||||
CreateConfig(nil, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox")
|
CreateConfig(nil, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox")
|
||||||
CreateConfig(nil, "BetterCharacterStats", C.thirdparty.bcs, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
CreateConfig(nil, "BetterCharacterStats", C.thirdparty.bcs, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
||||||
|
CreateConfig(nil, "StatCompare", C.thirdparty.statcompare, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
||||||
CreateConfig(nil, "Crafty", C.thirdparty.crafty, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
CreateConfig(nil, "Crafty", C.thirdparty.crafty, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
||||||
CreateConfig(nil, "CleverMacro", C.thirdparty.clevermacro, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
CreateConfig(nil, "CleverMacro", C.thirdparty.clevermacro, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
||||||
CreateConfig(nil, "SuperCleveRoidMacros", C.thirdparty.supercleveroidmacros, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
CreateConfig(nil, "SuperCleveRoidMacros", C.thirdparty.supercleveroidmacros, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
|
||||||
|
|||||||
+144
-10
@@ -1014,21 +1014,85 @@ pfUI:RegisterModule("thirdparty-vanilla", "vanilla", function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
HookAddonOrVariable("BetterCharacterStats", function()
|
HookAddonOrVariable("BetterCharacterStats", function()
|
||||||
if C.thirdparty.bcs.enable == "0" then return end
|
if C.thirdparty.bcs.enable == "0" then return end
|
||||||
StripTextures(BetterCharacterAttributesFrame)
|
|
||||||
|
|
||||||
if PlayerStatFrameLeftDropDown then
|
local bcsframe = _G["BCSFrame"]
|
||||||
SkinDropDown(PlayerStatFrameLeftDropDown, nil, nil, nil, true)
|
if not bcsframe then return end
|
||||||
PlayerStatFrameLeftDropDown.backdrop:SetPoint("TOPLEFT", 19, -2)
|
|
||||||
PlayerStatFrameLeftDropDown.backdrop:SetPoint("BOTTOMRIGHT", -19, 7)
|
local bgframes = {
|
||||||
|
"PlayerStatLeftTop", "PlayerStatLeftMiddle", "PlayerStatLeftBottom",
|
||||||
|
"PlayerStatRightTop", "PlayerStatRightMiddle", "PlayerStatRightBottom",
|
||||||
|
"PlayerStatBackgroundTop", "PlayerStatBackgroundBottom",
|
||||||
|
}
|
||||||
|
|
||||||
|
local function ApplyBCSSkin()
|
||||||
|
for _, region in ipairs({bcsframe:GetRegions()}) do
|
||||||
|
if region and region.Hide then region:Hide() end
|
||||||
|
end
|
||||||
|
|
||||||
|
--for _, name in ipairs(bgframes) do
|
||||||
|
-- local f = _G[name]
|
||||||
|
-- if f then StripTextures(f) f:Hide() end
|
||||||
|
--end
|
||||||
|
|
||||||
|
if not bcsframe.pfborder then
|
||||||
|
local rawborder, border = GetBorderSize()
|
||||||
|
local er, eg, eb, ea = GetStringColor(pfUI_config.appearance.border.color)
|
||||||
|
|
||||||
|
local b = CreateFrame("Frame", nil, bcsframe:GetParent())
|
||||||
|
b:SetFrameLevel(bcsframe:GetFrameLevel() - 2)
|
||||||
|
b:SetPoint("TOPLEFT", bcsframe, "TOPLEFT", -border, border)
|
||||||
|
b:SetPoint("BOTTOMRIGHT", bcsframe, "BOTTOMRIGHT", border, -border)
|
||||||
|
b:SetBackdrop(pfUI.backdrop)
|
||||||
|
b:SetBackdropColor(0, 0, 0, .8)
|
||||||
|
b:SetBackdropBorderColor(er, eg, eb, ea)
|
||||||
|
bcsframe.pfborder = b
|
||||||
|
|
||||||
|
local shadow = CreateFrame("Frame", nil, bcsframe:GetParent())
|
||||||
|
shadow:SetFrameLevel(bcsframe:GetFrameLevel() - 3)
|
||||||
|
shadow:SetPoint("TOPLEFT", b, "TOPLEFT", -3, 3)
|
||||||
|
shadow:SetPoint("BOTTOMRIGHT", b, "BOTTOMRIGHT", 3, -3)
|
||||||
|
shadow:SetBackdrop({ bgFile = pfUI.media["img:blank"], tile = true, tileSize = 1 })
|
||||||
|
shadow:SetBackdropColor(0, 0, 0, .5)
|
||||||
|
bcsframe.pfborder_shadow = shadow
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if PlayerStatFrameRightDropDown then
|
local function ApplyDropDownSkin()
|
||||||
SkinDropDown(PlayerStatFrameRightDropDown, nil, nil, nil, true)
|
if bcsframe.pfdropskinned then return end
|
||||||
PlayerStatFrameRightDropDown.backdrop:SetPoint("TOPLEFT", 19, -2)
|
|
||||||
PlayerStatFrameRightDropDown.backdrop:SetPoint("BOTTOMRIGHT", -19, 7)
|
local left = _G["PlayerStatFrameLeftDropDown"]
|
||||||
|
local right = _G["PlayerStatFrameRightDropDown"]
|
||||||
|
|
||||||
|
if left and left:GetObjectType() == "Frame" then
|
||||||
|
SkinDropDown(left, nil, nil, nil, true)
|
||||||
|
if left.backdrop then
|
||||||
|
left.backdrop:SetPoint("TOPLEFT", 19, -2)
|
||||||
|
left.backdrop:SetPoint("BOTTOMRIGHT", -19, 7)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if right and right:GetObjectType() == "Frame" then
|
||||||
|
SkinDropDown(right, nil, nil, nil, true)
|
||||||
|
if right.backdrop then
|
||||||
|
right.backdrop:SetPoint("TOPLEFT", 19, -2)
|
||||||
|
right.backdrop:SetPoint("BOTTOMRIGHT", -19, 7)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
bcsframe.pfdropskinned = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local dropper = CreateFrame("Frame", nil, UIParent)
|
||||||
|
dropper:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
|
dropper:SetScript("OnEvent", function()
|
||||||
|
this:UnregisterAllEvents()
|
||||||
|
ApplyDropDownSkin()
|
||||||
|
end)
|
||||||
|
|
||||||
|
HookScript(bcsframe, "OnShow", ApplyBCSSkin)
|
||||||
|
ApplyBCSSkin()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
HookAddonOrVariable("MyRolePlay", function()
|
HookAddonOrVariable("MyRolePlay", function()
|
||||||
@@ -1265,4 +1329,74 @@ pfUI:RegisterModule("thirdparty-vanilla", "vanilla", function()
|
|||||||
CreateBackdrop(xpsp3_editBox_FPScap)
|
CreateBackdrop(xpsp3_editBox_FPScap)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
HookAddonOrVariable("StatCompare", function()
|
||||||
|
if C.thirdparty.statcompare and C.thirdparty.statcompare.enable == "0" then return end
|
||||||
|
|
||||||
|
local frames = { "StatCompareSelfFrame", "StatCompareTargetFrame" }
|
||||||
|
|
||||||
|
local function SkinStatCompareFrame(frame)
|
||||||
|
if not frame or frame.pfSkinned then return end
|
||||||
|
|
||||||
|
StripTextures(frame)
|
||||||
|
|
||||||
|
if frame.SetBackdrop then frame:SetBackdrop(nil) end
|
||||||
|
if frame.SetBackdropColor then frame:SetBackdropColor(0, 0, 0, 0) end
|
||||||
|
|
||||||
|
CreateBackdrop(frame, nil, nil, .8)
|
||||||
|
CreateBackdropShadow(frame)
|
||||||
|
|
||||||
|
if frame.backdrop then
|
||||||
|
frame.backdrop:SetBackdropColor(0, 0, 0, .8)
|
||||||
|
local er, eg, eb, ea = GetStringColor(pfUI_config.appearance.border.color)
|
||||||
|
frame.backdrop:SetBackdropBorderColor(er, eg, eb, ea)
|
||||||
|
end
|
||||||
|
|
||||||
|
local closeBtn = _G[frame:GetName() .. "CloseButton"]
|
||||||
|
if closeBtn then
|
||||||
|
SkinCloseButton(closeBtn, frame.backdrop)
|
||||||
|
end
|
||||||
|
|
||||||
|
local otherButtons = { "ArmorButton", "StatsButton", "SpellsButton" }
|
||||||
|
local textures = {
|
||||||
|
"Interface\\Icons\\inv_misc_book_08",
|
||||||
|
"Interface\\Icons\\inv_misc_note_01",
|
||||||
|
"Interface\\Icons\\inv_helmet_10",
|
||||||
|
}
|
||||||
|
|
||||||
|
for i, suffix in ipairs(otherButtons) do
|
||||||
|
local btn = _G[frame:GetName() .. suffix]
|
||||||
|
if btn and not btn.pfMoved then
|
||||||
|
SkinButton(btn)
|
||||||
|
btn:ClearAllPoints()
|
||||||
|
btn:SetPoint("TOPRIGHT", closeBtn, "TOPLEFT", -(i - 1) * btn:GetWidth(), 0)
|
||||||
|
btn.pfMoved = true
|
||||||
|
if not btn.pfIcon then
|
||||||
|
btn.pfIcon = btn:CreateTexture(nil, "OVERLAY")
|
||||||
|
btn.pfIcon:SetTexture(textures[i])
|
||||||
|
btn.pfIcon:SetTexCoord(.08, .92, .08, .92)
|
||||||
|
SetAllPointsOffset(btn.pfIcon, btn, 3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
frame.pfSkinned = true
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, name in ipairs(frames) do
|
||||||
|
local f = _G[name]
|
||||||
|
if f then
|
||||||
|
SkinStatCompareFrame(f)
|
||||||
|
HookScript(f, "OnShow", function()
|
||||||
|
SkinStatCompareFrame(this)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local origSCShowFrame = SCShowFrame
|
||||||
|
_G.SCShowFrame = function(frame, target, tiptitle, tiptext, anchorx, anchory)
|
||||||
|
origSCShowFrame(frame, target, tiptitle, tiptext, anchorx, anchory)
|
||||||
|
SkinStatCompareFrame(frame)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user