several fixes for inspect with new patch

Note:  Seeing talents of other players is a thing from t-wow side, this doesn't work until fixed by turtle-wow
This commit is contained in:
Meow
2026-03-20 18:08:16 +01:00
parent f730838e79
commit 6c4af1c92c
2 changed files with 92 additions and 59 deletions
+32 -15
View File
@@ -299,30 +299,39 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function ()
local initialized = false
HookAddonOrVariable("Blizzard_InspectUI", function()
-- one-time setup: skin frame structure on first open
hooksecurefunc("InspectFrame_Show", function()
-- break if theres nothing left to do
if initialized then return end
-- adjust ui positions
SkinTab(InspectFrameTab3)
InspectFrameTab3:ClearAllPoints()
InspectFrameTab3:SetPoint("LEFT", InspectFrameTab2, "RIGHT", GetBorderSize()*2 + 1, 0)
TWTalentFrameTab1:SetPoint("TOPLEFT", TWTalentFrameScrollFrame, "TOPLEFT", 2, TWTalentFrameTab1:GetHeight() + 4)
-- skin Tab3 and Tab4 positions
local border = GetBorderSize()
if InspectFrameTab3 then
SkinTab(InspectFrameTab3)
InspectFrameTab3:ClearAllPoints()
InspectFrameTab3:SetPoint("LEFT", InspectFrameTab2, "RIGHT", border*2 + 1, 0)
InspectFrameTab3:Hide()
InspectFrameTab3:Show()
end
if InspectFrameTab4 then
SkinTab(InspectFrameTab4)
InspectFrameTab4:ClearAllPoints()
InspectFrameTab4:SetPoint("LEFT", InspectFrameTab3, "RIGHT", border*2 + 1, 0)
InspectFrameTab4:Hide()
InspectFrameTab4:Show()
end
-- reload text position
InspectFrameTab3:Hide()
InspectFrameTab3:Show()
-- skin inspect window elements
-- skin InspectTalentsFrame container and scrollbar
StripTextures(InspectTalentsFrame)
StripTextures(TWTalentFrameScrollFrame)
SkinScrollbar(TWTalentFrameScrollFrameScrollBar)
-- skin the 3 talent tree tabs
for i = 1, 3 do
SkinTab(_G["TWTalentFrameTab"..i])
end
-- skin each talent button
for i = 1, MAX_NUM_TALENTS do
-- skin each talent button (buttons exist in XML already, data arrives later via addon msg)
for i = 1, (MAX_NUM_TALENTS or 100) do
local talent = _G["TWTalentFrameTalent" .. i]
if talent then
StripTextures(talent)
@@ -331,9 +340,17 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function ()
end
end
-- only run once
initialized = true
end)
-- TWTalentFrame_OnShow fires AFTER talent data has arrived via addon messages
-- so this is the right place to fix the tab1 position
hooksecurefunc("TWTalentFrame_OnShow", function()
if TWTalentFrameTab1 then
TWTalentFrameTab1:ClearAllPoints()
TWTalentFrameTab1:SetPoint("TOPLEFT", TWTalentFrameScrollFrame, "TOPLEFT", 2, TWTalentFrameTab1:GetHeight() + 4)
end
end)
end)
end
@@ -4086,4 +4103,4 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function ()
[92075]="0,320000", [92079]="0,120000", [93061]="0,1", [93088]="0,1", [93092]="37,150", [93093]="37,150",
[93094]="2500,10000", [93095]="2500,10000", [93096]="37,150"
}
end)
end)
+60 -44
View File
@@ -59,8 +59,10 @@ pfUI:RegisterSkin("Inspect", "tbc", function ()
StripTextures(InspectPaperDollFrame)
EnableClickRotate(InspectModelFrame)
InspectModelRotateLeftButton:Hide()
InspectModelRotateRightButton:Hide()
local rotL = InspectModelRotateLeftButton or InspectModelFrameRotateLeftButton
if rotL then rotL:Hide() end
local rotR = InspectModelRotateRightButton or InspectModelFrameRotateRightButton
if rotR then rotR:Hide() end
for _, slot in pairs(slots) do
local frame = _G["Inspect"..slot]
@@ -89,39 +91,8 @@ pfUI:RegisterSkin("Inspect", "tbc", function ()
StripTextures(InspectPVPFrame)
end
do -- Talent Tab
StripTextures(InspectTalentFrame)
InspectTalentFrameCancelButton:Hide()
InspectTalentFrameCloseButton:Hide()
InspectTalentFrameSpentPoints:ClearAllPoints()
InspectTalentFrameSpentPoints:SetPoint("BOTTOMRIGHT", InspectTalentFrame, "BOTTOMRIGHT", 0, 83)
StripTextures(InspectTalentFrameScrollFrame)
SkinScrollbar(InspectTalentFrameScrollFrameScrollBar)
for i = 1, MAX_NUM_TALENTS do
local talent = _G["InspectTalentFrameTalent"..i]
if talent then
StripTextures(talent)
SkinButton(talent, nil, nil, nil, _G["InspectTalentFrameTalent"..i.."IconTexture"])
_G["InspectTalentFrameTalent"..i.."Rank"]:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
end
end
for i = 1, 3 do
local tab = _G["InspectTalentFrameTab"..i]
local lastTab = _G["InspectTalentFrameTab"..(i-1)]
tab:ClearAllPoints()
if lastTab then
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
else
tab:SetPoint("TOPLEFT", 70, -50)
end
SkinTab(tab)
end
end
-- NOTE: Old "InspectTalentFrame" block removed - Turtle WoW replaced it with
-- InspectTalentsFrame + TWTalentFrame (handled below in "Turtle WoW Talent Tab")
end)
end)
@@ -147,19 +118,29 @@ pfUI:RegisterSkin("Inspect", "vanilla", function ()
InspectNameText:ClearAllPoints()
InspectNameText:SetPoint("TOP", InspectFrame.backdrop, "TOP", 0, -10)
SkinTab(InspectFrameTab1)
InspectFrameTab1:ClearAllPoints()
InspectFrameTab1:SetPoint("TOPLEFT", InspectFrame.backdrop, "BOTTOMLEFT", bpad, -(border + (border == 1 and 1 or 2)))
SkinTab(InspectFrameTab2)
InspectFrameTab2:ClearAllPoints()
InspectFrameTab2:SetPoint("LEFT", InspectFrameTab1, "RIGHT", border*2 + 1, 0)
-- Turtle WoW has 4 inspect tabs: Character, Honor, Arena, Talents
for i = 1, 4 do
local tab = _G["InspectFrameTab"..i]
if tab then
local lastTab = _G["InspectFrameTab"..(i-1)]
tab:ClearAllPoints()
if lastTab then
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
else
tab:SetPoint("TOPLEFT", InspectFrame.backdrop, "BOTTOMLEFT", bpad, -(border + (border == 1 and 1 or 2)))
end
SkinTab(tab)
end
end
do -- Character Tab
StripTextures(InspectPaperDollFrame)
EnableClickRotate(InspectModelFrame)
InspectModelRotateLeftButton:Hide()
InspectModelRotateRightButton:Hide()
local rotL = InspectModelRotateLeftButton or InspectModelFrameRotateLeftButton
if rotL then rotL:Hide() end
local rotR = InspectModelRotateRightButton or InspectModelFrameRotateRightButton
if rotR then rotR:Hide() end
for _, slot in pairs(slots) do
local frame = _G["Inspect"..slot]
@@ -274,5 +255,40 @@ pfUI:RegisterSkin("Inspect", "vanilla", function ()
InspectHonorFrameProgressBar:SetStatusBarTexture(pfUI.media["img:bar"])
InspectHonorFrameProgressBar:SetHeight(24)
end
do -- Turtle WoW Talent Tab (TWTalentFrame)
if TWTalentFrame then
StripTextures(TWTalentFrame)
StripTextures(TWTalentFrameScrollFrame)
SkinScrollbar(TWTalentFrameScrollFrameScrollBar)
for i = 1, (MAX_NUM_TALENTS or 100) do
local talent = _G["TWTalentFrameTalent"..i]
if talent then
StripTextures(talent)
SkinButton(talent, nil, nil, nil, _G["TWTalentFrameTalent"..i.."IconTexture"])
local rank = _G["TWTalentFrameTalent"..i.."Rank"]
if rank then
rank:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
end
end
end
for i = 1, 3 do
local tab = _G["TWTalentFrameTab"..i]
if tab then
SkinTab(tab)
tab:ClearAllPoints()
local lastTab = _G["TWTalentFrameTab"..(i-1)]
if lastTab then
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
else
tab:SetPoint("TOPLEFT", TWTalentFrame, "TOPLEFT", 70, -3)
end
end
end
end
end
end)
end)
end)