Files
benilla-octo/crates/benilla-app/assets/ui/TradeFrame.xml
T
SamandClaude Fable 5.1 7e68267395 the raid and reputation panes go stock, and a faction header folds
- the raid and reputation panes are the reference's own files: two manifest lines replace our `RaidFrame.xml` (83 of 84 frame names were already the reference's; the tear-off pullouts arrive) and one replaces our `ReputationFrame.xml`; the raid swap surfaced a loader defect (a font object inherited one level down was the 26 unexplained warnings), rehomed `RaidFrame_LoadUI` and two popup dialogs, and reproduces one reference DEFECT: an emptied lockout list keeps its last row painted (1874); the reputation swap moved the WATCH BAR out of `ActionBar.xml`, where it would have shadowed the chain's own, and exposed an ENGINE gap: `CollapseFactionHeader`/`ExpandFactionHeader` fire `UPDATE_FACTION` (`0x4d5dab`) and ours fired nothing, so with the stock pane repainting on that event alone, a fold painted nothing and the header kept its minus — invisible while our own file repainted itself (1875)
- a wanted poster is a questgiver on the wire as a creature is, and benilla never asked about one; the RE round came back in two halves: the reference DOES send `CMSG_QUESTGIVER_STATUS_QUERY` for a GameObject, gated on `GAMEOBJECT_FLAGS` bit 2, seen in 20 of 62 sniffed sessions — and it can never render the answer (the status handler's typemask excludes a GameObject, its status slot lies past the object's end, and no poster, sign or plaque carries attachment 18); vmangos DOES answer, so the sweep gains a GameObject arm on the reference's own gate and the apply side refuses a non-unit guid, without which a gold `!` would hang over a poster no 1.12 client draws; two shipped claims fall with it (`0x5eb3c0` is the FULL re-query sweep; a status never suppresses a GameObject's minimap dot), and `WOW_PROBE_GOQUEST` at the Goldshire wanted poster reads the server's 1 then 5, both refused (1872)
- the money entry comes off the chain: Trade, Mail and Auction switch to the reference's `MoneyInputFrameTemplate` and its verbs, and our `BenillaMoneyInput_*` kit retires — it was the exact answer while benilla fired `OnTextChanged` synchronously inside `SetText`, and the engine now raises it deferred and coalesced, matching `0x77d3e0` (1831), so the reference's `expectChanges` guard works and our bracket flag was a duplicate; most of the 430 deleted lines are verbatim art — all three windows carried an inline copy of the template's three edit boxes, AuctionFrame a whole second copy; one visible change: TradeFrame now makes the reference's own `MoneyInputFrame_SetMode(this, "compact")` call, which tightens the trade money boxes (Gold 58→56 wide, Silver's offset 26→22, Copper's 16→11), and two stale claims in the kit's comments are corrected, and a verb nothing called goes (1882)
- the `UIFrameFlash` family is transcribed — six FrameXML names from `UIParent.lua`, which we do not load — unblocking SpellBookFrame and HelpFrame, which called it into silence; re-arming a flashing frame is a RETURN and `-1` flashes forever (1879); UIParent is recounted — `UpdateNameplates` and the `*_Show`/`*_Hide` family around it are FrameXML, not engine, missed by a survey that skipped the LoadOnDemand addons — so its engine surface is four verbs, not a wall: `GetLocale` answers `enUS`, `IsMacClient` answers nil (the whole verb on the PC build), and `CheckReadyCheckTime` and `RequestBattlefieldPositions` are the two it waits on (1880); and `BasicControls.xml` comes off the chain by pure deletion — ours differed by nothing but line-wrapping and one comment — with `FailedAddOnLoad` and `UIParentLoadAddOn` moving to `UIParent.xml`, their reference home, below their four callers (1881)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-04 20:50:12 +07:00

