完成多出修改
修复拾取界面点击无效问题 修复宠物训练界面不显示训练点问题 新增天赋分享到聊天界面 修复飞行界面无法关闭问题 修复术士宠物的显示问题 为天赋界面添加默认数据库支持 框架现在也可自主选择是否启用 玩家框架和目标框架可取消显示3D头像以及透明度修改 背包和银行也添加透明度自定义支持 优化tooltip性能和背包物品显示方式 修复布局模式在ui缩放后不能正常定位的问题 添加硬核模式危险和死亡的工会通报 添加拾取和已拾取的框体 等等
This commit is contained in:
@@ -437,7 +437,7 @@ local function ApplySkin()
|
||||
end
|
||||
end
|
||||
|
||||
-- 14b) Aggressive cleanup: clear backdrops/textures on ALL non-essential children
|
||||
-- 14b) Cleanup: only target known decorative inset/background children
|
||||
local knownFrames = {}
|
||||
if PetStableModel then knownFrames[PetStableModel] = true end
|
||||
if PetStableFrameCloseButton then knownFrames[PetStableFrameCloseButton] = true end
|
||||
@@ -453,83 +453,15 @@ local function ApplySkin()
|
||||
for _, child in ipairs(allCh) do
|
||||
if not knownFrames[child] and not child.sfSkinned
|
||||
and not child.sfOverlay and not child.sfBorder then
|
||||
NukeTextures(child)
|
||||
if child.SetBackdrop then child:SetBackdrop(nil) end
|
||||
local subCh = { child:GetChildren() }
|
||||
for _, sc in ipairs(subCh) do
|
||||
NukeTextures(sc)
|
||||
if sc.SetBackdrop then sc:SetBackdrop(nil) end
|
||||
local cName = child:GetName() or ""
|
||||
if string.find(cName, "Inset") or string.find(cName, "Bg")
|
||||
or string.find(cName, "Border") or string.find(cName, "Tab") then
|
||||
NukeTextures(child)
|
||||
if child.SetBackdrop then child:SetBackdrop(nil) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- 15) Auto-compact: measure left padding, then apply uniformly to right & bottom
|
||||
local frameTop = frame:GetTop()
|
||||
local frameLeft = frame:GetLeft()
|
||||
local frameRight = frame:GetRight()
|
||||
local frameBot = frame:GetBottom()
|
||||
if frameTop and frameLeft and frameRight and frameBot then
|
||||
local contentLeft = frameRight
|
||||
local contentRight = frameLeft
|
||||
local contentBot = frameTop
|
||||
local function Scan(obj)
|
||||
if not obj:IsShown() then return end
|
||||
local l = obj.GetLeft and obj:GetLeft()
|
||||
local r = obj.GetRight and obj:GetRight()
|
||||
local b = obj.GetBottom and obj:GetBottom()
|
||||
if l and l < contentLeft then contentLeft = l end
|
||||
if r and r > contentRight then contentRight = r end
|
||||
if b and b < contentBot then contentBot = b end
|
||||
end
|
||||
local children = { frame:GetChildren() }
|
||||
for _, child in ipairs(children) do
|
||||
if not child.sfOverlay and not child.sfBorder then
|
||||
Scan(child)
|
||||
end
|
||||
end
|
||||
local regions = { frame:GetRegions() }
|
||||
for _, r in ipairs(regions) do
|
||||
if not r.sfNuked and not r.sfKeep then
|
||||
Scan(r)
|
||||
end
|
||||
end
|
||||
-- Also scan named Blizzard content elements directly
|
||||
local contentNames = {
|
||||
"PetStableCurrentPet", "PetStablePurchaseButton",
|
||||
"PetStableModel", "PetStableFrameCloseButton",
|
||||
}
|
||||
for i = 1, 20 do
|
||||
table.insert(contentNames, "PetStableStableSlot" .. i)
|
||||
table.insert(contentNames, "PetStableSlot" .. i)
|
||||
end
|
||||
for _, n in ipairs(contentNames) do
|
||||
local obj = _G[n]
|
||||
if obj and obj.IsShown and obj:IsShown() then Scan(obj) end
|
||||
end
|
||||
-- Scan visible FontStrings on the frame (they are content)
|
||||
for _, r in ipairs(regions) do
|
||||
if r:IsObjectType("FontString") and r:IsShown() and r:GetText()
|
||||
and r:GetText() ~= "" then
|
||||
local l = r:GetLeft()
|
||||
local ri = r:GetRight()
|
||||
local b = r:GetBottom()
|
||||
if l and l < contentLeft then contentLeft = l end
|
||||
if ri and ri > contentRight then contentRight = ri end
|
||||
if b and b < contentBot then contentBot = b end
|
||||
end
|
||||
end
|
||||
local leftPad = contentLeft - frameLeft
|
||||
if leftPad < 4 then leftPad = 4 end
|
||||
if leftPad > 16 then leftPad = 16 end
|
||||
local newW = (contentRight - frameLeft) + leftPad
|
||||
local newH = (frameTop - contentBot) + leftPad
|
||||
if newW < frame:GetWidth() then
|
||||
frame:SetWidth(newW)
|
||||
end
|
||||
if newH < frame:GetHeight() then
|
||||
frame:SetHeight(newH)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user