Every one of the 34 rows a play session reported was read back out of a capture, and not one was ours: 16 are BetterCharacterPanel anchoring to Blizzard_InspectUI frames that LoadOnDemand has not built yet, 7 are .toc and <Script file> lines naming files their own package does not ship, 10 are TitanPanel/InfoBar/Outfitter integrations in addons whose optional dependencies this player does not have, and 4 are CVars 1.12 never had, which `cvars`'s own test says to leave unregistered. The reference shows the player none of that. A missing parent, a missing relativeTo and an unknown inherits are severity-2 lines in FrameXML.log, and SetCVar on an unregistered name raises into the pcall every addon that writes one already wraps it in. Our window was a deliberate superset, which is right for a compatibility report and wrong for a line reading "34 problems": a TitanPanel plugin with no TitanPanel is not a fault here. So `error` (code raised) and `load` (an addon is not running) stay problems and stay listed, and `warn` -- a call accepted that did not do what it said -- becomes a note, counted beside them and listed behind a new Show notes checkbox. Nothing is dropped; the log still carries every one and the window is one click from all of them. Also closes a hunt: the 283 `SetOwner: unknown anchor 'BOTTOMRIGHT'` warnings that three static sweeps of every installed addon could not place are the realm's own FrameXML, Shop_ProcessEntries forcing items into the cache through a hidden scan tooltip. The seven load failures and the two layout defects from the same session are fixed in the player's own addon copies, mirrored to Addon_Ports; both are written up in docs/ADDON_COMPAT.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
425 lines
24 KiB
XML
425 lines
24 KiB
XML
<Ui>
|
|
<!--
|
|
The script error log, which 1.12 does not have, so every name carries the `Benilla` prefix
|
|
(`tests::reference_surface`); the stock `ScriptErrors` dialog shows one message, this keeps
|
|
the log. Shaped like the reference's CraftFrame. It polls the engine:
|
|
`BenillaGetNumScriptErrors()` is (retained, total-ever), `BenillaGetScriptErrorInfo(i)` is
|
|
`seq, kind, message, count` (1-based, oldest first, nil past the end).
|
|
-->
|
|
<Script><![CDATA[
|
|
-- A pushable above every stock panel's, so a game window opening pushes the log aside.
|
|
UIPanelWindows["BenillaScriptLogFrame"] = { area = "left", pushable = 9, whileDead = 1 }
|
|
|
|
BENILLA_SCRIPTLOG_ROWS = 13
|
|
BENILLA_SCRIPTLOG_ROW_HEIGHT = 16
|
|
-- A wrapped row would break the faux kit's fixed rows.
|
|
BENILLA_SCRIPTLOG_ROW_CHARS = 52
|
|
|
|
-- A `seq`, not an index: indices shift when the cap evicts.
|
|
BenillaScriptLogSelected = nil
|
|
|
|
-- Of the three kinds, two are things the player can act on: `error` (code raised) and
|
|
-- `load` (an addon is not running). A `warn` is a **note**: a call this client accepted
|
|
-- and quietly did nothing with, and almost every one is a document naming a frame,
|
|
-- template or CVar this installation has not got -- a TitanPanel plugin with no
|
|
-- TitanPanel, an `inherits=` on an optional dependency's template, OpenMapClassic
|
|
-- switching off a map CVar 1.12 never had. The reference's answer to each of those is a
|
|
-- severity-2 line in FrameXML.log or a raise inside the addon's own `pcall`, so the
|
|
-- player is shown none of them; counting them as problems made this window read as a
|
|
-- list of client faults when it was a list of addons the player does not own. They are
|
|
-- one checkbox away, and the log still carries every one.
|
|
BenillaScriptLogShowNotes = false
|
|
|
|
-- Engine row indices, in order, for the rows this view shows.
|
|
BenillaScriptLogView = {}
|
|
|
|
function BenillaScriptLog_IsNote(kind)
|
|
return kind == "warn"
|
|
end
|
|
|
|
-- Rebuilds `BenillaScriptLogView`; returns the problem and note counts over every
|
|
-- retained row, shown or not.
|
|
function BenillaScriptLog_Rebuild()
|
|
local retained = BenillaGetNumScriptErrors()
|
|
local view, problems, notes = {}, 0, 0
|
|
for i = 1, retained do
|
|
local _, kind = BenillaGetScriptErrorInfo(i)
|
|
if BenillaScriptLog_IsNote(kind) then
|
|
notes = notes + 1
|
|
if BenillaScriptLogShowNotes then table.insert(view, i) end
|
|
else
|
|
problems = problems + 1
|
|
table.insert(view, i)
|
|
end
|
|
end
|
|
BenillaScriptLogView = view
|
|
return problems, notes
|
|
end
|
|
|
|
function BenillaScriptLog_SetShowNotes(show)
|
|
BenillaScriptLogShowNotes = (show and true) or false
|
|
-- A note read in the detail pane under a list that no longer lists it reads as a
|
|
-- stuck window, so turning them off lets the selection go with them.
|
|
if not BenillaScriptLogShowNotes and BenillaScriptLogSelected then
|
|
for i = 1, BenillaGetNumScriptErrors() do
|
|
local seq, kind = BenillaGetScriptErrorInfo(i)
|
|
if seq == BenillaScriptLogSelected and BenillaScriptLog_IsNote(kind) then
|
|
BenillaScriptLogSelected = nil
|
|
break
|
|
end
|
|
end
|
|
end
|
|
BenillaScriptLog_Update()
|
|
end
|
|
|
|
-- `strsub` counts bytes, so the cut backs up over UTF-8 continuation bytes (0x80..0xBF).
|
|
function BenillaScriptLog_RowText(message)
|
|
local cut = strfind(message, "\n", 1, 1)
|
|
local head = message
|
|
if cut then head = strsub(message, 1, cut - 1) end
|
|
if strlen(head) > BENILLA_SCRIPTLOG_ROW_CHARS then
|
|
local last = BENILLA_SCRIPTLOG_ROW_CHARS - 3
|
|
while last > 0 do
|
|
local b = strbyte(head, last + 1)
|
|
if not b or b < 128 or b >= 192 then break end
|
|
last = last - 1
|
|
end
|
|
head = strsub(head, 1, last) .. "..."
|
|
end
|
|
return head
|
|
end
|
|
|
|
-- `load` red (the addon is not running), `error` amber (code raised), `warn` grey (a call
|
|
-- was accepted and quietly did nothing).
|
|
function BenillaScriptLog_RowColor(kind)
|
|
if kind == "load" then return 1.0, 0.3, 0.3 end
|
|
if kind == "warn" then return 0.65, 0.65, 0.65 end
|
|
return 1.0, 0.82, 0.0
|
|
end
|
|
|
|
function BenillaScriptLog_Update()
|
|
local shown, total = BenillaGetNumScriptErrors()
|
|
local problems, notes = BenillaScriptLog_Rebuild()
|
|
local rows = table.getn(BenillaScriptLogView)
|
|
|
|
getglobal("BenillaScriptLogNotesCheck"):SetChecked(BenillaScriptLogShowNotes)
|
|
|
|
-- "Problems", because `load` is not an error either; the notes are counted beside
|
|
-- them rather than among them, so the window never reports a TitanPanel plugin with
|
|
-- no TitanPanel as a fault of this client's.
|
|
local summary
|
|
if problems == 1 then
|
|
summary = "1 problem"
|
|
elseif problems > 0 then
|
|
summary = format("%d problems", problems)
|
|
else
|
|
summary = "No problems"
|
|
end
|
|
if notes == 1 then
|
|
summary = summary .. ", 1 note"
|
|
elseif notes > 0 then
|
|
summary = summary .. format(", %d notes", notes)
|
|
end
|
|
if problems == 0 and notes == 0 then
|
|
summary = "No problems this session."
|
|
end
|
|
if total > shown then
|
|
summary = summary .. format(" (%d older not kept)", total - shown)
|
|
end
|
|
getglobal("BenillaScriptLogSummary"):SetText(summary)
|
|
|
|
local scrollFrame = getglobal("BenillaScriptLogListScrollFrame")
|
|
FauxScrollFrame_Update(scrollFrame, rows, BENILLA_SCRIPTLOG_ROWS, BENILLA_SCRIPTLOG_ROW_HEIGHT)
|
|
BenillaScrollTrough_Follow("BenillaScriptLogListScrollFrame")
|
|
local offset = FauxScrollFrame_GetOffset(scrollFrame)
|
|
|
|
local selectedRow = nil
|
|
for i = 1, BENILLA_SCRIPTLOG_ROWS do
|
|
local button = getglobal("BenillaScriptLogRow" .. i)
|
|
local index = BenillaScriptLogView[offset + i]
|
|
local seq, kind, message, count
|
|
if index then seq, kind, message, count = BenillaGetScriptErrorInfo(index) end
|
|
if seq then
|
|
button.seq = seq
|
|
button.message = message
|
|
-- `#12 x1113`: one deduplicated failure that happened 1,113 times.
|
|
local label = "#" .. seq
|
|
if count > 1 then label = label .. " x" .. count end
|
|
button.index:SetText(label)
|
|
button.label:SetText(BenillaScriptLog_RowText(message))
|
|
button.label:SetTextColor(BenillaScriptLog_RowColor(kind))
|
|
button:Show()
|
|
if seq == BenillaScriptLogSelected then selectedRow = button end
|
|
else
|
|
button.seq = nil
|
|
button.message = nil
|
|
button:Hide()
|
|
end
|
|
end
|
|
|
|
-- Hides when the row scrolls away, as the reference's CraftFrame does.
|
|
local highlight = getglobal("BenillaScriptLogHighlightFrame")
|
|
if selectedRow then
|
|
highlight:SetPoint("TOPLEFT", selectedRow:GetName(), "TOPLEFT", 0, 0)
|
|
highlight:Show()
|
|
else
|
|
highlight:Hide()
|
|
end
|
|
|
|
BenillaScriptLog_UpdateDetail()
|
|
end
|
|
|
|
-- The selected message in full, traceback and all.
|
|
function BenillaScriptLog_UpdateDetail()
|
|
local text = ""
|
|
if BenillaScriptLogSelected then
|
|
local shown = BenillaGetNumScriptErrors()
|
|
for i = 1, shown do
|
|
local seq, _, message = BenillaGetScriptErrorInfo(i)
|
|
if seq == BenillaScriptLogSelected then
|
|
text = message
|
|
break
|
|
end
|
|
end
|
|
end
|
|
if text == "" then
|
|
text = "Select a row above to read it in full."
|
|
end
|
|
getglobal("BenillaScriptLogDetailText"):SetText(text)
|
|
end
|
|
|
|
-- Text rects resolve after Lua runs, so the detail child is re-measured every frame.
|
|
function BenillaScriptLogFrame_OnUpdate()
|
|
BenillaScroll_ResizeChild("BenillaScriptLogDetailScroll", { "BenillaScriptLogDetailText" })
|
|
end
|
|
|
|
function BenillaScriptLogRow_OnClick(button)
|
|
if not button.seq then return end
|
|
if BenillaScriptLogSelected == button.seq then
|
|
BenillaScriptLogSelected = nil
|
|
else
|
|
BenillaScriptLogSelected = button.seq
|
|
end
|
|
BenillaScriptLog_Update()
|
|
end
|
|
|
|
function BenillaScriptLogFrame_OnLoad(self)
|
|
-- Masks the square icon to the portrait ring.
|
|
SetPortraitToTexture("BenillaScriptLogFramePortrait",
|
|
"Interface\\Icons\\INV_Misc_Note_01")
|
|
end
|
|
|
|
-- The list frame's OnVerticalScroll repaints.
|
|
function BenillaScriptLogFrame_OnMouseWheel(delta)
|
|
BenillaFauxScrollFrame_OnMouseWheel(getglobal("BenillaScriptLogListScrollFrame"), delta)
|
|
end
|
|
|
|
-- ── Entry points ──────────────────────────────────────────────────────────────────────
|
|
|
|
function BenillaScriptLog_Toggle()
|
|
local frame = getglobal("BenillaScriptLogFrame")
|
|
if frame:IsVisible() then
|
|
HideUIPanel(frame)
|
|
else
|
|
ShowUIPanel(frame)
|
|
end
|
|
end
|
|
|
|
-- `/errors clear`: keeps the numbering, so a number never names two failures.
|
|
function BenillaScriptLog_Clear()
|
|
BenillaClearScriptErrors()
|
|
BenillaScriptLogSelected = nil
|
|
if getglobal("BenillaScriptLogFrame"):IsVisible() then
|
|
BenillaScriptLog_Update()
|
|
end
|
|
DEFAULT_CHAT_FRAME:AddMessage("Script log cleared.", 1.0, 1.0, 0.0)
|
|
end
|
|
]]></Script>
|
|
|
|
<!-- One list row: the `#N xCount` column, then the message head. -->
|
|
<Button name="BenillaScriptLogRowTemplate" virtual="true" hidden="true">
|
|
<Size><AbsDimension x="293" y="16"/></Size>
|
|
<Layers>
|
|
<Layer level="ARTWORK">
|
|
<FontString name="$parentIndex" inherits="GameFontNormalSmall" justifyH="LEFT">
|
|
<Size><AbsDimension x="56" y="16"/></Size>
|
|
<Anchors><Anchor point="LEFT" relativePoint="LEFT"><Offset><AbsDimension x="4" y="0"/></Offset></Anchor></Anchors>
|
|
</FontString>
|
|
<FontString name="$parentLabel" inherits="GameFontNormalSmall" justifyH="LEFT">
|
|
<Size><AbsDimension x="229" y="16"/></Size>
|
|
<Anchors><Anchor point="LEFT" relativePoint="LEFT"><Offset><AbsDimension x="62" y="0"/></Offset></Anchor></Anchors>
|
|
</FontString>
|
|
</Layer>
|
|
</Layers>
|
|
<HighlightTexture file="Interface\Buttons\UI-Listbox-Highlight2" alphaMode="ADD"/>
|
|
<Scripts>
|
|
<OnLoad>
|
|
self.index = getglobal(self:GetName() .. "Index")
|
|
self.label = getglobal(self:GetName() .. "Label")
|
|
</OnLoad>
|
|
<OnClick>BenillaScriptLogRow_OnClick(self)</OnClick>
|
|
</Scripts>
|
|
</Button>
|
|
|
|
<Frame name="BenillaScriptLogFrame" hidden="true">
|
|
<!-- The standard left-slot panel size. No <Anchors>: ShowUIPanel seats it. -->
|
|
<Size><AbsDimension x="384" y="512"/></Size>
|
|
<Layers>
|
|
<Layer level="BACKGROUND">
|
|
<!-- OnLoad masks the square icon, whose corners would show through the ring. -->
|
|
<Texture name="BenillaScriptLogFramePortrait" file="Interface\Icons\INV_Misc_Note_01">
|
|
<Size><AbsDimension x="60" y="60"/></Size>
|
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="7" y="-6"/></Offset></Anchor></Anchors>
|
|
</Texture>
|
|
</Layer>
|
|
<!-- The ClassTrainer quadrants, the one profession-free set in the 1.12 art. -->
|
|
<Layer level="BORDER">
|
|
<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-TopLeft"><Size><AbsDimension x="256" y="256"/></Size><Anchors><Anchor point="TOPLEFT"/></Anchors></Texture>
|
|
<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-TopRight"><Size><AbsDimension x="128" y="256"/></Size><Anchors><Anchor point="TOPRIGHT"/></Anchors></Texture>
|
|
<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-BotLeft"><Size><AbsDimension x="256" y="256"/></Size><Anchors><Anchor point="BOTTOMLEFT"/></Anchors></Texture>
|
|
<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-BotRight"><Size><AbsDimension x="128" y="256"/></Size><Anchors><Anchor point="BOTTOMRIGHT"/></Anchors></Texture>
|
|
<FontString name="BenillaScriptLogTitle" inherits="GameFontNormal" justifyH="CENTER" text="Script Errors">
|
|
<Anchors><Anchor point="TOP" relativePoint="TOP"><Offset><AbsDimension x="0" y="-17"/></Offset></Anchor></Anchors>
|
|
</FontString>
|
|
<FontString name="BenillaScriptLogSummary" inherits="GameFontHighlightSmall" justifyH="LEFT" text="">
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="26" y="-76"/></Offset></Anchor></Anchors>
|
|
</FontString>
|
|
</Layer>
|
|
</Layers>
|
|
<Frames>
|
|
<Button name="BenillaScriptLogCloseButton" inherits="UIPanelCloseButton">
|
|
<Anchors><Anchor point="TOPRIGHT"><Offset><AbsDimension x="-29" y="-8"/></Offset></Anchor></Anchors>
|
|
</Button>
|
|
|
|
<!-- The notes toggle, on the summary row and right-aligned with the list. Its label
|
|
is re-anchored to the left so it stays inside the 293-wide list column. -->
|
|
<CheckButton name="BenillaScriptLogNotesCheck" inherits="UICheckButtonTemplate">
|
|
<Size><AbsDimension x="20" y="20"/></Size>
|
|
<Anchors><Anchor point="TOPRIGHT" relativePoint="TOPRIGHT"><Offset><AbsDimension x="-69" y="-72"/></Offset></Anchor></Anchors>
|
|
<Scripts>
|
|
<OnLoad>
|
|
local label = getglobal(self:GetName() .. "Text")
|
|
label:ClearAllPoints()
|
|
label:SetPoint("RIGHT", self, "LEFT", -2, 1)
|
|
label:SetText("Show notes")
|
|
</OnLoad>
|
|
<OnClick>BenillaScriptLog_SetShowNotes(self:GetChecked())</OnClick>
|
|
</Scripts>
|
|
</CheckButton>
|
|
|
|
<!-- Declared before the rows so their text draws over the glow. -->
|
|
<Frame name="BenillaScriptLogHighlightFrame" hidden="true">
|
|
<Size><AbsDimension x="293" y="16"/></Size>
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"/></Anchors>
|
|
<Layers><Layer level="ARTWORK">
|
|
<Texture file="Interface\Buttons\UI-Listbox-Highlight2">
|
|
<Anchors><Anchor point="TOPLEFT"/><Anchor point="BOTTOMRIGHT"/></Anchors>
|
|
</Texture>
|
|
</Layer></Layers>
|
|
</Frame>
|
|
|
|
<Button name="BenillaScriptLogRow1" inherits="BenillaScriptLogRowTemplate">
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="22" y="-94"/></Offset></Anchor></Anchors>
|
|
</Button>
|
|
<Button name="BenillaScriptLogRow2" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow1" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow3" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow2" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow4" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow3" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow5" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow4" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow6" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow5" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow7" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow6" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow8" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow7" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow9" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow8" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow10" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow9" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow11" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow10" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow12" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow11" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
<Button name="BenillaScriptLogRow13" inherits="BenillaScriptLogRowTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaScriptLogRow12" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
|
|
|
<!-- Only the faux kit's right-hand Slider renders. -->
|
|
<ScrollFrame name="BenillaScriptLogListScrollFrame" inherits="FauxScrollFrameTemplate">
|
|
<Size><AbsDimension x="293" y="208"/></Size>
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="22" y="-94"/></Offset></Anchor></Anchors>
|
|
<Scripts>
|
|
<!-- The stock kit has no `updateFunc`, so the repaint is wired here. -->
|
|
<OnVerticalScroll>FauxScrollFrame_OnVerticalScroll(BENILLA_SCRIPTLOG_ROW_HEIGHT, BenillaScriptLog_Update)</OnVerticalScroll>
|
|
</Scripts>
|
|
</ScrollFrame>
|
|
|
|
<!-- The real-scroll kit: a message with its traceback has variable height. -->
|
|
<ScrollFrame name="BenillaScriptLogDetailScroll">
|
|
<Size><AbsDimension x="293" y="128"/></Size>
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="22" y="-314"/></Offset></Anchor></Anchors>
|
|
<Scripts>
|
|
<OnLoad>self:SetScrollChild(getglobal(self:GetName() .. "Child"))</OnLoad>
|
|
<OnMouseWheel>BenillaScroll_OnMouseWheel(self, arg1)</OnMouseWheel>
|
|
<OnVerticalScroll>BenillaScroll_SyncBar(self)</OnVerticalScroll>
|
|
<OnScrollRangeChanged>BenillaScroll_SyncBar(self)</OnScrollRangeChanged>
|
|
</Scripts>
|
|
<Frames>
|
|
<Slider name="$parentBar" inherits="BenillaScrollBarTemplate" hidden="true">
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT"><Offset><AbsDimension x="6" y="-16"/></Offset></Anchor>
|
|
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="6" y="16"/></Offset></Anchor>
|
|
</Anchors>
|
|
<Scripts><OnValueChanged>BenillaScrollBar_OnValueChanged(self, arg1)</OnValueChanged></Scripts>
|
|
</Slider>
|
|
<Frame name="$parentChild">
|
|
<Size><AbsDimension x="293" y="128"/></Size>
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"/></Anchors>
|
|
<Layers>
|
|
<Layer level="ARTWORK">
|
|
<!-- 270 wide so the traceback wraps rather than clips. -->
|
|
<FontString name="BenillaScriptLogDetailText" inherits="GameFontHighlightSmall" justifyH="LEFT" justifyV="TOP" text="">
|
|
<Size><AbsDimension x="270" y="0"/></Size>
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="6" y="-6"/></Offset></Anchor></Anchors>
|
|
</FontString>
|
|
</Layer>
|
|
</Layers>
|
|
</Frame>
|
|
</Frames>
|
|
</ScrollFrame>
|
|
|
|
<Button name="BenillaScriptLogClearButton" inherits="UIPanelButtonTemplate" text="Clear">
|
|
<Size><AbsDimension x="96" y="22"/></Size>
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="22" y="-455"/></Offset></Anchor></Anchors>
|
|
<Scripts><OnClick>BenillaScriptLog_Clear()</OnClick></Scripts>
|
|
</Button>
|
|
<Button name="BenillaScriptLogCloseBottomButton" inherits="UIPanelButtonTemplate" text="Close">
|
|
<Size><AbsDimension x="96" y="22"/></Size>
|
|
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="219" y="-455"/></Offset></Anchor></Anchors>
|
|
<Scripts><OnClick>HideUIPanel(getglobal("BenillaScriptLogFrame"))</OnClick></Scripts>
|
|
</Button>
|
|
</Frames>
|
|
<Scripts>
|
|
<OnLoad>BenillaScriptLogFrame_OnLoad(self)</OnLoad>
|
|
<!-- A spin bubbles up the parent chain; the detail pane's own handler wins there. -->
|
|
<OnMouseWheel>BenillaScriptLogFrame_OnMouseWheel(arg1)</OnMouseWheel>
|
|
<OnShow>BenillaScriptLog_Update()</OnShow>
|
|
<OnUpdate>BenillaScriptLogFrame_OnUpdate()</OnUpdate>
|
|
</Scripts>
|
|
</Frame>
|
|
<!-- Benilla's slash commands, handed to SubmitChatInput (ui_chat::input); loads after the
|
|
stock ChatFrame.xml, which declares SlashCmdList. -->
|
|
<Script><![CDATA[
|
|
local BENILLA_COMMANDS = {
|
|
{ "CHATTEST", "/chattest" },
|
|
{ "SHOT", "/shot" },
|
|
{ "LIQUID", "/liquid" },
|
|
{ "CASTVIS", "/castvis" },
|
|
{ "PARTYTEST", "/partytest" },
|
|
{ "REACTION", "/reaction", "/react" },
|
|
{ "RELOAD", "/reload" },
|
|
{ "ERRORS", "/errors", "/err" },
|
|
{ "CONVERTRAID", "/convertraid" },
|
|
}
|
|
for _, row in ipairs(BENILLA_COMMANDS) do
|
|
local key = "BENILLA_" .. row[1]
|
|
for i = 2, table.getn(row) do
|
|
setglobal("SLASH_" .. key .. (i - 1), row[i])
|
|
end
|
|
SlashCmdList[key] = function(msg)
|
|
SubmitChatInput(row[2] .. " " .. (msg or ""))
|
|
end
|
|
end
|
|
]]></Script>
|
|
</Ui>
|