Darken Turtle inspect Arena and Talent frames

Add Darkened UI support for Turtle WoW inspect Arena/Talents, reapply darkening after TWTalentFrame refreshes, and clean up redundant/Vanilla-only hooks.
This commit is contained in:
Dusk-92
2026-08-31 18:53:42 +02:00
committed by GitHub
parent e6225c75f1
commit 7d253bec8c
+37 -2
View File
@@ -87,14 +87,29 @@ local addonframes = {
["Blizzard_TalentUI"] = { "TalentFrame" },
["Blizzard_AuctionUI"] = { "AuctionFrame", "AuctionDressUpFrame" },
["Blizzard_CraftUI"] = { "CraftFrame" },
["Blizzard_InspectUI"] = { "InspectPaperDollFrame", "InspectHonorFrame", "InspectFrameTab1", "InspectFrameTab2" },
["Blizzard_InspectUI"] = {
"InspectPaperDollFrame",
"InspectHonorFrame",
"InspectFrameTab1",
"InspectFrameTab2",
},
["Blizzard_MacroUI"] = { "MacroFrame", "MacroPopupFrame" },
["Blizzard_RaidUI"] = { "ReadyCheckFrame" },
["Blizzard_TalentUI"] = { "TalentFrame" },
["Blizzard_TradeSkillUI"] = { "TradeSkillFrame" },
["Blizzard_TrainerUI"] = { "ClassTrainerFrame" },
}
-- Turtle WoW exposes these extra inspect pages. Keep them out of the generic
-- Vanilla path so missing Turtle-only frames don't leave compatibility lurkers
-- registered for the whole session.
local isTurtle = TargetHPText and TargetHPPercText
if isTurtle then
table.insert(addonframes["Blizzard_InspectUI"], "InspectArenaFrame")
table.insert(addonframes["Blizzard_InspectUI"], "InspectTalentsFrame")
table.insert(addonframes["Blizzard_InspectUI"], "InspectFrameTab3")
table.insert(addonframes["Blizzard_InspectUI"], "InspectFrameTab4")
end
-- sizing is a bit different on tbc
if GetExpansion() == "tbc" then
borders["BuffButton"] = 2
@@ -271,6 +286,26 @@ module.enable = function(self)
end
end
-- Turtle's inspect talent tree is rebuilt by TWTalentFrame_Update().
-- Its background textures are assigned during that update, so the initial
-- InspectTalentsFrame pass may happen too early. Re-darken the parent after
-- each rebuild; it already contains TWTalentFrame, so one recursive scan is
-- sufficient and avoids traversing the same tree twice.
if isTurtle then
HookAddonOrVariable("TWTalentFrame", function()
if not _G.TWTalentFrame or not _G.TWTalentFrame_Update then return end
if not _G.TWTalentFrame.ShaguTweaksDarkHook then
_G.TWTalentFrame.ShaguTweaksDarkHook = true
ShaguTweaks.hooksecurefunc("TWTalentFrame_Update", function()
DarkenFrame(_G.InspectTalentsFrame or _G.TWTalentFrame)
end)
end
DarkenFrame(_G.InspectTalentsFrame or _G.TWTalentFrame)
end)
end
HookAddonOrVariable("Blizzard_TimeManager", function()
DarkenFrame(TimeManagerClockButton)
end)