Files
benilla-octo/crates/benilla-app/assets/ui/ErrorsFrame.xml
T
SamandClaude Fable 5 251daa14c5 addons come alive: Bagnon draws, hovers and clicks
- Lua 5.0's generic-for and nested long strings are restored in a forked VM — 60 corpus addons stopped dying on one deleted opcode
- a day of demand-driven carving takes the 218-addon corpus from 24 addons surviving a session start to 114, with 144 loading without a single error
- Bagnon draws a real bag and answers real gestures — hover tooltip, pickup, use, drag — because our frames wear the reference's names, and the reference's own ContainerFrame.lua runs off the player's install instead of being transcribed
- the physics broad phase leaves: nothing in the client reads a contact, and it was measured at up to 41% of main-thread samples in real sessions

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 18:19:08 +07:00

69 lines
4.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<Ui>
<!--
The real client's UIErrorsFrame, now transcribed as what it actually IS: a
`<MessageFrame>` (ref UIErrorsFrame.xml:4 — 512×60 at TOP (0,-122), displayDuration="5",
insertMode="TOP", with `<FontString inherits="ErrorFont" justifyH="CENTER"/>` as its line
font). UI_INFO_MESSAGE shows YELLOW (1,1,0) — the quest objective-progress toasts land
here — and UI_ERROR_MESSAGE red (1,0.1,0.1), the ref handler verbatim (UIErrorsFrame.lua:8-16;
its SYSMSG arm is unwired, no engine producer yet).
It used to be a hand-rolled `<Frame>` painting three stacked FontStrings from Lua, because
this engine had no MessageFrame widget. It has one now (`script::messageframe::plain`,
`widget::MessageFrameState`), so the file that stood in for it is gone and the display —
insertMode, the vertical cap, the two-phase fade — is the widget's own, exactly as in the
reference. Two consequences worth naming:
* `UIErrorsFrame:AddMessage(text, r, g, b, a)` is REAL now, so FrameXML producers call it
the way the reference does (the old `BenillaErrorsFrame_AddMessage` seam is retired),
and so does an addon: `EasyCopy`, `QuestHistory` and `QuestItem` each died on that exact
line at load. A sixth argument (all three pass one, believing it is a hold time) is
silently IGNORED — the real binding reads five, and honouring it would be unfaithful.
* The post-hold fade is the class ctor's 3.0 s (msgframe-runtime.md, byte-verified), not
the 1.0 s this file used to carry as an explicitly INTERIM guess while that curve was
unpinned. The 5 s hold is unchanged.
frameStrata HIGH is the ref's own (`UIErrorsFrame.xml:4`) and decision 0597's: this frame
overlaps the right edge of every left-slot panel window (character, quest log, loot,
merchant, mail, trainer, taxi — all at TOPLEFT (0,-104)), so in the default MEDIUM its
toasts draw UNDER whichever panel is open, invisible in exactly the state you most want to
read them. The ref also carries toplevel="true"; that is deliberately not transcribed —
HIGH already wins the strata and 0597's fix is the one that was looked at.
-->
<Script><![CDATA[
function UIErrorsFrame_OnLoad()
this:RegisterEvent("UI_INFO_MESSAGE")
this:RegisterEvent("UI_ERROR_MESSAGE")
end
-- ref UIErrorsFrame_OnEvent(event, message) (UIErrorsFrame.lua:8-15) — the message is the
-- DECLARED second parameter, not the `arg1` global: the XML passes `arg1` into it exactly
-- as the reference's own does, and an addon calling the 1.12 arity is then read correctly.
function UIErrorsFrame_OnEvent(event, message)
if not message then return end
if event == "UI_INFO_MESSAGE" then
this:AddMessage(message, 1.0, 1.0, 0.0, 1.0) -- ref UIErrorsFrame.lua:12
elseif event == "UI_ERROR_MESSAGE" then
this:AddMessage(message, 1.0, 0.1, 0.1, 1.0) -- ref UIErrorsFrame.lua:14
end
end
]]></Script>
<MessageFrame name="UIErrorsFrame" displayDuration="5" insertMode="TOP" frameStrata="HIGH">
<Size><AbsDimension x="512" y="60"/></Size>
<Anchors>
<Anchor point="TOP" relativePoint="TOP">
<Offset><AbsDimension x="0" y="-122"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>UIErrorsFrame_OnLoad()</OnLoad>
<OnEvent>UIErrorsFrame_OnEvent(event, arg1)</OnEvent>
</Scripts>
<!-- The line font AND the centring, both: the class draws its messages through this
declared child, so `justifyH="CENTER"` is what keeps the toasts centred in the 512-wide
box (a chat frame's own child says LEFT). ErrorFont = GameFontNormalLarge (ref
Fonts.xml:258), which is the face the hand-rolled version used too. -->
<FontString inherits="ErrorFont" justifyH="CENTER"/>
</MessageFrame>
</Ui>