Add /tfb test mode for previewing target buffs and debuffs

- /tfb test [buffs debuffs] and an options-panel button fill the target frame
  with fake auras (default 32 buffs, 16 debuffs) to check layout, stacks,
  borders, timers and sweeps. Targets the player if nothing is targeted.
- Fake auras restart when they expire so timers keep running.
- Works on the native path too (icons, stacks, borders only).
- Bump to 0.9.4; tests now 21 scenarios.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019W3rwutyoLNHxXPycYWSMc
This commit is contained in:
2026-11-01 00:22:03 +00:00
co-authored by Claude Sonnet 5.5
parent 09784ec5b2
commit cbf459104b
7 changed files with 153 additions and 11 deletions
+18 -1
View File
@@ -72,6 +72,14 @@ local function CreateOptions()
end);
sliders[i] = slider;
end
local testButton = CreateFrame("Button", "TargetFrameBuffTestButton", panel, "UIPanelButtonTemplate");
testButton:SetWidth(180);
testButton:SetHeight(22);
testButton:SetPoint("TOPLEFT", panel, "TOPLEFT", 22, -330);
testButton:SetText("Toggle test auras");
testButton:SetScript("OnClick", function()
TargetFrameBuff_SetTest(not TargetFrameBuff_IsTest());
end);
local saved = {};
local function Sync()
for i = 1, 3 do checks[i]:SetChecked(TargetFrameBuffDB[checks[i].key]); end
@@ -115,6 +123,15 @@ SlashCmdList["TARGETFRAMEBUFF"] = function(message)
Print("Choose a number from "..min.." to "..max.."."); return;
end
TargetFrameBuffDB[command == "size" and "timerSize" or "warning"] = math.floor(number + 0.5);
elseif (command == "test") then
local _, _, buffs, debuffs = string.find(value, "^(%d+)%s*(%d*)$");
local on;
if (value == "off") then on = false;
elseif (value == "" ) then on = not TargetFrameBuff_IsTest();
elseif (value == "on" or buffs) then on = true;
else Print("Use /tfb test [on|off] or /tfb test <buffs> <debuffs>."); return; end
local _, nb, nd = TargetFrameBuff_SetTest(on, tonumber(buffs), tonumber(debuffs));
Print("test auras: "..(on and ("on ("..nb.." buffs, "..nd.." debuffs). Needs a target; /tfb test turns it off.") or "off"));
elseif (command == "reset") then
TargetFrameBuffDB = nil;
Validate();
@@ -122,7 +139,7 @@ SlashCmdList["TARGETFRAMEBUFF"] = function(message)
CreateOptions();
InterfaceOptionsFrame_OpenToCategory(panel);
else
Print("/tfb timers|highlight|sweeps [on|off], /tfb size 6-20, /tfb warning 0-30, /tfb reset");
Print("/tfb timers|highlight|sweeps [on|off], /tfb size 6-20, /tfb warning 0-30, /tfb test [buffs debuffs], /tfb reset");
return;
end
RefreshAuras();