- forty files that carried the reference's literal Lua are rewritten as our own expression of the behaviour — worst identical run 61 lines down to 7 — and the README now says exactly that - the overlap gate measures the code itself across all four reference corpora, and ratchets: the number may only go down - a lost session ends at the login screen instead of silently re-authenticating and stealing the account back - a building's skybox is a real model: Caverns of Time's white ceiling becomes its painted nebula and additive stars Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
104 lines
6.3 KiB
XML
104 lines
6.3 KiB
XML
<Ui>
|
||
<!--
|
||
The real client's UIErrorsFrame, now declared 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>
|
||
|
||
<!-- RaidWarningFrame (ref RaidWarning.xml:4-24), declared here beside the frame it anchors to.
|
||
|
||
Two corpus addons push into it directly — `Participant/RaidWarn.lua:133` and
|
||
`oRA2/RaidWarn.lua:133` are the same code in two distributions, plus their MainTank.lua's
|
||
"Tank %s has died!" — and both call
|
||
`RaidWarningFrame:AddMessage(text, r, g, b, 1.0, UIERRORS_HOLD_TIME)`. That is the plain
|
||
MessageFrame arity we already ship: the 6th argument is read and DROPPED, because the
|
||
reference's own `0x795590` reads five and stops (messageframe/plain.rs's first law).
|
||
Absent, that line is `attempt to index global` and takes the handler with it.
|
||
(`BigWigs` also names it — in a LOCALISATION STRING, "Suppressing RaidWarningFrame". Not a
|
||
use; 1207.)
|
||
|
||
Geometry quoted: 512x40, insertMode TOP, HIGH + toplevel, TOP anchored to UIErrorsFrame's
|
||
BOTTOM at (0,-10), and the direct-child FontString the class draws its lines through —
|
||
GameFontNormalHuge, CENTER, exactly as the sibling above takes ErrorFont.
|
||
|
||
**No <Scripts>, deliberately.** The reference's OnLoad/OnEvent call into RaidWarning.lua to
|
||
register CHAT_MSG_RAID_WARNING and route it here. We already deliver that chat type through
|
||
`ui_chat::feed`, so wiring a second consumer would print every raid warning TWICE; and
|
||
declaring handlers whose functions we do not ship would raise at load. The frame exists and
|
||
accepts messages, which is what the corpus asks of it — the automatic routing is the
|
||
ChatFrame_OnEvent architecture question, not this frame's.
|
||
|
||
RaidBossEmoteFrame, its sibling in the same file, is NOT declared: zero corpus addons name
|
||
it, and a shadowed name with no caller is building against a guess (1222's rejected clause). -->
|
||
<MessageFrame name="RaidWarningFrame" insertMode="TOP" frameStrata="HIGH" toplevel="true">
|
||
<Size><AbsDimension x="512" y="40"/></Size>
|
||
<Anchors>
|
||
<Anchor point="TOP" relativeTo="UIErrorsFrame" relativePoint="BOTTOM">
|
||
<Offset><AbsDimension x="0" y="-10"/></Offset>
|
||
</Anchor>
|
||
</Anchors>
|
||
<FontString inherits="GameFontNormalHuge" justifyH="CENTER"/>
|
||
</MessageFrame>
|
||
</Ui>
|