Files
benilla-octo/crates/benilla-app/assets/ui/ComboFrame.xml
T
SamandClaude Fable 5 44ff435304 the addon arc: the AddOns folder opens
- benilla loads real 1.12 addons from Interface/AddOns — TOC, XML and Lua through one loader, with per-addon saved variables, Bindings.xml and the lifecycle events addons expect
- both AddOns screens are in: the character-select list with per-addon enable state, and the ESC menu's in-game list
- the API surface is measured, not guessed — a corpus harness runs hundreds of real 1.12 addons and ranks exactly which globals, templates and verbs they demand
- the Lua dialect is the client's own, read off the binary — 5.0 semantics with the 1.12 additions, and UI source files are bytes, not UTF-8

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

182 lines
8.6 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 combo-point dots (decision 0869) — the reference `FrameXML/ComboFrame.xml` +
`ComboFrame.lua` transcribed, geometry QUOTED verbatim (offsets, sizes, TexCoords and the
five fade constants are the reference's own), renamed onto our frames and driven by our
`PLAYER_COMBO_POINTS` feed.
ONE `Interface\ComboFrame\ComboPoint` sheet holds all three layers, split by TexCoords: the
dim socket (0 .. 0.375), the lit highlight (0.375 .. 0.5625) and the additive shine
(0.5625 .. 1). A point that comes up fades its highlight in, and the highlight's completion
hands off to the shine's fade-in → fade-out — the reference's two-hop `finishedFunc` chain,
which our `UIFrameFade` (UiPanels.xml) supports verbatim.
NO CLASS TEST HERE, and none is missing: this file gates on `GetComboPoints() > 0` and
nothing else because the reference does, and `0x51a190` carries both real gates itself —
rogue-or-druid (`cmp al,4 / cmp al,0xb`), and the points must be banked on the CURRENT
target. So a *warrior* never lights a dot even though the server really does bank them a
point on a victim's dodge — that byte greys Overpower through the usable walk's leg 5 and
goes no further (§5 byte-read, decision 0875). Re-targeting empties these dots with the
count untouched, which is exactly why the reference registers PLAYER_TARGET_CHANGED.
The five dots march down-left, each anchored TOP-to-BOTTOM of the one before with a small
rightward drift — the reference's diagonal, hugging the target frame's ring.
-->
<Frame name="BenillaComboPointTemplate" virtual="true">
<Size><AbsDimension x="12" y="12"/></Size>
<Layers>
<!-- The empty socket (ref l.8-19). -->
<Layer level="BACKGROUND">
<Texture file="Interface\ComboFrame\ComboPoint">
<Size><AbsDimension x="12" y="16"/></Size>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
<TexCoords left="0" right="0.375" top="0" bottom="1"/>
</Texture>
</Layer>
<!-- The lit point, faded in as the point is earned (ref l.20-34). -->
<Layer level="ARTWORK">
<Texture name="$parentHighlight" file="Interface\ComboFrame\ComboPoint">
<Size><AbsDimension x="8" y="16"/></Size>
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="2" y="0"/></Offset></Anchor>
</Anchors>
<TexCoords left="0.375" right="0.5625" top="0" bottom="1"/>
</Texture>
</Layer>
<!-- The additive flare, chained off the highlight's fade (ref l.35-48). -->
<Layer level="OVERLAY">
<Texture name="$parentShine" file="Interface\ComboFrame\ComboPoint" alphaMode="ADD">
<Size><AbsDimension x="14" y="16"/></Size>
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="4"/></Offset></Anchor>
</Anchors>
<TexCoords left="0.5625" right="1" top="0" bottom="1"/>
</Texture>
</Layer>
</Layers>
</Frame>
<Frame name="ComboFrame" frameStrata="MEDIUM" toplevel="true" parent="UIParent" hidden="true" alpha="0">
<Size><AbsDimension x="256" y="32"/></Size>
<!-- ref l.56-62: TOPRIGHT of the target frame, (-44,-9). -->
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="TargetFrame">
<Offset><AbsDimension x="-44" y="-9"/></Offset>
</Anchor>
</Anchors>
<Frames>
<Frame name="ComboPoint1" inherits="BenillaComboPointTemplate">
<Anchors>
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
</Frame>
<Frame name="ComboPoint2" inherits="BenillaComboPointTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="ComboPoint1" relativePoint="BOTTOM">
<Offset><AbsDimension x="7" y="4"/></Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="ComboPoint3" inherits="BenillaComboPointTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="ComboPoint2" relativePoint="BOTTOM">
<Offset><AbsDimension x="5" y="2"/></Offset>
</Anchor>
</Anchors>
</Frame>
<Frame name="ComboPoint4" inherits="BenillaComboPointTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="ComboPoint3" relativePoint="BOTTOM">
<Offset><AbsDimension x="2" y="1"/></Offset>
</Anchor>
</Anchors>
</Frame>
<!-- The fifth is the odd one out: the reference sizes it 15×18 (ref l.101-104). -->
<Frame name="ComboPoint5" inherits="BenillaComboPointTemplate">
<Size><AbsDimension x="15" y="18"/></Size>
<Anchors>
<Anchor point="TOP" relativeTo="ComboPoint4" relativePoint="BOTTOM">
<Offset><AbsDimension x="0" y="1"/></Offset>
</Anchor>
</Anchors>
</Frame>
</Frames>
<Scripts>
<OnLoad>
this:RegisterEvent("PLAYER_TARGET_CHANGED");
this:RegisterEvent("PLAYER_COMBO_POINTS");
ComboPoint1Highlight:SetAlpha(0);
ComboPoint1Shine:SetAlpha(0);
</OnLoad>
<OnEvent>
ComboPointsFrame_OnEvent();
</OnEvent>
</Scripts>
</Frame>
<Script>
<![CDATA[
-- ref ComboFrame.lua l.1-6, verbatim.
MAX_COMBO_POINTS = 5;
COMBOFRAME_FADE_IN = 0.3;
COMBOFRAME_FADE_OUT = 0.5;
COMBOFRAME_HIGHLIGHT_FADE_IN = 0.4;
COMBOFRAME_SHINE_FADE_IN = 0.3;
COMBOFRAME_SHINE_FADE_OUT = 0.4;
COMBO_FRAME_LAST_NUM_POINTS = 0;
-- ref ComboFrame.lua `ComboPointsFrame_OnEvent`. Only points ABOVE the last count animate
-- (`i > COMBO_FRAME_LAST_NUM_POINTS`) — a repaint at the same count must not re-flare every
-- dot, which is why the last count is remembered across events rather than recomputed.
function ComboPointsFrame_OnEvent()
local comboPoints = GetComboPoints();
if comboPoints > 0 then
if not ComboFrame:IsVisible() then
ComboFrame:Show();
UIFrameFadeIn(ComboFrame, COMBOFRAME_FADE_IN);
end
for i = 1, MAX_COMBO_POINTS do
local comboPointHighlight = getglobal("ComboPoint"..i.."Highlight");
local comboPointShine = getglobal("ComboPoint"..i.."Shine");
if i <= comboPoints then
if i > COMBO_FRAME_LAST_NUM_POINTS then
local fadeInfo = {};
fadeInfo.mode = "IN";
fadeInfo.timeToFade = COMBOFRAME_HIGHLIGHT_FADE_IN;
fadeInfo.finishedFunc = ComboPointShineFadeIn;
fadeInfo.finishedArg1 = comboPointShine;
UIFrameFade(comboPointHighlight, fadeInfo);
end
else
comboPointHighlight:SetAlpha(0);
comboPointShine:SetAlpha(0);
end
end
else
ComboPoint1Highlight:SetAlpha(0);
ComboPoint1Shine:SetAlpha(0);
ComboFrame:Hide();
end
COMBO_FRAME_LAST_NUM_POINTS = comboPoints;
end
function ComboPointShineFadeIn(frame)
local fadeInfo = {};
fadeInfo.mode = "IN";
fadeInfo.timeToFade = COMBOFRAME_SHINE_FADE_IN;
fadeInfo.finishedFunc = ComboPointShineFadeOut;
fadeInfo.finishedArg1 = frame:GetName();
UIFrameFade(frame, fadeInfo);
end
-- The name round-trip is the reference's own workaround ("hack since a frame can't have a
-- reference to itself in it") — kept, so the chain reads as its source does.
function ComboPointShineFadeOut(frameName)
UIFrameFadeOut(getglobal(frameName), COMBOFRAME_SHINE_FADE_OUT);
end
]]>
</Script>
</Ui>