diff --git a/crates/benilla-app/assets/ui/ActionBar.xml b/crates/benilla-app/assets/ui/ActionBar.xml index d27416c2..bd210cb5 100644 --- a/crates/benilla-app/assets/ui/ActionBar.xml +++ b/crates/benilla-app/assets/ui/ActionBar.xml @@ -1482,9 +1482,12 @@ does (decision 1636). --> - - - - - - - - - - - - - - - - - - - - - - - - - - - ActionButton_OnEvent() diff --git a/crates/benilla-app/assets/ui/CastingBar.xml b/crates/benilla-app/assets/ui/CastingBar.xml deleted file mode 100644 index 954627a2..00000000 --- a/crates/benilla-app/assets/ui/CastingBar.xml +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - diff --git a/crates/benilla-app/assets/ui/Fonts.xml b/crates/benilla-app/assets/ui/Fonts.xml deleted file mode 100644 index 1996af64..00000000 --- a/crates/benilla-app/assets/ui/Fonts.xml +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/benilla-app/assets/ui/HelpFrame.xml b/crates/benilla-app/assets/ui/HelpFrame.xml deleted file mode 100644 index 7bdb7415..00000000 --- a/crates/benilla-app/assets/ui/HelpFrame.xml +++ /dev/null @@ -1,1017 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HelpFrameButton_FitToText(HelpFrameHomeIssues) - HelpFrameButton_FitToText(BenillaHelpFrameHomeUnstick) - - - - - - - - - - - - - - - - - - - - - - - - - - - ScrollFrame_OnLoad() - local trough = getglobal(self:GetName() .. "ScrollBarTrough") - BenillaScrollTrough_Seat(trough, getglobal(self:GetName() .. "ScrollBar")) - trough:Show() - - - - - - - - ScrollingEdit_OnTextChanged() - ScrollingEdit_OnCursorChanged(arg1, arg2, arg3, arg4) - HideUIPanel(HelpFrame) - - - - - - - - - - - - self:RegisterEvent("UPDATE_TICKET") - self:RegisterEvent("GMSURVEY_DISPLAY") - - HelpFrameOpenTicket_OnEvent(event) - - - - - - - HelpFrame_OnLoad(self) - HelpFrame_OnShow(self) - HelpFrame_OnEvent() - - PlaySound("igCharacterInfoClose") - if UpdateMicroButtons then UpdateMicroButtons() end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if TOOLTIP_DEFAULT_COLOR then - self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b) - end - if TOOLTIP_DEFAULT_BACKGROUND_COLOR then - self:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b) - end - self:RegisterEvent("UPDATE_TICKET") - self:RegisterEvent("PLAYER_ENTERING_WORLD") - - TicketStatusFrame_OnEvent(self) - TicketStatus_OnUpdate(arg1) - - TicketStatus_OnClick() - - - diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index 34096572..7aa4871e 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -240,6 +240,39 @@ -- reference at typical resolutions reads nearer two-thirds. ERA_WINDOW_SCALE = 0.78 + -- ── UpdateNameplates (ref UIOptionsFrame.lua l.768-780, verbatim) ──────────────────── + -- Its reference home is `UIOptionsFrame.lua` and this file is our stand-in for that window + -- (0950/0992), so the function belongs here rather than beside its caller. + -- + -- **Decision 1878 recorded this as "a missing ENGINE verb, and 1203 says build it or leave + -- it loudly absent", and named it the thing blocking the UIParent keystone. It is neither.** + -- It is FrameXML — `UIOptionsFrame.lua:768`, absent from wow-re's binding-shape table — and + -- every verb it calls is already ours: `ShowNameplates`/`HideNameplates`/ + -- `ShowFriendNameplates`/`HideFriendNameplates` are the four CVar-backed bindings in + -- `script/cvars.rs`, all argc=0 arity=0, matching the reference's shapes. + -- + -- `NAMEPLATES_ON`/`FRIENDNAMEPLATES_ON` are `RegisterForSave` globals the reference drives + -- from the keybinding alone (1.12's own options UI has no nameplate row). Nil is a normal + -- state for them and the else-branches are the reference's own answer to it, so this needs + -- no seeding — which is why the whole thing is twelve lines rather than a build. + -- + -- The reference's odd second arm is kept as it stands: on FRIENDNAMEPLATES_ON it calls + -- Show and then Hide, which is a no-op in the real client too. Transcribed, not corrected; + -- fixing a reference bug here would be inventing a difference. + function UpdateNameplates() + if ( NAMEPLATES_ON ) then + ShowNameplates() + else + HideNameplates() + end + if ( FRIENDNAMEPLATES_ON ) then + ShowFriendNameplates() + HideFriendNameplates() + else + HideFriendNameplates() + end + end + function OptionsFrame_UpdateScale() -- The era panel is registered `checkFit = 1`: the panel manager also shrinks it to -- fit a small screen (UIPanelUpdateScaleForFit: min over width/height ratios diff --git a/crates/benilla-app/assets/ui/UIParent.xml b/crates/benilla-app/assets/ui/UIParent.xml index 572a53de..7d9d9705 100644 --- a/crates/benilla-app/assets/ui/UIParent.xml +++ b/crates/benilla-app/assets/ui/UIParent.xml @@ -215,6 +215,40 @@ -- statements on the same event). `MultiActionBar_Update` is existence-guarded because the -- ~25 per-window harnesses that load this file load no bars; the binding itself is engine -- level and always installed. Decision 1500. + -- ── ITEM_QUALITY_COLORS (ref UIParent.lua l.65-72) ─────────────────────────────── + -- Its reference home is THIS file. It lived in our own `Fonts.xml` until 1888 put + -- that file on the chain — the reference's `Fonts.xml` does not declare it, so the + -- table had to come back here or vanish. Every reader is below UIParent.xml in the + -- manifest (GameTooltip 169, UnitPopup 203, AuctionFrame 928; UnitPopup's is a + -- FILE-SCOPE read inside a table literal, which is the one that makes the order + -- load-bearing rather than incidental). + -- The item-quality palette — **built from the engine verb, exactly as the reference + -- builds it** (ref UIParent.lua l.65-72, verbatim shape; decision 1199): + -- + -- ITEM_QUALITY_COLORS = { } + -- for i = -1, 6 do … = GetItemQualityColor(i) end + -- + -- It used to be seven hand-typed rows here. They were CLOSE and not exact — 0.62 where + -- the client's byte is 0x9d/255 = 0.6157, 0.64/0.21/0.93 where Epic is + -- 0xa3/0x35/0xee — and they carried no `.hex`, which the reference's table has and + -- which addons splice straight into a chat link. `GetItemQualityColor` is now a real + -- engine binding over wow-5875-re RF-0055's byte-verified table, so the rounding and + -- the second source both go. + -- + -- The loop starts at -1 like the reference's, and the -1 row is not a curiosity: it is the + -- colour a loot row wears while its item template is uncached, which is the value + -- `GetLootSlotInfo` answers there. `GetItemQualityColor`'s clamp is UNSIGNED, so -1 lands + -- on Common/white with 7-and-up (decision 1805, correcting 1199's "reads before the + -- array"). + ITEM_QUALITY_COLORS = { } + for i = -1, 6 do + ITEM_QUALITY_COLORS[i] = { } + ITEM_QUALITY_COLORS[i].r, + ITEM_QUALITY_COLORS[i].g, + ITEM_QUALITY_COLORS[i].b, + ITEM_QUALITY_COLORS[i].hex = GetItemQualityColor(i) + end + -- ── UIParentLoadAddOn (ref UIParent.lua l.638-647, and now our slot for it) ────── -- It lived in our own BasicControls.xml until 1881 migrated that file to the chain; -- the reference never put it there, so the move is back to where it belongs. @@ -285,6 +319,16 @@ end end + -- ref UIParent.lua l.194-196, verbatim — the fifth squatter, and the smallest. Stock + -- `HelpFrame.xml` calls it when a GM survey is waiting (its l.1487), and its whole body is + -- `UIParentLoadAddOn("Blizzard_GMSurveyUI")` — a verb 1881 already moved here and an addon + -- that really is on the player's chain (patch-2.MPQ). So this is the reference's own + -- function, not a stand-in: 1889 needed it because the stock help window is on the chain + -- now and ours is gone. + function GMSurveyFrame_LoadUI() + UIParentLoadAddOn("Blizzard_GMSurveyUI") + end + -- ref UIParent.lua's own `ShowMacroFrame`, moved here from our MacroFrame.xml when 1848 -- retired that file — the third such squatter after `InspectUnit` (1832) and -- `ToggleTalentFrame` (1833), and by now the expected shape. diff --git a/crates/benilla-app/assets/ui/benilla.toc b/crates/benilla-app/assets/ui/benilla.toc index b7edb5fc..4a59df41 100644 --- a/crates/benilla-app/assets/ui/benilla.toc +++ b/crates/benilla-app/assets/ui/benilla.toc @@ -38,7 +38,13 @@ # The named virtual Font objects (decision 0084) — must load first so any FontString's # `inherits="GameFontNormal"` resolves against a registered object. -Fonts.xml +# ══ THE FONT REGISTRY — the reference's own, off the player's chain (1751, 1888) ══ +# All 51 `` objects, name for name, plus the colour codes, `CHAT_FONT_HEIGHTS`, +# `MATERIAL_TEXT_COLOR_TABLE`, `MATERIAL_TITLETEXT_COLOR_TABLE` and `RAID_CLASS_COLORS`. +# Ours was a transcription differing only in formatting (it inlined ``), plus one +# addition: `ITEM_QUALITY_COLORS`, whose reference home is `UIParent.lua` and which 1888 moved +# to our UIParent.xml so it survives this swap. +Interface\FrameXML\Fonts.xml # ══ THE STRINGS — the reference's own first line, seated second here (1848) ══ # **Second, not first, and that is deliberate.** Manifest entry 0 is the FONT REGISTRY: @@ -337,6 +343,19 @@ TalentWipeConfirm.xml # The shared CooldownFrame_SetTimer (the ref's Cooldown.lua file split) — before its # consumers (ActionBar's buttons, the multibars, the stance bar, BagFrame's slots). Cooldown.xml +# ══ THE ACTION-BUTTON REGIONS — the reference's own, off the player's chain (1751) ══ +# `ActionButtonTemplate`: the REGIONS-ONLY half of the reference's two-level split — icon, count, +# hotkey, name, border, flash, cooldown and normal texture. It declares NO scripts and calls +# nothing, so it needs no `.lua` beside it. The handler half is `ActionBarButtonTemplate`, which +# ActionBar.xml still declares and which inherits this; those handlers stay ours until +# `ActionButton.lua`'s 21 verbs migrate (we have 10 of them, under the reference's own names). +# +# Ours was a transcription of this exact file — the eight `$parent*` child names match to the +# letter — so the swap is a deletion. +# +# **It must come BEFORE ActionBar.xml.** A template is registered by name and the later line +# wins, so seated below it our transcription would take the name straight back. +Interface\FrameXML\ActionButtonTemplate.xml ActionBar.xml # The four OPTIONAL extra bars (bottom left/right 61-72 / 49-60, vertical right/left # 25-36 / 37-48), all shipping hidden until the player ticks their row (decision 1500): @@ -493,9 +512,16 @@ Interface\FrameXML\ColorPickerFrame.xml # WorldMapRaid1..40 with inherits=, so the virtual Frames have to be registered before it. WorldMapFrameTemplates.xml WorldMapFrame.xml -# The cast bar (decision 0137 phase 1) — the extracted 1.12 CastingBarFrame, driven by -# the SPELLCAST_* events `crate::ui_cast` fires. Only needs Fonts before it. -CastingBar.xml +# ══ THE CAST BAR — the reference's own, off the player's chain (1751) ══ +# `CastingBarFrame` + its Border/Flash/Spark/Text children, driven by the SPELLCAST_* events +# `crate::ui_cast` fires (decision 0137 phase 1). Our `CastingBar.xml` was a transcription of this +# very file under a different name — all five frame names identical — so the swap is a deletion. +# +# The file SOURCES ITS OWN LUA (`