Update for patch 1.18.1

This commit is contained in:
Meow
2026-03-20 05:33:35 +01:00
parent 74a92dae07
commit 0917caa80e
7 changed files with 441 additions and 1 deletions
+152
View File
@@ -0,0 +1,152 @@
pfUI:RegisterSkin("Turtle LFT", "vanilla", function ()
-- Only run if the LFT addon is loaded
if not LFTFrame then return end
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
-- ============================================================
-- LFTFrame (main window)
-- ============================================================
StripTextures(LFTFrame, true)
CreateBackdrop(LFTFrame, nil, nil, .75)
CreateBackdropShadow(LFTFrame)
-- pull backdrop inset to match the actual usable area
-- original frame is 384x512 with large art borders
LFTFrame.backdrop:SetPoint("TOPLEFT", LFTFrame, "TOPLEFT", 14, -10)
LFTFrame.backdrop:SetPoint("BOTTOMRIGHT", LFTFrame, "BOTTOMRIGHT", -30, 70)
LFTFrame:SetHitRectInsets(14, 30, 10, 70)
EnableMovable(LFTFrame)
-- close button (unnamed UIPanelCloseButton child)
local closeBtn = GetNoNameObject(LFTFrame, "Button", nil, "UI-Panel-MinimizeButton-Up")
if closeBtn then
SkinCloseButton(closeBtn, LFTFrame.backdrop, -6, -6)
end
-- title
local title = GetNoNameObject(LFTFrame, "FontString")
if title then
title:ClearAllPoints()
title:SetPoint("TOP", LFTFrame.backdrop, "TOP", 0, -10)
end
-- tabs
SkinTab(LFTFrameTab1)
LFTFrameTab1:ClearAllPoints()
LFTFrameTab1:SetPoint("TOPLEFT", LFTFrame.backdrop, "BOTTOMLEFT", bpad, -(border + (border == 1 and 1 or 2)))
SkinTab(LFTFrameTab2)
LFTFrameTab2:ClearAllPoints()
LFTFrameTab2:SetPoint("LEFT", LFTFrameTab1, "RIGHT", border * 2 + 1, 0)
-- scrollframe
StripTextures(LFTFrameScrollFrame)
CreateBackdrop(LFTFrameScrollFrame)
SkinScrollbar(LFTFrameScrollFrameScrollBar, true)
-- search editbox
if LFTFrameSearch then
StripTextures(LFTFrameSearch)
CreateBackdrop(LFTFrameSearch)
end
-- dropdown
SkinDropDown(LFTFrameDropDown, nil, nil, nil, true)
-- main buttons
SkinButton(LFTFrameMainButton)
SkinButton(LFTFrameNewGroupButton)
SkinButton(LFTFrameSendMessageButton)
-- ============================================================
-- LFTNewGroupFrame (create / edit group panel)
-- ============================================================
-- NOTE: Do NOT use StripTextures recursively here — the role
-- icon textures ($parentIcon on BORDER layer) live on the
-- EditBox children and would be wiped out.
StripTextures(LFTNewGroupFrame) -- non-recursive: only the frame itself
CreateBackdrop(LFTNewGroupFrame, nil, nil, .75)
CreateBackdropShadow(LFTNewGroupFrame)
-- title editbox background buttons (decorative frames, safe to strip)
if LFTNewGroupTitleBackground then StripTextures(LFTNewGroupTitleBackground) end
if LFTNewGroupDescriptionBackground then StripTextures(LFTNewGroupDescriptionBackground) end
-- title editbox — backdrop only, no StripTextures (keeps font/focus intact)
if LFTNewGroupTitleText then
CreateBackdrop(LFTNewGroupTitleText)
end
-- description scrollframe
if LFTNewGroupDescription then
StripTextures(LFTNewGroupDescription)
CreateBackdrop(LFTNewGroupDescription)
SkinScrollbar(LFTNewGroupDescriptionScrollBar, true)
end
-- role limit editboxes — strip only the border slice textures, restore icons after
local roleIcons = {
"Interface\\FrameXML\\LFT\\images\\tank2",
"Interface\\FrameXML\\LFT\\images\\healer2",
"Interface\\FrameXML\\LFT\\images\\damage2",
}
for i = 1, 3 do
local eb = _G["LFTNewGroupRole" .. i .. "EditBox"]
if eb then
-- strip the three Common-Input-Border slice textures by name
local left = _G["LFTNewGroupRole" .. i .. "EditBoxLeft"]
local right = _G["LFTNewGroupRole" .. i .. "EditBoxRight"]
local middle = _G["LFTNewGroupRole" .. i .. "EditBoxMiddle"]
if left then left:SetTexture(nil) end
if right then right:SetTexture(nil) end
if middle then middle:SetTexture(nil) end
CreateBackdrop(eb)
-- restore the role icon (sits on BORDER layer, untouched by above)
local icon = _G["LFTNewGroupRole" .. i .. "EditBoxIcon"]
if icon then icon:SetTexture(roleIcons[i]) end
end
end
-- preset dropdown
if LFTNewGroupFramePresetDropDown then
SkinDropDown(LFTNewGroupFramePresetDropDown, nil, nil, nil, true)
end
-- buttons
SkinButton(LFTNewGroupOkButton)
SkinButton(LFTNewGroupCancelButton)
if LFTNewGroupFrameDeleteButton then SkinButton(LFTNewGroupFrameDeleteButton) end
if LFTNewGroupFrameRoleCheckButton then SkinButton(LFTNewGroupFrameRoleCheckButton) end
if LFTNewGroupFrameSavePresetButton then SkinButton(LFTNewGroupFrameSavePresetButton) end
-- DeletePresetButton is a pure icon button (CancelButton textures) - leave it untouched
-- ============================================================
-- LFTRoleCheckFrame (role selection popup)
-- ============================================================
StripTextures(LFTRoleCheckFrame, true)
CreateBackdrop(LFTRoleCheckFrame, nil, nil, .9)
CreateBackdropShadow(LFTRoleCheckFrame)
EnableMovable(LFTRoleCheckFrame)
SkinButton(LFTRoleCheckFrameConfirmButton)
SkinButton(LFTRoleCheckFrameDeclineButton)
-- ============================================================
-- LFTGroupReadyFrame (dungeon found popup)
-- ============================================================
StripTextures(LFTGroupReadyFrame, true)
CreateBackdrop(LFTGroupReadyFrame, nil, nil, .9)
CreateBackdropShadow(LFTGroupReadyFrame)
SkinButton(LFTGroupReadyFrameConfirmButton)
SkinButton(LFTGroupReadyFrameDeclineButton)
-- ============================================================
-- LFTGroupReadyStatusFrame (waiting-for-others popup)
-- ============================================================
StripTextures(LFTGroupReadyStatusFrame, true)
CreateBackdrop(LFTGroupReadyStatusFrame, nil, nil, .9)
CreateBackdropShadow(LFTGroupReadyStatusFrame)
end)
+5 -1
View File
@@ -8,7 +8,7 @@ pfUI:RegisterSkin("Macro", "vanilla:tbc", function ()
CreateBackdropShadow(MacroFrame)
MacroFrame.backdrop:SetPoint("TOPLEFT", 10, -10)
MacroFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 72)
MacroFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 52)
MacroFrame:SetHitRectInsets(10,32,10,72)
EnableMovable(MacroFrame)
@@ -38,6 +38,10 @@ pfUI:RegisterSkin("Macro", "vanilla:tbc", function ()
SkinButton(MacroDeleteButton)
SkinButton(MacroExitButton)
SkinButton(MacroNewButton)
MacroDeleteButton:ClearAllPoints()
MacroDeleteButton:SetPoint("BOTTOMLEFT", MacroFrame, "BOTTOMLEFT", 17, 57)
MacroExitButton:ClearAllPoints()
MacroExitButton:SetPoint("BOTTOMRIGHT", MacroFrame, "BOTTOMRIGHT", -32, 57)
MacroNewButton:ClearAllPoints()
MacroNewButton:SetPoint("RIGHT", MacroExitButton, "LEFT", -2*bpad, 0)
+1
View File
@@ -75,6 +75,7 @@ pfUI:RegisterSkin("Options - Interface", "tbc", function ()
end)
pfUI:RegisterSkin("Options - Interface", "vanilla", function ()
if OptionsFrameCategoryList then return end
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
+190
View File
@@ -0,0 +1,190 @@
pfUI:RegisterSkin("Options - New", "vanilla", function ()
if not OptionsFrame or not OptionsFrameCategoryList then return end
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
local br, bg, bb, ba = pfUI.api.GetStringColor(pfUI_config.appearance.border.background)
local er, eg, eb, ea = pfUI.api.GetStringColor(pfUI_config.appearance.border.color)
-- main frame
StripTextures(OptionsFrame)
CreateBackdrop(OptionsFrame, nil, nil, .75)
CreateBackdropShadow(OptionsFrame)
EnableMovable(OptionsFrame)
HookScript(OptionsFrame, "OnShow", function()
this:ClearAllPoints()
this:SetPoint("CENTER", 0, 0)
end)
-- header
if OptionsFrameHeader then
StripTextures(OptionsFrameHeader)
local title = GetNoNameObject(OptionsFrameHeader, "FontString", "ARTWORK", "OPTIONS")
if title then
title:ClearAllPoints()
title:SetPoint("TOP", OptionsFrame.backdrop, "TOP", 0, -10)
end
end
-- category list
if OptionsFrameCategoryList then
StripTextures(OptionsFrameCategoryList)
local catBG = CreateFrame("Frame", nil, OptionsFrame)
catBG:SetFrameLevel(OptionsFrameCategoryList:GetFrameLevel() - 1)
catBG:SetPoint("TOPLEFT", OptionsFrameCategoryList, "TOPLEFT", -border - 6, border + 10)
catBG:SetPoint("BOTTOMRIGHT", OptionsFrameCategoryList, "BOTTOMRIGHT", border, -border)
catBG:SetBackdrop(pfUI.backdrop)
catBG:SetBackdropColor(br, bg, bb, ba)
catBG:SetBackdropBorderColor(er, eg, eb, ea)
if OptionsFrameCategoryListScrollFrame then
StripTextures(OptionsFrameCategoryListScrollFrame)
SkinScrollbar(OptionsFrameCategoryListScrollFrameScrollBar)
end
end
-- content area
if OptionsFrameContent then
StripTextures(OptionsFrameContent)
local contBG = CreateFrame("Frame", nil, OptionsFrame)
contBG:SetFrameLevel(OptionsFrameContent:GetFrameLevel() - 1)
contBG:SetPoint("TOPLEFT", OptionsFrameContent, "TOPLEFT", -border, border + 42)
contBG:SetPoint("BOTTOMRIGHT", OptionsFrameContent, "BOTTOMRIGHT", border, -border + 4)
contBG:SetBackdrop(pfUI.backdrop)
contBG:SetBackdropColor(br, bg, bb, ba)
contBG:SetBackdropBorderColor(er, eg, eb, ea)
if OptionsFrameContentScrollFrame then
StripTextures(OptionsFrameContentScrollFrame)
SkinScrollbar(OptionsFrameContentScrollFrameScrollBar)
end
end
-- search box
if OptionsFrameSearchBox then
StripTextures(OptionsFrameSearchBox)
CreateBackdrop(OptionsFrameSearchBox, nil, nil, .75)
if OptionsFrameSearchBox.backdrop then
OptionsFrameSearchBox.backdrop:SetPoint("TOPLEFT", OptionsFrameSearchBox, "TOPLEFT", -border, border + 0)
OptionsFrameSearchBox.backdrop:SetPoint("BOTTOMRIGHT", OptionsFrameSearchBox, "BOTTOMRIGHT", border, -border - 0)
end
if OptionsFrameSearchBoxClearButton then
OptionsFrameSearchBoxClearButton:ClearAllPoints()
OptionsFrameSearchBoxClearButton:SetPoint("RIGHT", OptionsFrameSearchBox, "RIGHT", -2, 0)
end
end
-- buttons
SkinButton(OptionsFrameOkay)
SkinButton(OptionsFrameCancel)
SkinButton(OptionsFrameDefaults)
OptionsFrameOkay:ClearAllPoints()
OptionsFrameOkay:SetPoint("RIGHT", OptionsFrameCancel, "LEFT", -2*bpad, 0)
-- category buttons
for i = 1, NUM_CATEGORIES_TO_DISPLAY or 18 do
local btn = _G["OptionsFrameCategoryListCategory"..i]
if btn then
local bar = _G["OptionsFrameCategoryListCategory"..i.."Bar"]
if bar then bar:SetTexture("") end
local hl = btn:GetHighlightTexture()
if hl then hl:SetTexture("") end
end
end
-- SkinControls: called after UpdateOptions has set all slider values
local function SkinControls()
if not OptionsFrameContentScrollFrameChild then return end
-- plain buttons (type="button", no .control wrapper)
for i = 1, 20 do
local btn = _G["OptionsFrameButton"..i]
if not btn then break end
if not btn._pfSkinned then
StripTextures(btn, true)
btn:SetBackdrop(pfUI.backdrop)
local br, bg, bb = pfUI.api.GetStringColor(pfUI_config.appearance.border.background)
local er, eg, eb = pfUI.api.GetStringColor(pfUI_config.appearance.border.color)
btn:SetBackdropColor(br, bg, bb, 0.75)
btn:SetBackdropBorderColor(er, eg, eb, 1)
local _, class = UnitClass("player")
local color = RAID_CLASS_COLORS[class]
SetHighlight(btn, color.r, color.g, color.b)
btn:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
HookScript(btn, "OnMouseDown", function()
StripTextures(this, true)
this:SetBackdrop(pfUI.backdrop)
this:SetBackdropColor(br, bg, bb, 0.75)
this:SetBackdropBorderColor(er, eg, eb, 1)
end)
HookScript(btn, "OnMouseUp", function()
StripTextures(this, true)
this:SetBackdrop(pfUI.backdrop)
this:SetBackdropColor(br, bg, bb, 0.75)
this:SetBackdropBorderColor(er, eg, eb, 1)
end)
btn._pfSkinned = true
end
end
-- sliders
for i = 1, 20 do
local wrapper = _G["OptionsFrameSlider"..i]
if not wrapper then break end
if wrapper:IsShown() and wrapper.control then
local ctrl = wrapper.control
SkinSlider(ctrl)
-- reset Low/High labels to original XML positions (prevent drift on re-skin)
local ctrlName = ctrl:GetName()
local minLabel = _G[ctrlName.."MinValue"]
local maxLabel = _G[ctrlName.."MaxValue"]
if minLabel then
minLabel:ClearAllPoints()
minLabel:SetPoint("TOPLEFT", ctrl, "BOTTOMLEFT", 2, 0)
end
if maxLabel then
maxLabel:ClearAllPoints()
maxLabel:SetPoint("TOPRIGHT", ctrl, "BOTTOMRIGHT", -2, 0)
end
end
end
-- checkboxes and dropdowns
for _, child in {OptionsFrameContentScrollFrameChild:GetChildren()} do
if child.control then
local ctype = child.control:GetFrameType()
if ctype == "CheckButton" then
SkinCheckbox(child.control, 28)
if child.control.backdrop then
child.control.backdrop:SetBackdropColor(0, 0, 0, 0)
end
-- reset label indent (dependency offset from OptionsFrame.lua)
if child.label then
child.label:ClearAllPoints()
child.label:SetPoint("LEFT", child, "LEFT", 0, 0)
end
elseif ctype == "Frame" then
local name = child.control:GetName()
if name and _G[name .. "Button"] then
if not child._pfDropSkinned then
SkinDropDown(child.control)
child._pfDropSkinned = true
end
if child.control.backdrop then child.control.backdrop:SetBackdropColor(0, 0, 0, 0) end
if child.control.button and child.control.button.backdrop then
child.control.button.backdrop:SetBackdropColor(0, 0, 0, 0)
end
local textFrame = _G[name .. "Text"]
if textFrame then textFrame:SetDrawLayer("OVERLAY") end
UIDropDownMenu_Initialize(child.control, child.control.initialize)
end
end
end
end
end
-- hook after category selection: UpdateOptions is local so we hook its caller
hooksecurefunc("OptionsListButton_OnClick", SkinControls)
-- also cover initial load
HookScript(OptionsFrame, "OnShow", SkinControls)
end)
+1
View File
@@ -1,4 +1,5 @@
pfUI:RegisterSkin("Options - Sound", "vanilla:tbc", function ()
if OptionsFrameCategoryList then return end
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
+2
View File
@@ -1,4 +1,6 @@
pfUI:RegisterSkin("Options - Video", "vanilla:tbc", function ()
-- on new PTR, OptionsFrameCategoryList exists meaning new combined panel is used
if OptionsFrameCategoryList then return end
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
+90
View File
@@ -0,0 +1,90 @@
pfUI:RegisterSkin("Turtle Shop", "vanilla", function ()
if not ShopFrame then return end
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
-- ============================================================
-- Helper: skin the 8 entry frames
-- ============================================================
local function SkinEntryFrames()
for i = 1, 8 do
local entry = _G["ShopFrameEntryFrame" .. i]
if entry and not entry._pfSkinned then
entry._pfSkinned = true
for _, region in ipairs({ entry:GetRegions() }) do
if region.GetDrawLayer and region:GetDrawLayer() == "BORDER" then
region:SetTexture(nil)
end
end
end
end
end
-- ============================================================
-- ShopFrame main window
-- ============================================================
StripTextures(ShopFrame, true)
CreateBackdrop(ShopFrame, nil, nil, .75)
CreateBackdropShadow(ShopFrame)
ShopFrame.backdrop:SetPoint("TOPLEFT", ShopFrame, "TOPLEFT", 14, -10)
ShopFrame.backdrop:SetPoint("BOTTOMRIGHT", ShopFrame, "BOTTOMRIGHT", -14, 10)
EnableMovable(ShopFrame)
SkinCloseButton(ShopFrameCloseButton, ShopFrame.backdrop, -6, -6)
ShopFrameTitleText:ClearAllPoints()
ShopFrameTitleText:SetPoint("TOP", ShopFrame.backdrop, "TOP", 0, -10)
-- ============================================================
-- Category scrollframe
-- ============================================================
StripTextures(ShopFrameCategoriesScrollFrame)
CreateBackdrop(ShopFrameCategoriesScrollFrame)
SkinScrollbar(ShopFrameCategoriesScrollFrameScrollBar, true)
-- ============================================================
-- Search editbox
-- ============================================================
StripTextures(ShopFrameSearchBox)
CreateBackdrop(ShopFrameSearchBox)
-- ============================================================
-- AutoDress checkbox
-- ============================================================
SkinCheckbox(ShopFrameAutoDress)
-- ============================================================
-- Buttons
-- ============================================================
SkinButton(ShopFrameClaimButton)
CreateBackdrop(ShopFramePreviousButton, nil, true)
CreateBackdrop(ShopFrameNextButton, nil, true)
-- ============================================================
-- Entry frames
-- ============================================================
SkinEntryFrames()
local origOnShow = ShopFrame:GetScript("OnShow")
ShopFrame:SetScript("OnShow", function()
if origOnShow then origOnShow() end
SkinEntryFrames()
end)
-- ============================================================
-- ShopDressUpFrame
-- ============================================================
if ShopDressUpFrame then
StripTextures(ShopDressUpFrame, true)
CreateBackdrop(ShopDressUpFrame, nil, nil, .75)
CreateBackdropShadow(ShopDressUpFrame)
if ShopDressUpFrameUndressButton then SkinButton(ShopDressUpFrameUndressButton) end
if ShopDressUpFrameResetButton then SkinButton(ShopDressUpFrameResetButton) end
if ShopDressUpFrameCloseButton then
SkinCloseButton(ShopDressUpFrameCloseButton, ShopDressUpFrame.backdrop, -6, -6)
end
end
end)