Files
benilla-octo/crates/benilla-app/assets/ui/MacroFrame.xml
T
SamandClaude Opus 5 9a184d3476 the guild window opens: roster, ranks, notes and the message of the day
- the social window's third tab is live — the roster in both its views, the member card with its promote/demote/remove verbs, the rank editor's thirteen permissions, the guild information board, and the invite, leave, kick and note dialogs behind them
- setting your hearthstone at an innkeeper now asks before it takes and says so afterwards, and the innkeeper's gossip lines get their own icons back
- unavailable talents grey out, and every greyed icon in the client now goes through the same luminance fold the original used
- the buff tooltip's remaining-time line reads gold with the client's own hour/minute ladder, the macro editor takes a shift-click to paste a spell, trainer rows repaint after a purchase, and a long book page stops flickering its ellipsis

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-16 17:38:54 +07:00

973 lines
60 KiB
XML

<Ui>
<!--
benilla's MACRO window (decision 0983) — the 384x512 macro editor + its name/icon popup,
re-expressed from the real 1.12 `Interface\AddOns\Blizzard_MacroUI\Blizzard_MacroUI.xml`
and `.lua` (extracted from the MPQ chain to session scratch; director-local reference
artifacts, never committed — the 0068/0138 pattern. Line cites below are into that
extraction). All the art it names is shipped: `Interface\MacroFrame\MacroFrame-Icon`,
`-BotLeft`, `-BotRight`, `MacroPopup-{Top,Bot}{Left,Right}` (verified present in
interface.MPQ), plus the PaperDollInfoFrame top halves and the ClassTrainerFrame bar the
ref itself borrows.
Docks the left UIPanel slot with the ref's own registration row
(`UIPanelWindows["MacroFrame"] = { area = "left", pushable = 5, whileDead = 1 }`,
Blizzard_MacroUI.lua:7 — mirrored in UiPanels.xml). `whileDead` is the reference's, and it
matters: writing a macro while you run back as a ghost is a real thing people do.
The usual house deviation, applied consistently: every frame here is Benilla-prefixed. The
ref's global entry point `ShowMacroFrame()` keeps its BARE name (UIParent.lua:198 — the
game menu's Macros button and `SlashCmdList["MACRO"]` both call it), matching this
codebase's own `ToggleCharacter`/`ToggleQuestLog`/`ToggleSpellBook` precedent.
THE MODEL IS THE ENGINE'S. Unlike every other window in this folder, the macro table is not
an app feed: 1.12 macros have no server side at all, so `benilla_ui::script::macros` owns
the table and this file drives it through the reference's own API —
`GetNumMacros`/`GetMacroInfo`/`GetMacroIndexByName`/`CreateMacro`/`EditMacro`/
`DeleteMacro`/`PickupMacro`/`GetNumMacroIcons`/`GetMacroIconInfo`. `UPDATE_MACROS` (the
ref's own event) fires on every change, including the load at world entry, and is what
redraws this window.
DELIBERATE DEVIATIONS, each re-cited at its site:
- THE BODY BOX SIZES ITS OWN SCROLL CHILD. The ref's `MacroFrameScrollFrame` inherits
`UIPanelScrollFrameTemplate`, whose C-side `UpdateScrollChildRect` auto-grows the child
to the text — the engine gap TalentFrame.xml and QuestLogFrame.xml both document. Here
the child is an EditBox whose height is recomputed from the text on every change
(`BenillaMacroFrameText_Resize`), over-estimating wrapped lines rather than clipping.
- `MacroFrameTextButton` (the ref's invisible click-to-focus plate over the body) is kept
— this engine's EditBox does not self-focus on a click through a ScrollFrame.
- The ref's `PanelTemplates_TabResize(-15, ...)` width tuning is KEPT, but expressed as
two fields on the tab (`benillaTabPadding`/`benillaTabMaxWidth`) rather than as a call:
`TabButtonTemplate` (UiPanels.xml) owns the one text-fit call site, and an instance
calling TabResize itself would just be overwritten on the next settle. Dropping the
tuning (0983's original call) is what let the character tab run off the window's right
edge — 384 units does not hold two +0-fit tabs. The ref's manual
`HighlightTexture:SetWidth(GetTextWidth() + 31)` stays folded into that same settle.
- `PlaySound("igCharacterInfoOpen"/"Close"/"gsTitleOptionOK")` are kept — this engine has
PlaySound and those kit names resolve.
-->
<Script><![CDATA[
-- ref Blizzard_MacroUI.lua:1-5, verbatim.
MAX_MACROS = 18
NUM_MACRO_ICONS_SHOWN = 20
NUM_ICONS_PER_ROW = 5
NUM_ICON_ROWS = 4
MACRO_ICON_ROW_HEIGHT = 36
-- The body box's own scroll sizing (this file's header comment). `letters="255"` caps the
-- body, and the box is ~286 wide at GameFontHighlightSmall, so ~48 characters fit a line.
-- The child height is `(explicit lines + wrap allowance) * line height`, which can only
-- OVER-estimate — an over-estimate costs a little empty scroll room, an under-estimate
-- clips text the player typed.
BENILLA_MACRO_LINE_H = 14
BENILLA_MACRO_CHARS_PER_LINE = 48
BENILLA_MACRO_BODY_H = 85 -- the ref's own MacroFrameScrollFrame height (ref l.396)
function BenillaMacroFrameText_Resize()
local box = getglobal("BenillaMacroFrameText")
local text = box:GetText() or ""
local lines, pos = 1, 1
while true do
local at = string.find(text, "\n", pos, true)
if not at then break end
lines, pos = lines + 1, at + 1
end
local wrap = math.ceil(string.len(text) / BENILLA_MACRO_CHARS_PER_LINE)
local h = (lines + wrap) * BENILLA_MACRO_LINE_H
if h < BENILLA_MACRO_BODY_H then h = BENILLA_MACRO_BODY_H end
box:SetHeight(h)
local scroll = getglobal("BenillaMacroFrameScrollFrame")
scroll:UpdateScrollChildRect()
BenillaScroll_SyncBar(scroll)
end
function BenillaMacroFrameScrollFrame_OnLoad(scrollFrame)
scrollFrame:SetScrollChild(getglobal("BenillaMacroFrameText"))
BenillaScroll_SyncBar(scrollFrame)
end
-- Tab 2's label is the ref's own `format(CHARACTER_SPECIFIC_MACROS, UnitName("player"))`
-- (ref MacroFrame.xml l.509), re-derived on every show because the player name is not known
-- at load time here. Guarded on the global string itself: a VM without GlobalStrings (the
-- shipped-XML load test) must not die in an OnLoad.
function BenillaMacroFrame_TabTwoLabel()
if not CHARACTER_SPECIFIC_MACROS then return "Character" end
return format(CHARACTER_SPECIFIC_MACROS, UnitName("player") or "")
end
-- ref UIParent.lua:198-203. No LoadAddOn here: benilla has no load-on-demand addon layer,
-- so the window is always loaded and this is a plain Show.
function ShowMacroFrame()
ShowUIPanel(getglobal("BenillaMacroFrame"))
end
-- ref Blizzard_MacroUI.lua:13-17.
function BenillaMacroFrame_OnLoad(frame)
BenillaMacroFrame_SetAccountMacros()
PanelTemplates_SetNumTabs(frame, 2)
PanelTemplates_SetTab(frame, 1)
end
-- ref l.19-29. The OnHide save is the reference's own "closing the window commits the
-- body you were typing" — the single most load-bearing line in this file.
function BenillaMacroFrame_OnShow()
BenillaMacroFrame_Update()
PlaySound("igCharacterInfoOpen")
end
function BenillaMacroFrame_OnHide()
getglobal("BenillaMacroPopupFrame"):Hide()
BenillaMacroFrame_SaveMacro()
PlaySound("igCharacterInfoClose")
end
-- ref l.31-49.
function BenillaMacroFrame_SetAccountMacros()
local frame = getglobal("BenillaMacroFrame")
frame.macroBase = 0
local numAccountMacros = GetNumMacros()
if numAccountMacros > 0 then
BenillaMacroFrame_SelectMacro(frame.macroBase + 1)
else
BenillaMacroFrame_SelectMacro(nil)
end
end
function BenillaMacroFrame_SetCharacterMacros()
local frame = getglobal("BenillaMacroFrame")
frame.macroBase = MAX_MACROS
local numAccountMacros, numCharacterMacros = GetNumMacros()
if numCharacterMacros > 0 then
BenillaMacroFrame_SelectMacro(frame.macroBase + 1)
else
BenillaMacroFrame_SelectMacro(nil)
end
end
-- DEVIATION (this window is always loaded; the ref's is LoadOnDemand). The ref's
-- `MacroFrame_OnLoad` — which picks the first macro — runs the instant the addon loads,
-- i.e. immediately before the first open, so it always sees the real macro table. Ours
-- runs at boot, before the app has loaded a single macro from disk, so the selection has
-- to be re-established whenever the table can have moved. One place: the top of _Update,
-- which every show, every UPDATE_MACROS, every tab switch and every delete already runs
-- through. A still-valid selection is left alone (reopening the window keeps your place,
-- exactly as the ref's does).
function BenillaMacroFrame_EnsureSelection()
local frame = getglobal("BenillaMacroFrame")
local numAccount, numChar = GetNumMacros()
local numMacros = numAccount
if frame.macroBase ~= 0 then numMacros = numChar end
local sel = frame.selectedMacro
if sel and sel > frame.macroBase and sel <= (frame.macroBase + numMacros) then
return
end
if numMacros > 0 then
BenillaMacroFrame_SelectMacro(frame.macroBase + 1)
else
BenillaMacroFrame_SelectMacro(nil)
end
end
-- ref l.51-120, re-expressed.
function BenillaMacroFrame_Update()
BenillaMacroFrame_EnsureSelection()
local frame = getglobal("BenillaMacroFrame")
local numAccountMacros, numCharacterMacros = GetNumMacros()
local numMacros
if frame.macroBase == 0 then
numMacros = numAccountMacros
else
numMacros = numCharacterMacros
end
for i = 1, MAX_MACROS do
local macroButton = getglobal("BenillaMacroButton" .. i)
local macroIcon = getglobal("BenillaMacroButton" .. i .. "Icon")
local macroName = getglobal("BenillaMacroButton" .. i .. "Name")
if i <= numMacros then
local name, texture, body = GetMacroInfo(frame.macroBase + i)
macroIcon:SetTexture(texture)
macroName:SetText(name)
macroButton:Enable()
if frame.selectedMacro and (i == (frame.selectedMacro - frame.macroBase)) then
macroButton:SetChecked(1)
getglobal("BenillaMacroFrameSelectedMacroName"):SetText(name)
getglobal("BenillaMacroFrameText"):SetText(body)
getglobal("BenillaMacroFrameSelectedMacroButton"):SetID(i)
getglobal("BenillaMacroFrameSelectedMacroButtonIcon"):SetTexture(texture)
else
macroButton:SetChecked(0)
end
else
macroButton:SetChecked(0)
macroIcon:SetTexture("")
macroName:SetText("")
macroButton:Disable()
end
end
if frame.selectedMacro ~= nil then
BenillaMacroFrame_ShowDetails()
else
BenillaMacroFrame_HideDetails()
end
if numMacros == MAX_MACROS then
getglobal("BenillaMacroNewButton"):Disable()
else
getglobal("BenillaMacroNewButton"):Enable()
end
if getglobal("BenillaMacroPopupFrame"):IsVisible() then
getglobal("BenillaMacroEditButton"):Disable()
getglobal("BenillaMacroDeleteButton"):Disable()
else
getglobal("BenillaMacroEditButton"):Enable()
getglobal("BenillaMacroDeleteButton"):Enable()
end
if not frame.selectedMacro then
getglobal("BenillaMacroDeleteButton"):Disable()
end
-- The body's scroll range follows whatever SetText just put in the box.
BenillaMacroFrameText_Resize()
end
-- ref MacroFrame.lua:93-97. The engine calls nothing by this name; the spellbook's
-- SHIFT-click does (SpellBookFrame.xml, ref SpellBookFrame.lua:271-283) — the "Shift click
-- a spell in your spellbook with the macro UI open" line MACRO_HELP_TEXT_LINE5 advertises.
--
-- Three things here are the reference's, not oversights (B248 reported the first as a bug):
-- the line arrives WHOLE (`/cast <name>`, never the bare name — that insert is a later
-- client's `ChatEdit_InsertLink`), it is appended with NO separator, and the visibility
-- gate is the BODY BOX's, so a shift-click with the name/icon popup up writes nothing.
-- The dirty flag and the scroll refit are the box's own OnTextChanged, exactly as they are
-- for a typed character — this function is the ref's three lines and stays them.
function BenillaMacroFrame_AddMacroLine(line)
local box = getglobal("BenillaMacroFrameText")
if box:IsVisible() then
box:SetText((box:GetText() or "") .. line)
end
end
-- ref l.128-138.
function BenillaMacroButton_OnClick(button)
local frame = getglobal("BenillaMacroFrame")
BenillaMacroFrame_SaveMacro()
BenillaMacroFrame_SelectMacro(frame.macroBase + button:GetID())
BenillaMacroFrame_Update()
getglobal("BenillaMacroPopupFrame"):Hide()
getglobal("BenillaMacroFrameText"):ClearFocus()
end
function BenillaMacroFrame_SelectMacro(id)
getglobal("BenillaMacroFrame").selectedMacro = id
end
-- ref l.140-150.
function BenillaMacroNewButton_OnClick()
BenillaMacroFrame_SaveMacro()
local popup = getglobal("BenillaMacroPopupFrame")
popup.mode = "new"
popup:Show()
end
function BenillaMacroEditButton_OnClick()
BenillaMacroFrame_SaveMacro()
local popup = getglobal("BenillaMacroPopupFrame")
popup.mode = "edit"
popup:Show()
end
-- ref l.152-169.
function BenillaMacroFrame_HideDetails()
getglobal("BenillaMacroEditButton"):Hide()
getglobal("BenillaMacroFrameCharLimitText"):Hide()
getglobal("BenillaMacroFrameEnterMacroText"):Hide()
getglobal("BenillaMacroFrameText"):Hide()
getglobal("BenillaMacroFrameSelectedMacroName"):Hide()
getglobal("BenillaMacroFrameSelectedMacroBackground"):Hide()
getglobal("BenillaMacroFrameSelectedMacroButton"):Hide()
end
function BenillaMacroFrame_ShowDetails()
getglobal("BenillaMacroEditButton"):Show()
getglobal("BenillaMacroFrameCharLimitText"):Show()
getglobal("BenillaMacroFrameEnterMacroText"):Show()
getglobal("BenillaMacroFrameText"):Show()
getglobal("BenillaMacroFrameSelectedMacroName"):Show()
getglobal("BenillaMacroFrameSelectedMacroBackground"):Show()
getglobal("BenillaMacroFrameSelectedMacroButton"):Show()
end
-- ref l.171-213.
function BenillaMacroPopupFrame_OnShow(popup)
if popup.mode == "new" then
getglobal("BenillaMacroFrameText"):Hide()
getglobal("BenillaMacroFrameSelectedMacroButtonIcon"):SetTexture("")
popup.selectedIcon = nil
end
getglobal("BenillaMacroFrameText"):ClearFocus()
getglobal("BenillaMacroPopupEditBox"):SetFocus()
PlaySound("igCharacterInfoOpen")
BenillaMacroPopupFrame_Update(true) -- the ONE caller that resets the name box
BenillaMacroPopupOkayButton_Update()
getglobal("BenillaMacroEditButton"):Disable()
getglobal("BenillaMacroDeleteButton"):Disable()
getglobal("BenillaMacroNewButton"):Disable()
getglobal("BenillaMacroFrameTab1"):Disable()
getglobal("BenillaMacroFrameTab2"):Disable()
end
function BenillaMacroPopupFrame_OnHide(popup)
local frame = getglobal("BenillaMacroFrame")
if popup.mode == "new" then
getglobal("BenillaMacroFrameText"):Show()
getglobal("BenillaMacroFrameText"):SetFocus()
end
getglobal("BenillaMacroEditButton"):Enable()
getglobal("BenillaMacroDeleteButton"):Enable()
local numAccountMacros, numCharacterMacros = GetNumMacros()
local numMacros
if frame.macroBase == 0 then
numMacros = numAccountMacros
else
numMacros = numCharacterMacros
end
if numMacros < MAX_MACROS then
getglobal("BenillaMacroNewButton"):Enable()
end
PanelTemplates_UpdateTabs(frame)
end
-- ref l.215-250, with ONE faithfulness note that is easy to get wrong. The ref's body
-- opens `if ( this.mode == "new" ) then MacroPopupEditBox:SetText("")` — and `this` there
-- is the FrameScript caller, not the popup: from `MacroPopupFrame_OnShow` it IS the popup
-- (so a fresh "new" clears the name box), but from `MacroPopupButton_OnClick` it is the
-- clicked BUTTON, whose `.mode` is nil, so neither branch runs and the name you already
-- typed survives the icon click. Substituting the popup for `this` would blank the name on
-- every icon click — the reference does not do that. Modelled explicitly instead: only the
-- OnShow path asks for the name reset.
function BenillaMacroPopupFrame_Update(resetName)
local popup = getglobal("BenillaMacroPopupFrame")
local scrollFrame = getglobal("BenillaMacroPopupScrollFrame")
local numMacroIcons = GetNumMacroIcons()
local macroPopupOffset = FauxScrollFrame_GetOffset(scrollFrame)
if resetName then
if popup.mode == "new" then
getglobal("BenillaMacroPopupEditBox"):SetText("")
elseif popup.mode == "edit" then
local name = GetMacroInfo(getglobal("BenillaMacroFrame").selectedMacro)
getglobal("BenillaMacroPopupEditBox"):SetText(name or "")
end
end
for i = 1, NUM_MACRO_ICONS_SHOWN do
local icon = getglobal("BenillaMacroPopupButton" .. i .. "Icon")
local button = getglobal("BenillaMacroPopupButton" .. i)
local index = (macroPopupOffset * NUM_ICONS_PER_ROW) + i
if index <= numMacroIcons then
icon:SetTexture(GetMacroIconInfo(index))
button:Show()
else
icon:SetTexture("")
button:Hide()
end
if index == popup.selectedIcon then
button:SetChecked(1)
else
button:SetChecked(nil)
end
end
FauxScrollFrame_Update(scrollFrame,
math.ceil(numMacroIcons / NUM_ICONS_PER_ROW), NUM_ICON_ROWS, MACRO_ICON_ROW_HEIGHT)
end
-- ref l.252-261. The "edit" arm's second Enable is the ref's own: renaming an existing
-- macro does not require re-picking an icon.
function BenillaMacroPopupOkayButton_Update()
local popup = getglobal("BenillaMacroPopupFrame")
local okay = getglobal("BenillaMacroPopupOkayButton")
local text = getglobal("BenillaMacroPopupEditBox"):GetText() or ""
if string.len(text) > 0 and popup.selectedIcon then
okay:Enable()
else
okay:Disable()
end
if popup.mode == "edit" and string.len(text) > 0 then
okay:Enable()
end
end
-- ref l.263-268.
function BenillaMacroPopupButton_OnClick(button)
local popup = getglobal("BenillaMacroPopupFrame")
local scrollFrame = getglobal("BenillaMacroPopupScrollFrame")
popup.selectedIcon = button:GetID()
+ (FauxScrollFrame_GetOffset(scrollFrame) * NUM_ICONS_PER_ROW)
getglobal("BenillaMacroFrameSelectedMacroButtonIcon")
:SetTexture(GetMacroIconInfo(popup.selectedIcon))
BenillaMacroPopupOkayButton_Update()
BenillaMacroPopupFrame_Update()
end
-- ref l.270-280. `perCharacter` is the ref's own `(MacroFrame.macroBase > 0)`.
function BenillaMacroPopupOkayButton_OnClick()
local frame = getglobal("BenillaMacroFrame")
local popup = getglobal("BenillaMacroPopupFrame")
local name = getglobal("BenillaMacroPopupEditBox"):GetText()
local index = 1
if popup.mode == "new" then
index = CreateMacro(name, popup.selectedIcon, nil, nil, (frame.macroBase > 0))
elseif popup.mode == "edit" then
index = EditMacro(frame.selectedMacro, name, popup.selectedIcon)
end
popup:Hide()
BenillaMacroFrame_SelectMacro(index)
BenillaMacroFrame_Update()
end
-- ref l.282-287.
function BenillaMacroFrame_SaveMacro()
local frame = getglobal("BenillaMacroFrame")
if frame.textChanged and frame.selectedMacro then
EditMacro(frame.selectedMacro, nil, nil, getglobal("BenillaMacroFrameText"):GetText())
frame.textChanged = nil
end
end
-- The body box's OnTextChanged (ref MacroFrame.xml l.411-427): mark dirty, close a "new"
-- popup, refresh the character counter, and keep the view pinned to the bottom while
-- typing (the ref's own scrollBar:SetValue(max) tail).
function BenillaMacroFrameText_OnTextChanged(box)
local frame = getglobal("BenillaMacroFrame")
frame.textChanged = 1
local popup = getglobal("BenillaMacroPopupFrame")
if popup.mode == "new" then
popup:Hide()
end
getglobal("BenillaMacroFrameCharLimitText")
:SetText(format(MACROFRAME_CHAR_LIMIT, box:GetNumLetters()))
BenillaMacroFrameText_Resize()
local bar = getglobal("BenillaMacroFrameScrollFrameBar")
local _, maxValue = bar:GetMinMaxValues()
if maxValue > 0 and box.maxScroll ~= maxValue then
box.maxScroll = maxValue
bar:SetValue(maxValue)
end
end
-- The window's own event driver: UPDATE_MACROS is the ref's event for "the macro table
-- changed" and covers BOTH an edit made here and the app's load at world entry, so a
-- freshly-entered world shows the saved macros without this file knowing about files.
function BenillaMacroFrame_OnEvent(frame, event)
if event == "UPDATE_MACROS" then
BenillaMacroFrame_EnsureSelection()
if frame:IsVisible() then
BenillaMacroFrame_Update()
end
end
end
]]></Script>
<!--
ref MacroFrameButtonTemplate (l.4-52): a 36x36 CheckButton whose NormalTexture IS the icon
($parentIcon), over the empty-slot plate, with the name outlined along the bottom.
-->
<CheckButton name="BenillaMacroFrameButtonTemplate" virtual="true">
<Size><AbsDimension x="36" y="36"/></Size>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentName" inherits="GameFontHighlightSmallOutline">
<Size><AbsDimension x="36" y="10"/></Size>
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="0" y="2"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
<Layer level="BACKGROUND">
<Texture file="Interface\Buttons\UI-EmptySlot-Disabled">
<Size><AbsDimension x="64" y="64"/></Size>
<Anchors><Anchor point="CENTER"><Offset><AbsDimension x="0" y="-1"/></Offset></Anchor></Anchors>
</Texture>
</Layer>
</Layers>
<NormalTexture name="$parentIcon">
<Size><AbsDimension x="36" y="36"/></Size>
<Anchors><Anchor point="CENTER"><Offset><AbsDimension x="0" y="-1"/></Offset></Anchor></Anchors>
</NormalTexture>
<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
<CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/>
</CheckButton>
<!-- ref MacroButtonTemplate (l.53-65): the list button — click selects, drag picks up. -->
<CheckButton name="BenillaMacroButtonTemplate" inherits="BenillaMacroFrameButtonTemplate" virtual="true">
<Scripts>
<OnLoad>self:RegisterForDrag("LeftButton")</OnLoad>
<OnClick>BenillaMacroButton_OnClick(self)</OnClick>
<OnDragStart>PickupMacro(getglobal("BenillaMacroFrame").macroBase + self:GetID())</OnDragStart>
</Scripts>
</CheckButton>
<!-- ref MacroPopupButtonTemplate (l.66-72). -->
<CheckButton name="BenillaMacroPopupButtonTemplate" inherits="BenillaMacroFrameButtonTemplate" virtual="true">
<Scripts>
<OnClick>BenillaMacroPopupButton_OnClick(self)</OnClick>
</Scripts>
</CheckButton>
<!-- The panel button face (the TrainerFrame precedent — this engine ships no
UIPanelButtonTemplate/UIPanelButtonGrayTemplate). -->
<Button name="BenillaMacroPanelButtonTemplate" virtual="true">
<Size><AbsDimension x="80" y="22"/></Size>
<NormalFont inherits="GameFontNormal"/>
<HighlightFont inherits="GameFontHighlight"/>
<DisabledFont inherits="GameFontDisable"/>
<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>
</Button>
<!-- ref MacroFrame (l.73-618). No <Anchors>: ShowUIPanel SetPoints this into the left slot. -->
<Frame name="BenillaMacroFrame" hidden="true">
<Size><AbsDimension x="384" y="512"/></Size>
<Layers>
<Layer level="BACKGROUND">
<Texture name="BenillaMacroFramePortrait" file="Interface\MacroFrame\MacroFrame-Icon">
<Size><AbsDimension x="60" y="60"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="7" y="-6"/></Offset></Anchor></Anchors>
</Texture>
</Layer>
<!-- The four quadrant slabs: the ref borrows PaperDollInfoFrame's two top halves and
uses MacroFrame's own two bottoms (ref l.103-134). -->
<Layer level="BORDER">
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopLeft">
<Size><AbsDimension x="256" y="256"/></Size>
<Anchors><Anchor point="TOPLEFT"/></Anchors>
</Texture>
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopRight">
<Size><AbsDimension x="128" y="256"/></Size>
<Anchors><Anchor point="TOPRIGHT"/></Anchors>
</Texture>
<Texture file="Interface\MacroFrame\MacroFrame-BotLeft">
<Size><AbsDimension x="256" y="256"/></Size>
<Anchors><Anchor point="BOTTOMLEFT"/></Anchors>
</Texture>
<Texture file="Interface\MacroFrame\MacroFrame-BotRight">
<Size><AbsDimension x="128" y="256"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT"/></Anchors>
</Texture>
<FontString inherits="GameFontNormal" text="CREATE_MACROS">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="0" y="-17"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<!-- The divider between the 18-button grid and the detail pane (ref l.146-171). -->
<Texture name="BenillaMacroHorizontalBarLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
<Size><AbsDimension x="256" y="16"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="15" y="-220"/></Offset></Anchor></Anchors>
<TexCoords left="0" right="1.0" top="0" bottom="0.25"/>
</Texture>
<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
<Size><AbsDimension x="75" y="16"/></Size>
<Anchors><Anchor point="LEFT" relativeTo="BenillaMacroHorizontalBarLeft" relativePoint="RIGHT"/></Anchors>
<TexCoords left="0" right="0.29296875" top="0.25" bottom="0.5"/>
</Texture>
<Texture name="BenillaMacroFrameSelectedMacroBackground" file="Interface\Buttons\UI-EmptySlot">
<Size><AbsDimension x="64" y="64"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="16" y="-228"/></Offset></Anchor></Anchors>
</Texture>
<FontString name="BenillaMacroFrameSelectedMacroName" inherits="GameFontNormalLarge" justifyH="LEFT">
<Size><AbsDimension x="256" y="16"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="BenillaMacroFrameSelectedMacroBackground" relativePoint="TOPRIGHT">
<Offset><AbsDimension x="-4" y="-15"/></Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="BenillaMacroFrameEnterMacroText" inherits="GameFontHighlightSmall" text="ENTER_MACRO_LABEL">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="BenillaMacroFrameSelectedMacroBackground" relativePoint="BOTTOMLEFT">
<Offset><AbsDimension x="8" y="0"/></Offset>
</Anchor>
</Anchors>
</FontString>
<FontString name="BenillaMacroFrameCharLimitText" inherits="GameFontHighlightSmall">
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="-15" y="105"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- The detail pane's own big button: a drag source for the selected macro (ref
l.217-231 — its OnClick unchecks itself and picks up, never re-selects). -->
<CheckButton name="BenillaMacroFrameSelectedMacroButton" inherits="BenillaMacroButtonTemplate" id="0">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="BenillaMacroFrameSelectedMacroBackground">
<Offset><AbsDimension x="14" y="-14"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
self:SetChecked(nil)
PickupMacro(getglobal("BenillaMacroFrame").selectedMacro)
</OnClick>
</Scripts>
</CheckButton>
<!-- The 18-button grid: 3 rows of 6 (ref l.232-393; the ref's own 13px column gap and
10px row gap). -->
<CheckButton name="BenillaMacroButton1" inherits="BenillaMacroButtonTemplate" id="1">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="42" y="-83"/></Offset></Anchor></Anchors>
</CheckButton>
<CheckButton name="BenillaMacroButton2" inherits="BenillaMacroButtonTemplate" id="2"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton1" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton3" inherits="BenillaMacroButtonTemplate" id="3"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton2" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton4" inherits="BenillaMacroButtonTemplate" id="4"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton3" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton5" inherits="BenillaMacroButtonTemplate" id="5"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton4" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton6" inherits="BenillaMacroButtonTemplate" id="6"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton5" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton7" inherits="BenillaMacroButtonTemplate" id="7"><Anchors><Anchor point="TOP" relativeTo="BenillaMacroButton1" relativePoint="BOTTOM"><Offset><AbsDimension x="0" y="-10"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton8" inherits="BenillaMacroButtonTemplate" id="8"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton7" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton9" inherits="BenillaMacroButtonTemplate" id="9"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton8" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton10" inherits="BenillaMacroButtonTemplate" id="10"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton9" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton11" inherits="BenillaMacroButtonTemplate" id="11"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton10" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton12" inherits="BenillaMacroButtonTemplate" id="12"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton11" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton13" inherits="BenillaMacroButtonTemplate" id="13"><Anchors><Anchor point="TOP" relativeTo="BenillaMacroButton7" relativePoint="BOTTOM"><Offset><AbsDimension x="0" y="-10"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton14" inherits="BenillaMacroButtonTemplate" id="14"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton13" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton15" inherits="BenillaMacroButtonTemplate" id="15"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton14" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton16" inherits="BenillaMacroButtonTemplate" id="16"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton15" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton17" inherits="BenillaMacroButtonTemplate" id="17"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton16" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroButton18" inherits="BenillaMacroButtonTemplate" id="18"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroButton17" relativePoint="RIGHT"><Offset><AbsDimension x="13" y="0"/></Offset></Anchor></Anchors></CheckButton>
<!-- The body's tooltip-backdrop plate (ref MacroFrameTextBackground l.449-477), drawn
before the scroll frame so the text sits on it. -->
<Frame name="BenillaMacroFrameTextBackground">
<Size><AbsDimension x="322" y="95"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="18" y="-305"/></Offset></Anchor></Anchors>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize><AbsValue val="16"/></EdgeSize>
<TileSize><AbsValue val="16"/></TileSize>
<BackgroundInsets><AbsInset left="5" right="5" top="5" bottom="5"/></BackgroundInsets>
</Backdrop>
<Scripts>
<OnLoad>
self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b)
self:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b)
</OnLoad>
</Scripts>
</Frame>
<!-- The body editor (ref MacroFrameScrollFrame l.394-435). A real ScrollFrame with a
self-sizing EditBox child + a real draggable Slider — this file's header comment. -->
<ScrollFrame name="BenillaMacroFrameScrollFrame">
<Size><AbsDimension x="286" y="85"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="BenillaMacroFrameSelectedMacroBackground" relativePoint="BOTTOMLEFT">
<Offset><AbsDimension x="11" y="-18"/></Offset>
</Anchor>
</Anchors>
<Frames>
<!-- `$parentBar` is the real-scroll kit's own naming contract
(ScrollTemplates.xml: `BenillaScroll_SyncBar` derives the bar from the
frame's name). Its OnValueChanged REPLACES the faux handler the shared
Slider template carries — the TalentFrame precedent. -->
<Slider name="$parentBar" inherits="BenillaScrollBarTemplate">
<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>
<EditBox name="BenillaMacroFrameText" multiLine="true" letters="255" autoFocus="false">
<Size><AbsDimension x="286" y="85"/></Size>
<Anchors><Anchor point="TOPLEFT"/></Anchors>
<FontString inherits="GameFontHighlightSmall"/>
<Scripts>
<OnTextChanged>BenillaMacroFrameText_OnTextChanged(self)</OnTextChanged>
<OnEscapePressed>self:ClearFocus()</OnEscapePressed>
</Scripts>
</EditBox>
</Frames>
<Scripts>
<OnLoad>BenillaMacroFrameScrollFrame_OnLoad(self)</OnLoad>
</Scripts>
</ScrollFrame>
<!-- ref MacroFrameTextButton (l.436-448): the click-to-focus plate over the body. -->
<Button name="BenillaMacroFrameTextButton">
<Size><AbsDimension x="286" y="85"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="BenillaMacroFrameScrollFrame" relativePoint="TOPLEFT"/></Anchors>
<Scripts>
<OnClick>getglobal("BenillaMacroFrameText"):SetFocus()</OnClick>
</Scripts>
</Button>
<!-- The two tabs (ref l.478-520). Tab 2's label is the ref's own
`format(CHARACTER_SPECIFIC_MACROS, UnitName("player"))`, re-set on every show
because the player name is not known at load time in this client. -->
<Button name="BenillaMacroFrameTab1" inherits="TabButtonTemplate" text="GENERAL_MACROS" id="1">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="65" y="-39"/></Offset></Anchor></Anchors>
<Scripts>
<!-- The ref's own `PanelTemplates_TabResize(-15)` (l.488) as a fit parameter —
the template's settle loop owns the one call site (UiPanels.xml). -15 is
what keeps a two-tab row inside a 384-wide window. -->
<OnLoad>self.benillaTabPadding = -15</OnLoad>
<OnClick>
PanelTemplates_SetTab(getglobal("BenillaMacroFrame"), self:GetID())
BenillaMacroFrame_SaveMacro()
BenillaMacroFrame_SetAccountMacros()
BenillaMacroFrame_Update()
</OnClick>
</Scripts>
</Button>
<Button name="BenillaMacroFrameTab2" inherits="TabButtonTemplate" id="2">
<Anchors><Anchor point="LEFT" relativeTo="BenillaMacroFrameTab1" relativePoint="RIGHT"/></Anchors>
<Scripts>
<!-- ref l.511: `PanelTemplates_TabResize(-15, nil, nil, 150)`. The cap is
load-bearing here and nowhere else — this label carries a player name, so
it is the one tab whose width is not known when the window is written.
`benillaTabRightInset` is what makes it hold: **this window is narrower
than its frame says.** The rect is 384 wide, but the art is
`UI-Character-General-TopLeft` (256) + `-TopRight` (128 — VERIFIED 128 in
the BLP header, so no squash), and that second slice carries a transparent
tail: decoding its DXT3 alpha, the last opaque column is 92 of 128, so the
**drawn plate ends at unit 349**. 40 is that boundary with a few units of
breathing room, so a clamped tab's end cap doesn't sit flush on the border.
Clamping to the frame rect — the first attempt (0997) — clamped to an edge
the player cannot see, and the tab still walked out over the world. -->
<OnLoad>
self.benillaTabPadding = -15
self.benillaTabMaxWidth = 150
self.benillaTabRightInset = 40
self:SetText(BenillaMacroFrame_TabTwoLabel())
</OnLoad>
<OnClick>
PanelTemplates_SetTab(getglobal("BenillaMacroFrame"), self:GetID())
BenillaMacroFrame_SaveMacro()
BenillaMacroFrame_SetCharacterMacros()
BenillaMacroFrame_Update()
</OnClick>
</Scripts>
</Button>
<Button name="BenillaMacroEditButton" inherits="BenillaMacroPanelButtonTemplate" text="CHANGE_MACRO_NAME_ICON">
<Size><AbsDimension x="170" y="22"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="BenillaMacroFrameSelectedMacroBackground">
<Offset><AbsDimension x="51" y="-30"/></Offset>
</Anchor>
</Anchors>
<Scripts><OnClick>BenillaMacroEditButton_OnClick()</OnClick></Scripts>
</Button>
<Button name="BenillaMacroDeleteButton" inherits="BenillaMacroPanelButtonTemplate" text="DELETE">
<Anchors><Anchor point="BOTTOMLEFT"><Offset><AbsDimension x="17" y="79"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
-- The ref relies on the button being Disabled (MacroFrame_Update) to keep
-- `selectedMacro` non-nil here; guard anyway — a script Click() bypasses
-- the disabled state and DeleteMacro(nil) is a hard error, not a no-op.
if not getglobal("BenillaMacroFrame").selectedMacro then return end
DeleteMacro(getglobal("BenillaMacroFrame").selectedMacro)
BenillaMacroFrame_SetAccountMacros()
if getglobal("BenillaMacroFrame").macroBase ~= 0 then
BenillaMacroFrame_SetCharacterMacros()
end
BenillaMacroFrame_Update()
getglobal("BenillaMacroFrameText"):ClearFocus()
</OnClick>
</Scripts>
</Button>
<Button name="BenillaMacroNewButton" inherits="BenillaMacroPanelButtonTemplate" text="NEW">
<Anchors><Anchor point="CENTER" relativePoint="TOPLEFT"><Offset><AbsDimension x="222" y="-422"/></Offset></Anchor></Anchors>
<Scripts><OnClick>BenillaMacroNewButton_OnClick()</OnClick></Scripts>
</Button>
<Button name="BenillaMacroExitButton" inherits="BenillaMacroPanelButtonTemplate" text="EXIT">
<Anchors><Anchor point="CENTER" relativePoint="TOPLEFT"><Offset><AbsDimension x="303" y="-422"/></Offset></Anchor></Anchors>
<Scripts><OnClick>HideUIPanel(getglobal("BenillaMacroFrame"))</OnClick></Scripts>
</Button>
<!-- The top-right X (ref a UIPanelCloseButton at TOPRIGHT (-29,-8); the minimize-button
art stands in — this engine ships no UIPanelCloseButton, TrainerFrame's precedent). -->
<Button name="BenillaMacroFrameCloseButton">
<Size><AbsDimension x="32" y="32"/></Size>
<Anchors><Anchor point="TOPRIGHT"><Offset><AbsDimension x="-29" 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(getglobal("BenillaMacroFrame"))</OnClick></Scripts>
</Button>
</Frames>
<Scripts>
<OnLoad>
BenillaMacroFrame_OnLoad(self)
self:RegisterEvent("UPDATE_MACROS")
</OnLoad>
<OnEvent>BenillaMacroFrame_OnEvent(self, event)</OnEvent>
<OnShow>
getglobal("BenillaMacroFrameTab2"):SetText(BenillaMacroFrame_TabTwoLabel())
BenillaMacroFrame_OnShow()
UpdateMicroButtons()
</OnShow>
<OnHide>
BenillaMacroFrame_OnHide()
UpdateMicroButtons()
</OnHide>
<OnMouseWheel>BenillaScroll_OnMouseWheel(getglobal("BenillaMacroFrameScrollFrame"), arg1)</OnMouseWheel>
</Scripts>
</Frame>
<!-- ref MacroPopupFrame (l.619-1005): the name + icon chooser, hung off the window's right edge. -->
<Frame name="BenillaMacroPopupFrame" toplevel="true" hidden="true">
<Size><AbsDimension x="297" y="298"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="BenillaMacroFrame" relativePoint="TOPRIGHT">
<Offset><AbsDimension x="-40" y="-40"/></Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture file="Interface\MacroFrame\MacroPopup-TopLeft">
<Size><AbsDimension x="256" y="256"/></Size>
<Anchors><Anchor point="TOPLEFT"/></Anchors>
</Texture>
<Texture file="Interface\MacroFrame\MacroPopup-TopRight">
<Size><AbsDimension x="64" y="256"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="256" y="0"/></Offset></Anchor></Anchors>
</Texture>
<Texture file="Interface\MacroFrame\MacroPopup-BotLeft">
<Size><AbsDimension x="256" y="64"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-256"/></Offset></Anchor></Anchors>
</Texture>
<Texture file="Interface\MacroFrame\MacroPopup-BotRight">
<Size><AbsDimension x="64" y="64"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="256" y="-256"/></Offset></Anchor></Anchors>
</Texture>
<FontString inherits="GameFontHighlightSmall" text="MACRO_POPUP_TEXT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="24" y="-21"/></Offset></Anchor></Anchors>
</FontString>
<FontString inherits="GameFontHighlightSmall" text="MACRO_POPUP_CHOOSE_ICON">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="24" y="-69"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<EditBox name="BenillaMacroPopupEditBox" letters="16" historyLines="0">
<Size><AbsDimension x="200" y="20"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="29" y="-35"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="BenillaMacroPopupNameLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
<Size><AbsDimension x="12" y="29"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-11" y="0"/></Offset></Anchor></Anchors>
<TexCoords left="0" right="0.09375" top="0" bottom="1.0"/>
</Texture>
<Texture name="BenillaMacroPopupNameMiddle" file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
<Size><AbsDimension x="175" y="29"/></Size>
<Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupNameLeft" relativePoint="RIGHT"/></Anchors>
<TexCoords left="0.09375" right="0.90625" top="0" bottom="1.0"/>
</Texture>
<Texture name="BenillaMacroPopupNameRight" file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
<Size><AbsDimension x="12" y="29"/></Size>
<Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupNameMiddle" relativePoint="RIGHT"/></Anchors>
<TexCoords left="0.90625" right="1.0" top="0" bottom="1.0"/>
</Texture>
</Layer>
</Layers>
<FontString inherits="ChatFontNormal"/>
<Scripts>
<OnTextChanged>
BenillaMacroPopupOkayButton_Update()
getglobal("BenillaMacroFrameSelectedMacroName"):SetText(self:GetText())
</OnTextChanged>
<OnEscapePressed>getglobal("BenillaMacroPopupFrame"):Hide()</OnEscapePressed>
<OnEnterPressed>
-- The ref writes `IsEnabled() ~= 0`; this engine's IsEnabled returns
-- a BOOLEAN (button.rs), for which `~= 0` is always true — plain
-- truthiness is the correct read here.
if getglobal("BenillaMacroPopupOkayButton"):IsEnabled() then
BenillaMacroPopupOkayButton_OnClick()
end
</OnEnterPressed>
</Scripts>
</EditBox>
<!-- The icon grid's faux scroll (ref a ClassTrainerListScrollFrameTemplate, l.759-775).
The frame itself is invisible; its ONE visible consequence is where the bar seats
(FauxScrollFrameTemplate hangs it off the frame's right edge +6, inset 16
top and bottom). So its rect is the reference's VERBATIM — 296x195 at TOPRIGHT
(-39,-67) — which puts the bar at popup x 264..280, on the plate's groove and
bracketing the 4-row grid. 0983 sized it to the grid instead (252x152 at TOPLEFT
24,-85) and the bar came out at x 282..298: hanging half off the plate's right
edge, over the world. -->
<Frame name="BenillaMacroPopupScrollFrame" inherits="FauxScrollFrameTemplate">
<Size><AbsDimension x="296" y="195"/></Size>
<Anchors>
<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT"><Offset><AbsDimension x="-39" y="-67"/></Offset></Anchor>
</Anchors>
<Scripts>
<!-- The faux kit's contract (ScrollTemplates.xml): the owner sets updateFunc,
the shared Slider handler calls it whenever the row offset moves. -->
<OnLoad>
ScrollFrame_OnLoad()
self.updateFunc = BenillaMacroPopupFrame_Update
</OnLoad>
</Scripts>
</Frame>
<CheckButton name="BenillaMacroPopupButton1" inherits="BenillaMacroPopupButtonTemplate" id="1">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="24" y="-85"/></Offset></Anchor></Anchors>
</CheckButton>
<CheckButton name="BenillaMacroPopupButton2" inherits="BenillaMacroPopupButtonTemplate" id="2"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton1" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton3" inherits="BenillaMacroPopupButtonTemplate" id="3"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton2" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton4" inherits="BenillaMacroPopupButtonTemplate" id="4"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton3" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton5" inherits="BenillaMacroPopupButtonTemplate" id="5"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton4" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton6" inherits="BenillaMacroPopupButtonTemplate" id="6"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaMacroPopupButton1" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-8"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton7" inherits="BenillaMacroPopupButtonTemplate" id="7"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton6" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton8" inherits="BenillaMacroPopupButtonTemplate" id="8"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton7" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton9" inherits="BenillaMacroPopupButtonTemplate" id="9"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton8" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton10" inherits="BenillaMacroPopupButtonTemplate" id="10"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton9" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton11" inherits="BenillaMacroPopupButtonTemplate" id="11"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaMacroPopupButton6" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-8"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton12" inherits="BenillaMacroPopupButtonTemplate" id="12"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton11" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton13" inherits="BenillaMacroPopupButtonTemplate" id="13"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton12" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton14" inherits="BenillaMacroPopupButtonTemplate" id="14"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton13" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton15" inherits="BenillaMacroPopupButtonTemplate" id="15"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton14" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton16" inherits="BenillaMacroPopupButtonTemplate" id="16"><Anchors><Anchor point="TOPLEFT" relativeTo="BenillaMacroPopupButton11" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-8"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton17" inherits="BenillaMacroPopupButtonTemplate" id="17"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton16" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton18" inherits="BenillaMacroPopupButtonTemplate" id="18"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton17" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton19" inherits="BenillaMacroPopupButtonTemplate" id="19"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton18" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<CheckButton name="BenillaMacroPopupButton20" inherits="BenillaMacroPopupButtonTemplate" id="20"><Anchors><Anchor point="LEFT" relativeTo="BenillaMacroPopupButton19" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors></CheckButton>
<Button name="BenillaMacroPopupCancelButton" inherits="BenillaMacroPanelButtonTemplate" text="CANCEL">
<Size><AbsDimension x="78" y="22"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-11" y="13"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
getglobal("BenillaMacroPopupFrame"):Hide()
BenillaMacroFrame_Update()
PlaySound("gsTitleOptionOK")
</OnClick>
</Scripts>
</Button>
<Button name="BenillaMacroPopupOkayButton" inherits="BenillaMacroPanelButtonTemplate" text="OKAY">
<Size><AbsDimension x="78" y="22"/></Size>
<Anchors><Anchor point="RIGHT" relativeTo="BenillaMacroPopupCancelButton" relativePoint="LEFT"><Offset><AbsDimension x="-2" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
BenillaMacroPopupOkayButton_OnClick()
PlaySound("gsTitleOptionOK")
</OnClick>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnShow>BenillaMacroPopupFrame_OnShow(self)</OnShow>
<OnHide>BenillaMacroPopupFrame_OnHide(self)</OnHide>
<OnMouseWheel>BenillaFauxScrollFrame_OnMouseWheel(getglobal("BenillaMacroPopupScrollFrame"), arg1)</OnMouseWheel>
</Scripts>
</Frame>
</Ui>