525 lines
34 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>
<!--
benilla's player-to-player trade window (decision 0592 P1). The geometry/art/texcoords are
transcribed from the reference `TradeFrame.xml` (WoW/_extracted_framexml/TradeFrame.xml) —
sizes, offsets, anchors, art files, texcoords — adapted only in (a) naming (every `Foo` →
`BenillaFoo`) and (b) feed/intent wiring onto the trade script API
(`benilla-ui/src/script/trade.rs`) + `crate::ui_trade`'s feed/drain. The house dressing
convention (decisions 0084/0112/0120/0544).
Where the reference inherits a shared template benilla does NOT ship (ItemButtonTemplate,
UIPanelButtonTemplate, UIPanelCloseButton, MoneyInputFrameTemplate, SmallMoneyFrameTemplate),
the body is inlined with the reference's own geometry/art (the MailFrame.xml precedent). The
two money displays reuse `MerchantFrame.xml`'s global `BenillaMoney_*` coin trio (read-only in
P1); the reference's editable `MoneyInputFrame` on the player's side is decision 0592 P2.
SCOPE (decision 0592 P1): the window opens on an incoming/initiated trade and mirrors both
sides' items + gold live, the partner's portrait (the shared "npc" booth) + name, and the
accept glow; the Trade/Cancel buttons drive the accept/cancel verbs. DEFERRED to P2: setting
items/gold onto the window (the drag-drop slots + the editable money widget), so the item
slots carry NO OnClick/OnEnter here, and the slot tooltips (GameTooltip:SetTradePlayerItem)
are P2. The enchant-slot spell name (slot 7's "enchantment") is decision 0592 P3.
-->
<Script><![CDATA[
MAX_TRADE_ITEMS = 7 -- MAX_TRADE_ITEMS (ref TradeFrame.lua l.1)
-- One side's accept glow. A column's highlight and the enchant slot's below it are one
-- indicator in two frames — they light and drop together, never apart — so both the repaint
-- and TradeFrame_SetAcceptState go through here rather than each spelling out four calls.
-- The four frames are TradeHighlight{Player,Recipient}[Enchant], declared at the bottom.
local function setTradeGlow(column, enchantSlot, lit)
if lit then
column:Show()
enchantSlot:Show()
else
column:Hide()
enchantSlot:Hide()
end
end
-- ── Load / event dispatch (ref TradeFrame_OnLoad l.4 / TradeFrame_OnEvent l.18) ───────────
function TradeFrame_OnLoad()
local frame = this
frame:RegisterEvent("TRADE_SHOW")
frame:RegisterEvent("TRADE_UPDATE")
frame:RegisterEvent("TRADE_CLOSED")
frame:RegisterEvent("TRADE_PLAYER_ITEM_CHANGED")
frame:RegisterEvent("TRADE_TARGET_ITEM_CHANGED")
frame:RegisterEvent("TRADE_ACCEPT_UPDATE")
-- Our accepted gold, echoed back so the input reflects the server's clamp (ref
-- TradePlayerInputMoneyFrame's own PLAYER_TRADE_MONEY registration, l.565). Kept off the
-- general TRADE_UPDATE repaint so it never overwrites what the player is mid-typing.
frame:RegisterEvent("PLAYER_TRADE_MONEY")
end
function TradeFrame_OnEvent()
local frame = this
if event == "TRADE_SHOW" or event == "TRADE_UPDATE" then
ShowUIPanel(frame)
if not frame:IsVisible() then
CloseTrade()
return
end
TradeFrameTradeButton:Enable()
TradeFrame_Update()
elseif event == "PLAYER_TRADE_MONEY" then
MoneyInputFrame_SetCopper(TradePlayerInputMoney, GetPlayerTradeMoney())
elseif event == "TRADE_CLOSED" then
HideUIPanel(frame)
elseif event == "TRADE_PLAYER_ITEM_CHANGED" then
TradeFrame_UpdatePlayerItem(arg1)
elseif event == "TRADE_TARGET_ITEM_CHANGED" then
TradeFrame_UpdateTargetItem(arg1)
elseif event == "TRADE_ACCEPT_UPDATE" then
TradeFrame_SetAcceptState(arg1, arg2)
end
end
function TradeFrame_OnShow()
TradeFrame.acceptState = 0
end
function TradeFrame_OnHide()
-- The client-side close verb (ref TradeFrame_OnHide l.144) → CMSG_CANCEL_TRADE + a local
-- clear (the app's drain); clear our money entry so a later trade opens fresh (ref l.146).
MoneyInputFrame_ResetMoney(TradePlayerInputMoney)
CloseTrade()
end
-- A keystroke in our money input (ref TradeFrame_UpdateMoney l.162): read the copper total,
-- clamp to what we actually carry, and offer it → SetTradeMoney → CMSG_SET_TRADE_GOLD.
function TradeFrame_UpdateMoney()
local copper = MoneyInputFrame_GetCopper(TradePlayerInputMoney)
if GetMoney and copper > GetMoney() then
copper = GetPlayerTradeMoney()
MoneyInputFrame_SetCopper(TradePlayerInputMoney, copper)
end
SetTradeMoney(copper)
end
-- ── Full repaint (ref TradeFrame_Update l.39): portraits, names, all 7 slots each side, the
-- two money displays, the accept highlights hidden. ────────────────────────────────────
function TradeFrame_Update()
SetPortraitTexture(TradeFramePlayerPortrait, "player")
-- The partner rides the shared "npc" portrait booth (the app points it at the partner
-- entity, decision 0592); the name comes from GetTradePartnerName() in place of the
-- reference's UnitName("NPC").
SetPortraitTexture(TradeFrameRecipientPortrait, "npc")
TradeFramePlayerNameText:SetText(UnitName("player") or "")
TradeFrameRecipientNameText:SetText(GetTradePartnerName() or "")
for i = 1, MAX_TRADE_ITEMS do
TradeFrame_UpdatePlayerItem(i)
TradeFrame_UpdateTargetItem(i)
end
-- Our gold is the editable input, reflected via PLAYER_TRADE_MONEY (not repainted here, so
-- the repaint never clobbers mid-typing); only the partner's read-only gold repaints.
BenillaMoney_Set("TradeRecipientMoneyFrame", GetTargetTradeMoney())
-- A repaint puts both glows down. TRADE_ACCEPT_UPDATE is the only thing that raises
-- them, so whatever is standing comes straight back on the next one.
setTradeGlow(TradeHighlightPlayer, TradeHighlightPlayerEnchant, false)
setTradeGlow(TradeHighlightRecipient, TradeHighlightRecipientEnchant, false)
end
-- One slot's paint, shared by both columns (ref TradeFrame_UpdatePlayerItem l.54 /
-- UpdateTargetItem l.83). `isTarget` gates the recipient-only not-usable red tint.
function BenillaTradeSlot_SetItem(prefix, id, name, texture, numItems, isUsable, enchantment, isTarget)
local nameText = getglobal(prefix.."Name")
local icon = getglobal(prefix.."ItemButtonIcon")
local count = getglobal(prefix.."ItemButtonCount")
-- The enchant slot (id 7): the enchant name (P3) or the "will not be traded" note.
if id == MAX_TRADE_ITEMS then
if name then
if enchantment then
nameText:SetText("|cff20ff20"..enchantment.."|r")
else
nameText:SetText("|cffffffffWill Not Be Traded|r")
end
else
nameText:SetText("")
end
else
nameText:SetText(name or "")
end
if texture then
icon:SetTexture(texture)
icon:Show()
else
icon:Hide()
end
if numItems and numItems > 1 then
count:SetText(numItems)
count:Show()
else
count:SetText("")
count:Hide()
end
-- The recipient not-usable red tint (ref l.105-113): red when the partner offers an item
-- our class/level/skill can't use; white otherwise (and always white on our own column).
local slotTex = getglobal(prefix.."SlotTexture")
local nameFrame = getglobal(prefix.."NameFrame")
if isTarget and name and not isUsable then
icon:SetVertexColor(0.9, 0, 0)
nameFrame:SetVertexColor(0.9, 0, 0)
slotTex:SetVertexColor(1.0, 0, 0)
else
icon:SetVertexColor(1, 1, 1)
nameFrame:SetVertexColor(1, 1, 1)
slotTex:SetVertexColor(1, 1, 1)
end
end
function TradeFrame_UpdatePlayerItem(id)
local name, texture, numItems, isUsable, enchantment = GetTradePlayerItemInfo(id)
BenillaTradeSlot_SetItem("TradePlayerItem"..id, id, name, texture, numItems, isUsable, enchantment, nil)
end
function TradeFrame_UpdateTargetItem(id)
local name, texture, numItems, quality, isUsable, enchantment = GetTradeTargetItemInfo(id)
BenillaTradeSlot_SetItem("TradeRecipientItem"..id, id, name, texture, numItems, isUsable, enchantment, 1)
end
-- A trade slot's item button as a cursor drop target (decision 0592 P2, ref ClickTradeButton /
-- ClickTargetTradeButton, TradeFrame.xml l.135/101). Both columns share the slot template, so
-- player-vs-recipient is read off the slot frame's name; the slot number is its frame id. Our
-- slot drops/clears a bag item (SET/CLEAR_TRADE_ITEM); the partner's column is read-only.
function BenillaTradeSlot_OnClick(button)
local slot = button:GetParent()
local id = slot:GetID()
if string.find(slot:GetName(), "Player", 1, true) then
ClickTradeButton(id)
else
ClickTargetTradeButton(id)
end
end
-- Who has pressed Trade (spec: ref TradeFrame_SetAcceptState l.116). The event carries BOTH
-- sides' states, so this is a straight repaint of two indicators rather than a toggle — and
-- our own half is kept on the frame, because the Cancel button below is the only reader of
-- whether there is an accept of ours to withdraw.
--
-- The extra thing our own accept does is lock the Trade button, so a standing accept cannot
-- be sent a second time; Cancel is what takes it back.
function TradeFrame_SetAcceptState(playerState, targetState)
TradeFrame.acceptState = playerState
local weAccepted = playerState == 1
setTradeGlow(TradeHighlightPlayer, TradeHighlightPlayerEnchant, weAccepted)
setTradeGlow(TradeHighlightRecipient, TradeHighlightRecipientEnchant, targetState == 1)
if weAccepted then
TradeFrameTradeButton:Disable()
else
TradeFrameTradeButton:Enable()
end
end
-- Cancel is two verbs on one button (spec: ref TradeFrameCancelButton_OnClick l.136). With
-- an accept of ours standing it withdraws only THAT and the trade stays open — the button
-- is the only way back out of the lock above. With no accept up there is nothing to
-- withdraw, so it means "leave", and closing the window is what sends that (→ OnHide →
-- CloseTrade).
function TradeFrameCancelButton_OnClick()
if TradeFrame.acceptState ~= 1 then
HideUIPanel(TradeFrame)
return
end
CancelTradeAccept()
end
]]></Script>
<!-- The accept-glow highlight (ref TradeHighlightTemplate l.4): a 3-slice UI-TradeFrame-Highlight
(top/bottom caps + a stretched middle), sized per-instance. -->
<Frame name="BenillaTradeHighlightTemplate" hidden="false" virtual="true">
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentTop" file="Interface\TradeFrame\UI-TradeFrame-Highlight">
<Size><AbsDimension x="161" y="16"/></Size>
<Anchors><Anchor point="TOPLEFT"/></Anchors>
<TexCoords left="0" right="0.62890625" top="0" bottom="0.0625"/>
</Texture>
<Texture name="$parentBottom" file="Interface\TradeFrame\UI-TradeFrame-Highlight">
<Size><AbsDimension x="161" y="16"/></Size>
<Anchors><Anchor point="BOTTOMLEFT"/></Anchors>
<TexCoords left="0" right="0.62890625" top="0.9375" bottom="1.0"/>
</Texture>
<Texture name="$parentMiddle" file="Interface\TradeFrame\UI-TradeFrame-Highlight">
<Size><AbsDimension x="161" y="10"/></Size>
<Anchors>
<Anchor point="TOP" relativeTo="$parentTop" relativePoint="BOTTOM"/>
<Anchor point="BOTTOM" relativeTo="$parentBottom" relativePoint="TOP"/>
</Anchors>
<TexCoords left="0" right="0.62890625" top="0.0625" bottom="0.9375"/>
</Texture>
</Layer>
</Layers>
</Frame>
<!-- One trade slot (ref TradeItemTemplate l.38 + PlayerTradeItemTemplate's inlined ItemButton
l.120): the empty-slot art, the name plate, the item name, and a 37px item button (icon +
stack count). Display-only in P1 — no OnClick/OnEnter (decision 0592 P2). -->
<Frame name="BenillaTradeItemTemplate" virtual="true">
<Size><AbsDimension x="153" y="37"/></Size>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentSlotTexture" file="Interface\Buttons\UI-EmptySlot">
<Size><AbsDimension x="64" y="64"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-13" y="13"/></Offset></Anchor></Anchors>
</Texture>
<Texture name="$parentNameFrame" file="Interface\QuestFrame\UI-QuestItemNameFrame">
<Size><AbsDimension x="124" y="64"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentSlotTexture" relativePoint="RIGHT"><Offset><AbsDimension x="-20" y="0"/></Offset></Anchor>
</Anchors>
</Texture>
<FontString name="$parentName" inherits="GameFontNormalSmall" text="" justifyH="LEFT">
<Size><AbsDimension x="90" y="30"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentNameFrame"><Offset><AbsDimension x="15" y="0"/></Offset></Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Button name="$parentItemButton">
<Size><AbsDimension x="37" y="37"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="$parent"/></Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentIcon" hidden="true" setAllPoints="true"/>
</Layer>
<Layer level="ARTWORK">
<FontString name="$parentCount" inherits="NumberFontNormal" hidden="true" justifyH="RIGHT">
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-2" y="2"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
<!-- A cursor drop target (decision 0592 P2): a click or a drag-release routes through
the shared slot handler, which places/clears on our side and is inert on the
partner's. Both gestures share one path, the reference's drag/click contract. -->
<Scripts>
<OnClick>BenillaTradeSlot_OnClick(self)</OnClick>
<OnReceiveDrag>BenillaTradeSlot_OnClick(self)</OnReceiveDrag>
</Scripts>
</Button>
</Frames>
</Frame>
<!-- The enchant / non-traded slot art (ref TradeRecipientItem7/TradePlayerItem7 l.393): the
EnchantIcon overlay sits over slot 7's item button. A virtual twin of the base slot with the
extra icon, instantiated only for id 7. -->
<Frame name="BenillaTradeEnchantItemTemplate" inherits="BenillaTradeItemTemplate" virtual="true">
<Frames>
<Frame name="$parentEnchant" setAllPoints="false">
<Size><AbsDimension x="62" y="62"/></Size>
<Anchors><Anchor point="TOPLEFT"/></Anchors>
<Layers>
<Layer level="OVERLAY">
<Texture file="Interface\TradeFrame\UI-TradeFrame-EnchantIcon" setAllPoints="true"/>
</Layer>
</Layers>
</Frame>
</Frames>
</Frame>
<Frame name="TradeFrame" parent="UIParent" toplevel="true" movable="true" enableMouse="true" hidden="true">
<!-- ref TradeFrame l.164: 384×512; ShowUIPanel slots it left. -->
<Size><AbsDimension x="384" y="512"/></Size>
<HitRectInsets><AbsInset left="0" right="35" top="0" bottom="72"/></HitRectInsets>
<Layers>
<Layer level="BACKGROUND">
<!-- ref l.180: the two 60×60 unit portraits (recipient right, player left). -->
<Texture name="TradeFrameRecipientPortrait">
<Size><AbsDimension x="60" y="60"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="183" y="-6"/></Offset></Anchor></Anchors>
</Texture>
<Texture name="TradeFramePlayerPortrait">
<Size><AbsDimension x="60" y="60"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="7" y="-6"/></Offset></Anchor></Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK">
<!-- ref l.205: the four corner slabs. -->
<Texture file="Interface\TradeFrame\UI-TradeFrame-TopLeft">
<Size><AbsDimension x="256" y="256"/></Size>
<Anchors><Anchor point="TOPLEFT"/></Anchors>
</Texture>
<Texture file="Interface\TradeFrame\UI-TradeFrame-TopRight">
<Size><AbsDimension x="128" y="256"/></Size>
<Anchors><Anchor point="TOPRIGHT"/></Anchors>
</Texture>
<Texture file="Interface\TradeFrame\UI-TradeFrame-BotLeft">
<Size><AbsDimension x="256" y="256"/></Size>
<Anchors><Anchor point="BOTTOMLEFT"/></Anchors>
</Texture>
<Texture file="Interface\TradeFrame\UI-TradeFrame-BotRight">
<Size><AbsDimension x="128" y="256"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT"/></Anchors>
</Texture>
<FontString name="TradeFrameRecipientNameText" inherits="GameFontNormal" text="">
<Size><AbsDimension x="80" y="12"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeFrame"><Offset><AbsDimension x="245" y="-17"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="TradeFramePlayerNameText" inherits="GameFontNormal" text="">
<Size><AbsDimension x="100" y="12"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeFrame"><Offset><AbsDimension x="75" y="-17"/></Offset></Anchor></Anchors>
</FontString>
<!-- ref l.262: the "Will Be Enchanted" column labels above the enchant slots. -->
<FontString name="TradeFramePlayerEnchantText" inherits="GameFontHighlightSmall" text="Will Be Enchanted">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeFrame"><Offset><AbsDimension x="26" y="-374"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="TradeFrameRecipientEnchantText" inherits="GameFontHighlightSmall" text="Will Be Enchanted">
<Anchors><Anchor point="LEFT" relativeTo="TradeFramePlayerEnchantText"><Offset><AbsDimension x="170" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- The accept-glow highlights, one per column + its enchant slot (ref l.283). -->
<Frame name="TradeHighlightPlayer" inherits="BenillaTradeHighlightTemplate" hidden="true">
<Size><AbsDimension x="161" y="266"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeFrame"><Offset><AbsDimension x="19" y="-100"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeHighlightRecipient" inherits="BenillaTradeHighlightTemplate" hidden="true">
<Size><AbsDimension x="161" y="266"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="189" y="-100"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeHighlightPlayerEnchant" inherits="BenillaTradeHighlightTemplate" hidden="true">
<Size><AbsDimension x="161" y="61"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeHighlightPlayer" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-4"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeHighlightRecipientEnchant" inherits="BenillaTradeHighlightTemplate" hidden="true">
<Size><AbsDimension x="161" y="61"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeHighlightRecipient" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-4"/></Offset></Anchor></Anchors>
</Frame>
<!-- The partner's 6 trade slots + the 7th enchant slot (ref TradeRecipientItem1..7 l.331). -->
<Frame name="TradeRecipientItem1" inherits="BenillaTradeItemTemplate" id="1">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="195" y="-104"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeRecipientItem2" inherits="BenillaTradeItemTemplate" id="2">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeRecipientItem1" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeRecipientItem3" inherits="BenillaTradeItemTemplate" id="3">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeRecipientItem2" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeRecipientItem4" inherits="BenillaTradeItemTemplate" id="4">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeRecipientItem3" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeRecipientItem5" inherits="BenillaTradeItemTemplate" id="5">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeRecipientItem4" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeRecipientItem6" inherits="BenillaTradeItemTemplate" id="6">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeRecipientItem5" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradeRecipientItem7" inherits="BenillaTradeEnchantItemTemplate" id="7">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeRecipientItem6" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-28"/></Offset></Anchor></Anchors>
</Frame>
<!-- Our 6 trade slots + the 7th enchant slot (ref TradePlayerItem1..7 l.410). -->
<Frame name="TradePlayerItem1" inherits="BenillaTradeItemTemplate" id="1">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="26" y="-104"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradePlayerItem2" inherits="BenillaTradeItemTemplate" id="2">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradePlayerItem1" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradePlayerItem3" inherits="BenillaTradeItemTemplate" id="3">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradePlayerItem2" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradePlayerItem4" inherits="BenillaTradeItemTemplate" id="4">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradePlayerItem3" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradePlayerItem5" inherits="BenillaTradeItemTemplate" id="5">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradePlayerItem4" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradePlayerItem6" inherits="BenillaTradeItemTemplate" id="6">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradePlayerItem5" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-7"/></Offset></Anchor></Anchors>
</Frame>
<Frame name="TradePlayerItem7" inherits="BenillaTradeEnchantItemTemplate" id="7">
<Anchors><Anchor point="TOPLEFT" relativeTo="TradePlayerItem6" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-28"/></Offset></Anchor></Anchors>
</Frame>
<!-- The Trade button (ref l.502, UIPanelButtonTemplate inlined): OnClick → AcceptTrade. -->
<Button name="TradeFrameTradeButton" text="Trade">
<Size><AbsDimension x="85" y="22"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT" relativeTo="TradeFrame" relativePoint="BOTTOMRIGHT"><Offset><AbsDimension x="-113" y="55"/></Offset></Anchor></Anchors>
<NormalTexture file="Interface\Buttons\UI-Panel-Button-Up"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></NormalTexture>
<PushedTexture file="Interface\Buttons\UI-Panel-Button-Down"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></PushedTexture>
<DisabledTexture file="Interface\Buttons\UI-Panel-Button-Disabled"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></DisabledTexture>
<HighlightTexture file="Interface\Buttons\UI-Panel-Button-Highlight" alphaMode="ADD"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></HighlightTexture>
<ButtonText name="$parentText"/>
<NormalFont inherits="GameFontNormal"/><HighlightFont inherits="GameFontHighlight"/><DisabledFont inherits="GameFontDisable"/>
<Scripts><OnClick>AcceptTrade()</OnClick></Scripts>
</Button>
<Button name="TradeFrameCancelButton" text="Cancel">
<Size><AbsDimension x="77" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="TradeFrameTradeButton" relativePoint="TOPRIGHT"><Offset><AbsDimension x="3" y="0"/></Offset></Anchor></Anchors>
<NormalTexture file="Interface\Buttons\UI-Panel-Button-Up"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></NormalTexture>
<PushedTexture file="Interface\Buttons\UI-Panel-Button-Down"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></PushedTexture>
<HighlightTexture file="Interface\Buttons\UI-Panel-Button-Highlight" alphaMode="ADD"><TexCoords left="0" right="0.625" top="0" bottom="0.6875"/></HighlightTexture>
<ButtonText name="$parentText"/>
<NormalFont inherits="GameFontNormal"/><HighlightFont inherits="GameFontHighlight"/><DisabledFont inherits="GameFontDisable"/>
<Scripts><OnClick>TradeFrameCancelButton_OnClick()</OnClick></Scripts>
</Button>
<!-- The window close X (ref l.544, UIPanelCloseButton inlined). -->
<Button name="TradeFrameCloseButton">
<Size><AbsDimension x="32" y="32"/></Size>
<Anchors><Anchor point="TOPRIGHT" relativeTo="TradeFrame" relativePoint="TOPRIGHT"><Offset><AbsDimension x="-25" y="-8"/></Offset></Anchor></Anchors>
<NormalTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Up"/>
<PushedTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Down"/>
<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
<Scripts><OnClick>HideUIPanel(TradeFrame)</OnClick></Scripts>
</Button>
<!-- Our gold — EDITABLE (ref TradeFrame.xml l.553 `TradePlayerInputMoneyFrame`). The three
boxes come off the chain now: `MoneyInputFrameTemplate` out of
`Interface\FrameXML\MoneyInputFrame.xml`, which benilla.toc has sourced since 1751
window 23. Our inline trio was a verbatim copy of it — same child names, same
textures and TexCoords, same tab chain, same 58/30/30 geometry — so this is the
rare swap that changes no pixel by itself (1882).
`SetMode("compact")` is the reference's own call on this frame and DOES move
things: Gold 58->56 wide, Silver's offset 26->22, Copper's 16->11. We did not have
it, so the trade money boxes tighten by a few pixels. That is the migration
restoring the reference's layout, not a new choice.
A keystroke drives TradeFrame_UpdateMoney -> SetTradeMoney -> CMSG_SET_TRADE_GOLD,
registered through the reference's own callback slot rather than a hand-written
OnTextChanged on each box; the server's echo comes back on PLAYER_TRADE_MONEY. -->
<Frame name="TradePlayerInputMoney" inherits="MoneyInputFrameTemplate">
<Size><AbsDimension x="176" y="18"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="26" y="-73"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
MoneyInputFrame_SetMode(this, "compact")
MoneyInputFrame_SetOnvalueChangedFunc(this, TradeFrame_UpdateMoney)
</OnLoad>
</Scripts>
</Frame>
<!-- The partner's gold (read-only — GetTargetTradeMoney; ref TradeRecipientMoneyFrame l.574). -->
<Frame name="TradeRecipientMoneyFrame">
<Size><AbsDimension x="13" y="13"/></Size>
<Anchors><Anchor point="TOPRIGHT"><Offset><AbsDimension x="-40" y="-80"/></Offset></Anchor></Anchors>
<Frames>
<Frame name="$parentCoin1">
<Size><AbsDimension x="13" y="13"/></Size>
<Anchors><Anchor point="RIGHT" relativePoint="RIGHT"/></Anchors>
<Layers><Layer level="OVERLAY"><Texture name="$parentIcon" file="Interface\MoneyFrame\UI-MoneyIcons"><Size><AbsDimension x="13" y="13"/></Size><Anchors><Anchor point="RIGHT" relativePoint="RIGHT"/></Anchors><TexCoords left="0.5" right="0.75" top="0" bottom="1"/></Texture><FontString name="$parentNum" inherits="NumberFontNormal" justifyH="RIGHT"><Anchors><Anchor point="RIGHT" relativePoint="RIGHT"><Offset><AbsDimension x="-13" y="0"/></Offset></Anchor></Anchors></FontString></Layer></Layers>
</Frame>
<Frame name="$parentCoin2">
<Size><AbsDimension x="13" y="13"/></Size>
<Anchors><Anchor point="RIGHT" relativeTo="$parentCoin1" relativePoint="LEFT"><Offset><AbsDimension x="-4" y="0"/></Offset></Anchor></Anchors>
<Layers><Layer level="OVERLAY"><Texture name="$parentIcon" file="Interface\MoneyFrame\UI-MoneyIcons"><Size><AbsDimension x="13" y="13"/></Size><Anchors><Anchor point="RIGHT" relativePoint="RIGHT"/></Anchors><TexCoords left="0.25" right="0.5" top="0" bottom="1"/></Texture><FontString name="$parentNum" inherits="NumberFontNormal" justifyH="RIGHT"><Anchors><Anchor point="RIGHT" relativePoint="RIGHT"><Offset><AbsDimension x="-13" y="0"/></Offset></Anchor></Anchors></FontString></Layer></Layers>
</Frame>
<Frame name="$parentCoin3">
<Size><AbsDimension x="13" y="13"/></Size>
<Anchors><Anchor point="RIGHT" relativeTo="$parentCoin2" relativePoint="LEFT"><Offset><AbsDimension x="-4" y="0"/></Offset></Anchor></Anchors>
<Layers><Layer level="OVERLAY"><Texture name="$parentIcon" file="Interface\MoneyFrame\UI-MoneyIcons"><Size><AbsDimension x="13" y="13"/></Size><Anchors><Anchor point="RIGHT" relativePoint="RIGHT"/></Anchors><TexCoords left="0" right="0.25" top="0" bottom="1"/></Texture><FontString name="$parentNum" inherits="NumberFontNormal" justifyH="RIGHT"><Anchors><Anchor point="RIGHT" relativePoint="RIGHT"><Offset><AbsDimension x="-13" y="0"/></Offset></Anchor></Anchors></FontString></Layer></Layers>
</Frame>
</Frames>
</Frame>
</Frames>
<Scripts>
<OnLoad>TradeFrame_OnLoad()</OnLoad>
<OnEvent>TradeFrame_OnEvent()</OnEvent>
<OnShow>TradeFrame_OnShow(); PlaySound("igCharacterInfoOpen")</OnShow>
<OnHide>TradeFrame_OnHide(); PlaySound("igCharacterInfoClose")</OnHide>
</Scripts>
</Frame>
</Ui>