From edd66283298ca700bf7a9adf1b2b743e79a237aa Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 4 Sep 2026 20:59:04 +0700 Subject: [PATCH] the tooltip and five windows go stock, and the battleground keeps score MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the tooltip is the reference's own file: `GameTooltip.xml` loads off the chain, ours is deleted, and every verb it calls was already bound, so this is a plain swap; retired with it: the `$parentThicken` plate fill that thickened the plate from the art's ~73% to ~84% opacity — the reference's plate is the raw `UI-Tooltip-Background` tint, and that is what ships; the one engine fact the transcription had been hiding: the reference's instance declares no size, and a frame with one anchor and no size resolves to NO rect under the reference's own layout law — our declared size had been a harness crutch (1968); and the dressing room goes stock with `` as a widget kind (factory `0x495c00`): a `PlayerModel` plus its own `Undress`/`Dress`/`TryOn`, where `Undress` strips the body and not the hands, and Close is read off the window since the stock OnHide queues nothing (1969) - the mail window and the auction house are the reference's own: `MailFrame.xml` loads off the chain and brings the stationery picker, invoice pane and autocomplete ours had left out; the stationery family is built off wow-re's carve over a list computed off `Stationery.dbc` rows × the player's bags (`0x622270`, not the bank); the selection rides `CMSG_SEND_MAIL` field 6 and a send with none silently aborts; its two events fire where the client fires them (1970); `Blizzard_AuctionUI` loads on demand from the `AUCTION_HOUSE_SHOW` arm, and three root fixes its Lua surfaced: `GetAuctionItemClasses()` is static — read at the addon's load, before any session, so the class tree is a login-scoped push; `SetAuctionCompareItem` (`0x535d70`) on the vendor compare's one body; `NEW_AUCTION_UPDATE` resets the create form; its dressing-room pane shares the app's one room (1971) - the battleground keeps score: `WorldStateFrame.xml` loads off the chain and ours is deleted; the stock file is three things where ours was one: the readout, the capture bars, and the battleground scoreboard this client never had, built off wow-re's round — `MSG_PVP_LOG_DATA` both ways (throttled to 5000 ms client-side, `0x4aa170`) and `CMSG_LEAVE_BATTLEFIELD`; eleven score verbs over a board the app pushes, where the filter is a SORT, not a compaction — team first, killing blows descending, deaths ascending, honor descending, name — so the filtered count shrinks while `GetBattlefieldScore` still reaches every wire row; `HIDE_OUTDOOR_WORLD_STATE` joins the options uvar block, a capture point is a bar, and the scoreboard and battlefield-minimap toggles become bound specs at the install's own `SHIFT-SPACE`/`SHIFT-M` (1972) - the trade skill and craft windows go stock as `Blizzard_TradeSkillUI`/`Blizzard_CraftUI` on demand, from the reference's own UIParent arms; our two transcriptions are deleted; the four item-link verbs are built off wow-re's carve on the client's link builder (`0x52adb0`) — zero values on any miss, `GetTradeSkillReagentItemLink` raising Blizzard's own typo'd Usage, kept, and `GetCraftItemLink` the `|Henchant:` link in fixed white; `SetTextColor`'s channels coerce nil to 0 on FontString, Font and Button where ours had raised (1973); and the Inspect, Talent, Macro and Raid addons load on demand — `benilla.toc` lists no `Interface\AddOns` row, and below level 10 the talent addon is never even loaded; the gates walk every reached addon and found `Blizzard_GMSurveyUI`'s four engine verbs nothing answers, reachable only through `GMSURVEY_DISPLAY`, which nothing fires (1889; 1967) Co-Authored-By: Claude Fable 5.1 --- crates/benilla-app/assets/ui/AuctionFrame.xml | 2380 ----------------- crates/benilla-app/assets/ui/CraftFrame.xml | 977 ------- crates/benilla-app/assets/ui/DressUpFrame.xml | 318 --- crates/benilla-app/assets/ui/GameTooltip.xml | 567 ---- crates/benilla-app/assets/ui/MailFrame.xml | 1547 ----------- crates/benilla-app/assets/ui/MicroMenu.xml | 8 +- crates/benilla-app/assets/ui/OptionsFrame.xml | 12 + .../benilla-app/assets/ui/TradeSkillFrame.xml | 1330 --------- crates/benilla-app/assets/ui/UIParent.xml | 161 +- crates/benilla-app/assets/ui/UiPanels.xml | 13 +- .../benilla-app/assets/ui/WorldStateFrame.xml | 280 -- crates/benilla-app/assets/ui/benilla.toc | 187 +- crates/benilla-app/src/bindings/commands.rs | 28 +- crates/benilla-app/src/lib.rs | 3 + crates/benilla-app/src/net.rs | 8 + crates/benilla-app/src/net/apply.rs | 3 + crates/benilla-app/src/net/apply/mail.rs | 58 +- crates/benilla-app/src/net/io.rs | 13 +- crates/benilla-app/src/perf/hud.rs | 29 +- crates/benilla-app/src/portrait/dressup.rs | 2 +- crates/benilla-app/src/portrait/mod.rs | 12 +- crates/benilla-app/src/ui_auction/mod.rs | 27 +- .../benilla-app/src/ui_battlefield_score.rs | 238 ++ crates/benilla-app/src/ui_chat/tests.rs | 2 +- crates/benilla-app/src/ui_craft.rs | 9 + crates/benilla-app/src/ui_dialog_verbs.rs | 47 +- crates/benilla-app/src/ui_dressup.rs | 100 +- crates/benilla-app/src/ui_mail/mod.rs | 135 +- .../src/ui_script/action_bar_tests.rs | 12 +- crates/benilla-app/src/ui_script/addons.rs | 40 +- crates/benilla-app/src/ui_script/bag_tests.rs | 4 + .../src/ui_script/bottom_hud_tests.rs | 2 +- .../benilla-app/src/ui_script/buff_tests.rs | 2 +- .../benilla-app/src/ui_script/cast_tests.rs | 2 +- .../src/ui_script/character_tests.rs | 6 +- .../src/ui_script/chat_options_tests.rs | 2 +- .../src/ui_script/chat_resize_tests.rs | 2 +- .../benilla-app/src/ui_script/chat_tests.rs | 4 +- .../src/ui_script/color_picker_tests.rs | 2 +- .../src/ui_script/combo_frame_tests.rs | 2 +- .../src/ui_script/delete_item_tests.rs | 2 +- .../src/ui_script/dressup_tests.rs | 36 +- .../src/ui_script/dropdown_tests.rs | 2 +- .../src/ui_script/durability_tests.rs | 4 +- .../benilla-app/src/ui_script/errors_tests.rs | 2 +- .../benilla-app/src/ui_script/escape_tests.rs | 2 +- .../src/ui_script/exp_bar_tests.rs | 6 +- .../src/ui_script/frame_flag_gate.rs | 39 +- .../src/ui_script/friends_tests.rs | 6 +- .../src/ui_script/game_menu_tests.rs | 8 +- .../src/ui_script/group_loot_tests.rs | 6 +- .../benilla-app/src/ui_script/guild_tests.rs | 6 +- .../src/ui_script/help_frame_tests.rs | 2 +- .../src/ui_script/honor_frame_tests.rs | 10 +- .../src/ui_script/inspect_tests.rs | 40 +- .../src/ui_script/instance_tests.rs | 8 +- .../src/ui_script/keybindings_tests.rs | 2 +- .../benilla-app/src/ui_script/loot_tests.rs | 2 +- .../benilla-app/src/ui_script/macro_tests.rs | 8 +- crates/benilla-app/src/ui_script/manifest.rs | 25 - .../src/ui_script/merchant_tests.rs | 6 +- .../src/ui_script/micro_menu_tests.rs | 9 +- .../src/ui_script/minimap_tests.rs | 10 +- .../src/ui_script/multibar_stance_tests.rs | 4 +- .../src/ui_script/options_tests.rs | 12 +- .../src/ui_script/panel_template_tests.rs | 2 +- .../benilla-app/src/ui_script/panel_tests.rs | 2 +- .../src/ui_script/perf_bar_tests.rs | 6 +- .../src/ui_script/pet_bar_tests.rs | 2 +- .../src/ui_script/pet_frame_tests.rs | 2 +- .../src/ui_script/petition_tests.rs | 2 +- .../benilla-app/src/ui_script/quest_tests.rs | 22 +- .../src/ui_script/questlog_tests.rs | 38 +- .../benilla-app/src/ui_script/raid_tests.rs | 6 +- .../benilla-app/src/ui_script/reference_ui.rs | 212 +- .../src/ui_script/shipped_xml_tests.rs | 30 +- .../src/ui_script/spellbook_tests.rs | 12 +- .../src/ui_script/target_aura_tests.rs | 2 +- .../benilla-app/src/ui_script/taxi_tests.rs | 2 +- crates/benilla-app/src/ui_script/test_ui.rs | 28 +- .../src/ui_script/tooltip_anchor_tests.rs | 11 +- .../src/ui_script/tooltip_template_tests.rs | 13 +- .../src/ui_script/tot_frame_tests.rs | 2 +- .../src/ui_script/trainer_tests.rs | 2 +- .../src/ui_script/unit_frame_tests.rs | 7 +- .../src/ui_script/unit_popup_tests.rs | 4 +- .../src/ui_script/world_map_tests.rs | 2 +- .../src/ui_script/world_state_tests.rs | 49 +- crates/benilla-app/src/ui_tradeskill.rs | 8 + crates/benilla-app/tests/auction_frame.rs | 72 +- crates/benilla-app/tests/character_stats.rs | 2 +- crates/benilla-app/tests/mail_frame.rs | 19 +- crates/benilla-app/tests/talent_frame.rs | 2 +- crates/benilla-app/tests/trade_frame.rs | 2 +- crates/benilla-app/tests/tradeskill_frame.rs | 140 +- crates/benilla-formats/src/lib.rs | 4 +- crates/benilla-formats/src/stationery.rs | 60 +- crates/benilla-protocol/src/events.rs | 3 + crates/benilla-protocol/src/events/decode.rs | 1 + .../src/messages/battlefield.rs | 149 +- crates/benilla-protocol/src/messages/mod.rs | 4 +- .../benilla-protocol/src/messages/opcode.rs | 10 + .../benilla-protocol/src/messages/packet.rs | 3 + crates/benilla-protocol/src/messages/parse.rs | 3 + .../src/world/writer/battlefield.rs | 15 + crates/benilla-ui/src/script/auction.rs | 35 +- .../src/script/battlefield_score.rs | 503 ++++ crates/benilla-ui/src/script/button.rs | 24 +- crates/benilla-ui/src/script/craft.rs | 109 + crates/benilla-ui/src/script/dressup.rs | 266 +- crates/benilla-ui/src/script/font.rs | 9 +- crates/benilla-ui/src/script/font_block.rs | 13 +- crates/benilla-ui/src/script/item_stats.rs | 26 + crates/benilla-ui/src/script/mail.rs | 259 ++ crates/benilla-ui/src/script/mod.rs | 18 +- crates/benilla-ui/src/script/model.rs | 33 +- crates/benilla-ui/src/script/modelframe.rs | 11 +- crates/benilla-ui/src/script/object.rs | 9 + .../src/script/object/frame_state.rs | 7 +- .../src/script/tests/reference_surface.rs | 13 +- .../benilla-ui/src/script/tooltip_item/mod.rs | 196 +- crates/benilla-ui/src/script/tooltip_spell.rs | 2 +- .../benilla-ui/src/script/tradeskill/api.rs | 69 + .../benilla-ui/src/script/tradeskill/tests.rs | 79 + crates/benilla-ui/src/widget/kinds/mod.rs | 11 + crates/benilla-ui/src/widget/mod.rs | 2 +- 126 files changed, 3324 insertions(+), 8156 deletions(-) delete mode 100644 crates/benilla-app/assets/ui/AuctionFrame.xml delete mode 100644 crates/benilla-app/assets/ui/CraftFrame.xml delete mode 100644 crates/benilla-app/assets/ui/DressUpFrame.xml delete mode 100644 crates/benilla-app/assets/ui/GameTooltip.xml delete mode 100644 crates/benilla-app/assets/ui/MailFrame.xml delete mode 100644 crates/benilla-app/assets/ui/TradeSkillFrame.xml delete mode 100644 crates/benilla-app/assets/ui/WorldStateFrame.xml create mode 100644 crates/benilla-app/src/ui_battlefield_score.rs create mode 100644 crates/benilla-ui/src/script/battlefield_score.rs diff --git a/crates/benilla-app/assets/ui/AuctionFrame.xml b/crates/benilla-app/assets/ui/AuctionFrame.xml deleted file mode 100644 index bc1b15c9..00000000 --- a/crates/benilla-app/assets/ui/AuctionFrame.xml +++ /dev/null @@ -1,2380 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if ( not this.tooltip or this.tooltip == "" ) then return end - GameTooltip:SetOwner(this, "ANCHOR_RIGHT") - GameTooltip:SetText(this.tooltip) - - GameTooltip:Hide() - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("AUCTION") - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("AUCTION") - -- The buyout line is gold where the bid above it is white (ref-tmpl l.392). - SetMoneyFrameColor(this:GetName(), - NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b) - - - - - - - - - - - - - - - - - - - - - - - - - local index = this:GetID() + FauxScrollFrame_GetOffset(BrowseScrollFrame) - if ( not AuctionRow_ModifierClick("list", index) ) then BrowseButton_OnClick(this) end - - - - - - - - - - - - - - - - - - - - - - - - - if ( not this.tooltip or this.tooltip == "" ) then return end - GameTooltip:SetOwner(this, "ANCHOR_RIGHT") - GameTooltip:SetText(this.tooltip) - - GameTooltip:Hide() - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("AUCTION") - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("AUCTION") - - - - - - local index = this:GetID() + FauxScrollFrame_GetOffset(BidScrollFrame) - if ( not AuctionRow_ModifierClick("bidder", index) ) then BidButton_OnClick(this) end - - - - - - - - - - - - - - - - - - - - - - - - - if ( not this.tooltip or this.tooltip == "" ) then return end - GameTooltip:SetOwner(this, "ANCHOR_RIGHT") - GameTooltip:SetText(this.tooltip) - - GameTooltip:Hide() - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("AUCTION") - - - - - - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("AUCTION") - - - - - - local index = this:GetID() + FauxScrollFrame_GetOffset(AuctionsScrollFrame) - if ( not AuctionRow_ModifierClick("owner", index) ) then AuctionsButton_OnClick(this) end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FauxScrollFrame_OnVerticalScroll(BENILLA_FILTER_ROW_HEIGHT, AuctionFrameFilters_Update) - - - - - - - - - - - - - - - - - - - - - - - FauxScrollFrame_OnVerticalScroll(BENILLA_AUCTION_ROW_HEIGHT, AuctionFrameBrowse_Update) - - - - - - - - - - - - - - - BrowseMinLevel:SetFocus() - AuctionFrameBrowse_Search(); this:ClearFocus() - - - - - - - - - - - - - - - - BrowseMaxLevel:SetFocus() - this:ClearFocus() - - - - - - - - BrowseBidPriceGold:SetFocus() - this:ClearFocus() - - - - - - - - - - - - - - BrowseDropDown_OnLoad() - BrowseDropDown_OnLoad() - - - - - - - - - - - - AuctionFrameBrowse_OnLoad(self) - AuctionFrameBrowse_OnShow() - AuctionFrameBrowse_OnEvent() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FauxScrollFrame_OnVerticalScroll(BENILLA_AUCTION_ROW_HEIGHT, AuctionFrameBid_Update) - - - - - - - - - - - - - - AuctionFrameBid_OnLoad(self) - AuctionFrameBid_OnShow() - AuctionFrameBid_OnEvent() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FauxScrollFrame_OnVerticalScroll(BENILLA_AUCTION_ROW_HEIGHT, AuctionFrameAuctions_Update) - - - - - - - - - - - - - - AuctionsRadioButton_SetLabel(this, 2) - AuctionsRadioButton_OnClick(1) - - - - - - AuctionsRadioButton_SetLabel(this, 8) - AuctionsRadioButton_OnClick(2) - - - - - - AuctionsRadioButton_SetLabel(this, 24) - AuctionsRadioButton_OnClick(3) - - - - - - - - - - SmallMoneyFrame_OnLoad() - MoneyFrame_SetType("AUCTION_DEPOSIT") - - - - - - - - AuctionFrameAuctions_OnLoad(self) - AuctionFrameAuctions_OnShow() - AuctionFrameAuctions_OnEvent() - - - - - AuctionFrame_OnLoad(self) - AuctionFrame_OnShow() - AuctionFrame_OnHide() - AuctionFrame_OnEvent(self) - AuctionFrame_OnMouseWheel(arg1) - - - diff --git a/crates/benilla-app/assets/ui/CraftFrame.xml b/crates/benilla-app/assets/ui/CraftFrame.xml deleted file mode 100644 index 6acee44a..00000000 --- a/crates/benilla-app/assets/ui/CraftFrame.xml +++ /dev/null @@ -1,977 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaCraftList_OnVerticalScroll() - - - - - - - - - - - - - - - - - - - - - - - BenillaCraftFrame_OnLoad(self) - BenillaCraftFrame_OnEvent(self) - BenillaCraftFrame_OnMouseWheel(arg1) - PlaySound("igCharacterInfoOpen") - CloseCraft(); PlaySound("igCharacterInfoClose") - - - diff --git a/crates/benilla-app/assets/ui/DressUpFrame.xml b/crates/benilla-app/assets/ui/DressUpFrame.xml deleted file mode 100644 index a6a17b4a..00000000 --- a/crates/benilla-app/assets/ui/DressUpFrame.xml +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaDressUpModel_OnLoad(self) - BenillaSetBoothTexture(getglobal(self:GetName() .. "Texture"), "dressup") - - BenillaDressUpModel_OnUpdate(self, arg1) - - - - - SetDressUpBackground() - - SetDressUpBackground() - SetPortraitTexture(DressUpFramePortrait, "player") - PlaySound("igCharacterInfoOpen") - - - - BenillaDressUpModel_Close() - PlaySound("igCharacterInfoClose") - - - - diff --git a/crates/benilla-app/assets/ui/GameTooltip.xml b/crates/benilla-app/assets/ui/GameTooltip.xml deleted file mode 100644 index 0675bac3..00000000 --- a/crates/benilla-app/assets/ui/GameTooltip.xml +++ /dev/null @@ -1,567 +0,0 @@ - - - - - - - - - - - - - - diff --git a/crates/benilla-app/assets/ui/MailFrame.xml b/crates/benilla-app/assets/ui/MailFrame.xml deleted file mode 100644 index d328d6ee..00000000 --- a/crates/benilla-app/assets/ui/MailFrame.xml +++ /dev/null @@ -1,1547 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SendMailBodyEditBox:SetFocus() - if ( CursorHasItem() ) then SendMailPackageButton_OnClick() end - - this:ClearFocus() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SendMailSubjectEditBox:SetFocus() - this:HighlightText(0, 0) - SendMailSubjectEditBox:SetFocus() - SendMailNameEditBox:ClearFocus() - SendMailFrame_CanSend() - - - - - - - - - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("STATIC"); - MoneyFrame_Update("SendMailCostMoneyFrame", GetSendMailPrice()); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SendMailBodyEditBox:SetFocus() - SendMailBodyEditBox:SetFocus() - SendMailSubjectEditBox:ClearFocus() - SendMailFrame_CanSend() - - - - - - - - - - - - - - - - - - SendMailErrorText:SetPoint("BOTTOMLEFT", "SendMailMoneyText", "TOPLEFT", 0, 2) - - - - StationeryBackgroundLeft:SetTexture(STATIONERY_PATH.."STATIONERYTEST1") - StationeryBackgroundRight:SetTexture(STATIONERY_PATH.."STATIONERYTEST2") - SendMailNameEditBox:SetFocus() - SendMailRadioButton_OnClick(1) - - - if ( CursorHasItem() ) then SendMailPackageButton_OnClick() end - - - - - - - - - - - - BenillaMailFrame_OnLoad(self) - MailFrame_OnEvent() - - OpenBackpack(); PlaySound("igCharacterInfoOpen") - - CloseMail() - CloseBackpack() - HideUIPanel(OpenMailFrame) - SendMailBodyEditBox:SetText("") - SendMailNameEditBox:SetText("") - SendMailSubjectEditBox:SetText("") - PlaySound("igCharacterInfoClose") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SmallMoneyFrame_OnLoad() MoneyFrame_SetType("AUCTION") - - - - SmallMoneyFrame_OnLoad() MoneyFrame_SetType("AUCTION") - - - - - - - - - SmallMoneyFrame_OnLoad() MoneyFrame_SetType("AUCTION") - - - - - - - - - SmallMoneyFrame_OnLoad() MoneyFrame_SetType("AUCTION") - - - - - - - - - - - - - - - - - - - - local centre = GetCenterFrame() - if centre then - HideUIPanel(centre) - end - - OpenMailFrame_OnHide() - - - diff --git a/crates/benilla-app/assets/ui/MicroMenu.xml b/crates/benilla-app/assets/ui/MicroMenu.xml index 9ecd108f..4e99df63 100644 --- a/crates/benilla-app/assets/ui/MicroMenu.xml +++ b/crates/benilla-app/assets/ui/MicroMenu.xml @@ -185,12 +185,12 @@ return button.label end - -- ref MainMenuBarMicroButton's OnEnter (l.13), verbatim bar the owner shift: - -- BenillaTooltip_AddNewbieTipFor(this.tooltipText, 1.0, 1.0, 1.0, this.newbieText) + -- ref MainMenuBarMicroButton's OnEnter (l.13), verbatim — the reference's helper reads + -- the firing frame off `this`, which is `button` here (the XML hands it `self`): + -- GameTooltip_AddNewbieTip(this.tooltipText, 1.0, 1.0, 1.0, this.newbieText); function BenillaMicroButton_OnEnter(button) if not GameTooltip_AddNewbieTip then return end -- engine tests load file subsets - BenillaTooltip_AddNewbieTipFor(button, BenillaMicroButton_TooltipText(button), 1.0, 1.0, 1.0, - button.newbieText) + GameTooltip_AddNewbieTip(BenillaMicroButton_TooltipText(button), 1.0, 1.0, 1.0, button.newbieText) end -- Is a panel up? `getglobal` because every panel this asks about loads AFTER this file — diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index a7d03169..6df5aa3e 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -216,6 +216,18 @@ -- load — compares against the string, so on a fresh 1.12 install the row paints unchecked -- and the auto-watch is dead until the box is clicked; the string ships the advertised -- default as the real one. A recorded deviation (1804's rule), not a quiet one. + -- "Show Detailed Tooltips" — ref UIOptionsFrame.lua l.100-101, inside UIOptionsFrame_Init. + -- A FrameXML uvar, not a CVar, and 1.12 ships it ON: the explanatory second line IS the + -- default reference tooltip, not an opt-in (0661). It lived in our GameTooltip.xml until + -- the tooltip went stock (1968); the reference keeps it here, with the Interface page. + SHOW_NEWBIE_TIPS = "1" + RegisterForSave("SHOW_NEWBIE_TIPS") + -- "Hide World PvP Objectives" — ref UIOptionsFrame.lua's `HIDE_OUTDOOR_WORLD_STATE = "0"`, + -- the gate the stock WorldStateAlwaysUpFrame_Update opens the outdoor readout on + -- (`== "0" or instanceType == "pvp"`). Here since that frame went stock (1972); a nil + -- reads as hidden, which is how the tower counters would vanish outdoors. + HIDE_OUTDOOR_WORLD_STATE = "0" + RegisterForSave("HIDE_OUTDOOR_WORLD_STATE") QUEST_FADING_DISABLE = "0" RegisterForSave("QUEST_FADING_DISABLE") AUTO_QUEST_WATCH = "1" diff --git a/crates/benilla-app/assets/ui/TradeSkillFrame.xml b/crates/benilla-app/assets/ui/TradeSkillFrame.xml deleted file mode 100644 index 4088a4f3..00000000 --- a/crates/benilla-app/assets/ui/TradeSkillFrame.xml +++ /dev/null @@ -1,1330 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaTradeSkillInvSlotDropDown_OnLoad() - BenillaTradeSkillInvSlotDropDown_OnShow() - - - - - - BenillaTradeSkillSubClassDropDown_OnLoad() - BenillaTradeSkillSubClassDropDown_OnShow() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaTradeSkillList_OnVerticalScroll() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - self:ClearFocus() - self:ClearFocus() - - if self:GetText() == "0" then - self:SetText("1") - end - - self:HighlightText(0, 0) - self:HighlightText() - - - - - - - - BenillaTradeSkillFrame_OnLoad(self) - BenillaTradeSkillFrame_OnEvent(self) - BenillaTradeSkillFrame_OnMouseWheel(arg1) - PlaySound("igCharacterInfoOpen") - CloseTradeSkill(); PlaySound("igCharacterInfoClose") - - - diff --git a/crates/benilla-app/assets/ui/UIParent.xml b/crates/benilla-app/assets/ui/UIParent.xml index 7038f3b6..919b37b7 100644 --- a/crates/benilla-app/assets/ui/UIParent.xml +++ b/crates/benilla-app/assets/ui/UIParent.xml @@ -35,6 +35,12 @@ this:RegisterEvent("VARIABLES_LOADED") this:RegisterEvent("TRAINER_SHOW") this:RegisterEvent("TRAINER_CLOSED") + this:RegisterEvent("AUCTION_HOUSE_SHOW") + this:RegisterEvent("AUCTION_HOUSE_CLOSED") + this:RegisterEvent("TRADE_SKILL_SHOW") + this:RegisterEvent("TRADE_SKILL_CLOSE") + this:RegisterEvent("CRAFT_SHOW") + this:RegisterEvent("CRAFT_CLOSE") this:RegisterEvent("GUILD_INVITE_REQUEST") this:RegisterEvent("GUILD_INVITE_CANCEL") this:RegisterEvent("MIRROR_TIMER_START") @@ -335,17 +341,22 @@ return loaded end - -- ref UIParent.lua:223, whose slot this is — immediately above `UIParent_OnEvent`, the - -- same neighbour it has there. It moved here from our own InspectFrame.xml when 1832 - -- retired that file: the name belongs to UIParent in the reference, and the window it - -- opens is now the stock LoadOnDemand `Blizzard_InspectUI` off the player's chain. - -- - -- The reference's body is `InspectFrame_LoadUI()` and then a guarded `InspectFrame_Show`. - -- We have no load-on-demand — benilla.toc loads that addon with everything else — so the - -- LoadUI call has nothing to do and is left out rather than stubbed (1203). The guard is - -- kept exactly as the reference writes it, and it is not decoration: it is what makes this - -- safe in the ~25 per-window harnesses that load UIParent.xml without the inspect window. + -- ref UIParent.lua l.170-172 and l.223-228, verbatim — the inspect window's loader and its + -- opener, immediately above `UIParent_OnEvent` as there. They moved here from our own + -- InspectFrame.xml when 1832 retired that file: the names belong to UIParent in the + -- reference. The window is the stock `Blizzard_InspectUI`, a LoadOnDemand registry row + -- off the player's chain (`ui_script::addons`, 1957) that `InspectFrame_LoadUI` loads on + -- the first call — the reference's own timing since 1967; from 1832 until then benilla.toc + -- listed the addon with everything else and the call was left out rather than stubbed + -- (1203). The guard is the reference's own, and it is not decoration: a harness that loads + -- UIParent.xml with no addon seated gets the reference's "failed to load" message from + -- `UIParentLoadAddOn` above and then, through this guard, nothing else. + function InspectFrame_LoadUI() + UIParentLoadAddOn("Blizzard_InspectUI"); + end + function InspectUnit(unit) + InspectFrame_LoadUI(); if ( InspectFrame_Show ) then InspectFrame_Show(unit); end @@ -357,14 +368,19 @@ -- addon, so deleting our window file would have taken the name with it. -- -- The LEVEL GATE is the reference's, and it is real behaviour rather than a guard: below - -- level 10 the key and the micro button do nothing at all. `TalentFrame_LoadUI` is left - -- out (we load the addon eagerly, 1203 — build it or leave it out, never stub it); the - -- `TalentFrame_Toggle` guard is kept verbatim, and it is what lets the ~25 harnesses that - -- load UIParent.xml without the talent window do so safely. + -- level 10 the key and the micro button do nothing at all — the addon is not even loaded. + -- `TalentFrame_LoadUI` (ref l.185-187) loads the LoadOnDemand row the first time (1967; + -- until then benilla.toc listed the addon and the call was left out, 1203). The + -- `TalentFrame_Toggle` guard is verbatim too. + function TalentFrame_LoadUI() + UIParentLoadAddOn("Blizzard_TalentUI"); + end + function ToggleTalentFrame() if ( UnitLevel("player") < 10 ) then return; end + TalentFrame_LoadUI(); if ( TalentFrame_Toggle ) then TalentFrame_Toggle(); end @@ -387,14 +403,80 @@ UIParentLoadAddOn("Blizzard_TrainerUI") end + -- ref UIParent.lua l.154-156, verbatim — the auction house's loader, reached from the + -- AUCTION_HOUSE_SHOW arm below; `Blizzard_AuctionUI` is a registry row off the chain (1971). + function AuctionFrame_LoadUI() + UIParentLoadAddOn("Blizzard_AuctionUI"); + end + + -- ref UIParent.lua l.158-160 and l.216-221, verbatim — the battlefield minimap's loader + -- and its toggle (the TOGGLEBATTLEFIELDMINIMAP binding); the stock WorldStateFrame.lua + -- calls the loader when a battleground's world states arrive (1972). The addon is a + -- registry row off the chain like the others; its pane is a ``-kind widget this + -- engine draws nothing into yet. + function BattlefieldMinimap_LoadUI() + UIParentLoadAddOn("Blizzard_BattlefieldMinimap"); + end + + function ToggleBattlefieldMinimap() + BattlefieldMinimap_LoadUI(); + if ( BattlefieldMinimap_Toggle ) then + BattlefieldMinimap_Toggle(); + end + end + + -- ref UIParent.lua l.166-168 and l.190-192, verbatim — the crafting windows' loaders, + -- reached from the TRADE_SKILL_SHOW / CRAFT_SHOW arms below; `Blizzard_TradeSkillUI` and + -- `Blizzard_CraftUI` are registry rows off the chain (1973). + function CraftFrame_LoadUI() + UIParentLoadAddOn("Blizzard_CraftUI"); + end + + function TradeSkillFrame_LoadUI() + UIParentLoadAddOn("Blizzard_TradeSkillUI"); + end + + -- ref UIParent.lua's own `BuildColoredListString`, verbatim — the "Requires: X, Y" line + -- both crafting addons build their tool/reagent lists with (a missing tool in red). It + -- lived as a guarded global in our TradeSkillFrame.xml until 1973 retired that file. + function BuildColoredListString(...) + if ( arg.n == 0 ) then + return nil; + end + + -- Takes input where odd items are the text and even items determine whether the arg should be colored or not + local string; + if ( arg[2] ) then + string = arg[1]; + else + string = RED_FONT_COLOR_CODE.. arg[1]..FONT_COLOR_CODE_CLOSE; + end + for i=3, arg.n, 2 do + if ( arg[i+1] ) then + -- If meets the condition + string = string..", "..arg[i]; + else + -- If doesn't meet the condition + string = string..", "..RED_FONT_COLOR_CODE..arg[i]..FONT_COLOR_CODE_CLOSE; + end + end + + return string; + 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. -- - -- `MacroFrame_LoadUI` is left out: the addon loads eagerly from benilla.toc, so there is - -- nothing for it to do, and 1203 says leave it out rather than stub it. The + -- `MacroFrame_LoadUI` (ref l.176-178) loads the LoadOnDemand row the first time (1967; + -- until then benilla.toc listed the addon and the call was left out, 1203). The -- `MacroFrame_Show` guard is the reference's own. + function MacroFrame_LoadUI() + UIParentLoadAddOn("Blizzard_MacroUI"); + end + function ShowMacroFrame() + MacroFrame_LoadUI(); if ( MacroFrame_Show ) then MacroFrame_Show(); end @@ -408,8 +490,9 @@ -- `RAID_ROSTER_UPDATE` and again at `PLAYER_LOGIN` with a raid up (l.34, l.39), so its -- absence is a raise every time the roster moves. It is a FrameXML function, not an engine -- verb, and this file is our stand-in for `UIParent.lua` — the same relationship the three - -- above have. `UIParentLoadAddOn` is just above, and it no-ops on an addon that is - -- already loaded, which ours is: benilla.toc takes `Blizzard_RaidUI` eagerly (1874). + -- above have. `UIParentLoadAddOn` is just above; the addon is a LoadOnDemand registry + -- row (1957) that this loads on the first roster update — the reference's timing since + -- 1967 (1874 had listed it in benilla.toc, so this was a no-op on a loaded addon). function RaidFrame_LoadUI() UIParentLoadAddOn("Blizzard_RaidUI"); end @@ -448,6 +531,48 @@ end return end + -- The auction arms (ref UIParent.lua l.575-587), verbatim — the addon loads on the first + -- auctioneer and its own `AuctionFrame_Show` reads the hello the app applied (1971). + if ( event == "AUCTION_HOUSE_SHOW" ) then + AuctionFrame_LoadUI(); + if ( AuctionFrame_Show ) then + AuctionFrame_Show(); + end + return; + end + if ( event == "AUCTION_HOUSE_CLOSED" ) then + if ( AuctionFrame_Hide ) then + AuctionFrame_Hide(); + end + return; + end + -- The trade skill and craft arms (ref UIParent.lua l.605-632), verbatim (1973). + if ( event == "TRADE_SKILL_SHOW" ) then + TradeSkillFrame_LoadUI(); + if ( TradeSkillFrame_Show ) then + TradeSkillFrame_Show(); + end + return; + end + if ( event == "TRADE_SKILL_CLOSE" ) then + if ( TradeSkillFrame_Hide ) then + TradeSkillFrame_Hide(); + end + return; + end + if ( event == "CRAFT_SHOW" ) then + CraftFrame_LoadUI(); + if ( CraftFrame_Show ) then + CraftFrame_Show(); + end + return; + end + if ( event == "CRAFT_CLOSE" ) then + if ( CraftFrame_Hide ) then + CraftFrame_Hide(); + end + return; + end -- The guild invitation (ref UIParent.lua l.296-303, verbatim): the dialog rode a driver -- frame in our FriendsFrame.xml until that file became the reference's (1959). if ( event == "GUILD_INVITE_REQUEST" ) then diff --git a/crates/benilla-app/assets/ui/UiPanels.xml b/crates/benilla-app/assets/ui/UiPanels.xml index f997b870..b1a242b6 100644 --- a/crates/benilla-app/assets/ui/UiPanels.xml +++ b/crates/benilla-app/assets/ui/UiPanels.xml @@ -144,16 +144,9 @@ -- Blizzard_MacroUI.lua:7). whileDead is the ref's and it earns its keep: writing a macro -- during a corpse run is a real thing people do. UIPanelWindows["MacroFrame"] = { area = "left", pushable = 5, whileDead = 1 } - -- The crafting window (decision 0437 phase 2, TradeSkillFrame.xml): NOT an NPC session (it - -- opens off your own cast, TradeSkillFrame.xml's own header comment) — the ref Lua's own - -- registration line (Blizzard_TradeSkillUI.lua:13) is `{ area = "left", pushable = 3 }`, - -- quoted verbatim. - UIPanelWindows["BenillaTradeSkillFrame"] = { area = "left", pushable = 3 } - -- The Enchanting window (decision 0437 phase 3, CraftFrame.xml): the ref Lua's own - -- registration line (`Blizzard_CraftUI.lua:24`), quoted verbatim — `pushable = 4`, NOT `3` - -- (grepped both ref files directly to confirm: `3` is TradeSkillFrame's own line-13 value, - -- a different window/depth — CraftFrame.xml's own header comment has the same note). - UIPanelWindows["BenillaCraftFrame"] = { area = "left", pushable = 4 } + -- The trade skill and craft windows register THEMSELVES: `Blizzard_TradeSkillUI.lua:13` + -- and `Blizzard_CraftUI.lua:24` write their own `UIPanelWindows` rows when the addon loads, + -- which since 1973 is the reference's own file on the first TRADE_SKILL_SHOW / CRAFT_SHOW. -- The game menu (decision 0674, GameMenuFrame.xml) — the ref's own registration line -- verbatim (`UIPanelWindows["GameMenuFrame"] = { area = "center", pushable = 0, -- whileDead = 1 }`, UIParent.lua l.15), and the FIRST **center**-area row benilla ships. diff --git a/crates/benilla-app/assets/ui/WorldStateFrame.xml b/crates/benilla-app/assets/ui/WorldStateFrame.xml deleted file mode 100644 index 7a9f5f85..00000000 --- a/crates/benilla-app/assets/ui/WorldStateFrame.xml +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if ( this.tooltip and this.tooltip ~= "" ) then - GameTooltip:SetOwner(this, "ANCHOR_BOTTOMLEFT"); - GameTooltip:SetText(this.tooltip); - GameTooltip:Show(); - end - - - GameTooltip:Hide(); - - - - - - - - - - - - - - - -- UPDATE_WORLD_STATES is the reference's own event for this list (0x20e). The - -- entering-world fire is what paints the readout on a login that lands inside a - -- scope the server has already sent states for. - this:RegisterEvent("UPDATE_WORLD_STATES"); - this:RegisterEvent("PLAYER_ENTERING_WORLD"); - - - WorldStateAlwaysUpFrame_OnEvent(); - - - - diff --git a/crates/benilla-app/assets/ui/benilla.toc b/crates/benilla-app/assets/ui/benilla.toc index f25f1b72..c03712b2 100644 --- a/crates/benilla-app/assets/ui/benilla.toc +++ b/crates/benilla-app/assets/ui/benilla.toc @@ -166,13 +166,22 @@ Interface\FrameXML\MoneyInputFrame.xml # reference them. The StaticPopup engine and every dialog it used to carry are the reference's # own file now, far below at the reference's own slot after UIPanelTemplates (decision 1960). UiPanels.xml -# The tooltip: a hover window the bag/merchant/loot/unit frames drive. Loaded before them so -# `GameTooltip` + its verbs exist when their OnEnter handlers fire (runtime, so order -# is not strictly required — but it keeps the dependency legible). It also declares the two -# virtual templates (GameTooltipTemplate, ShoppingTooltipTemplate), which IS an order -# requirement: ItemRef.xml below expands one, and so do the 27 corpus addons that name -# GameTooltipTemplate in an XML inherits=. -GameTooltip.xml +# ══ THE TOOLTIP — the reference's own, off the player's chain (1751; decision 1968) ══ +# GameTooltip.xml sources HealthBar.lua and GameTooltip.lua and s GameTooltipTemplate.xml: +# the two virtual templates (GameTooltipTemplate, ShoppingTooltipTemplate — thirty declared line +# pairs each, the status bar, the money row), the GameTooltip / ShoppingTooltip1 / ShoppingTooltip2 +# instances and SmallTextTooltip. The widget itself is this engine's (0274); every verb the file +# calls was already bound. Its slot is the reference's own: FrameXML.toc l.13, after MoneyFrame +# (l.9-10, `SmallMoneyFrameTemplate` resolves at load) and before the panel kit. The order +# requirement the old header named still holds: ItemRef.xml below expands GameTooltipTemplate, +# and so do the 27 corpus addons that name it in an XML inherits=. +# +# What our transcription carried that the reference does not, and where each went (1968): the +# `$parentThicken` plate fill (a look deviation, retired — the plate is the reference's art); +# `SHOW_NEWBIE_TIPS`'s default, which is UIOptionsFrame.lua's and sits in OptionsFrame.xml's uvar +# block with its family; `FACTION_BAR_COLORS`' fallback table — the reference's is +# ReputationFrame.lua's, on the chain below; `NUM_SHOPPING_TOOLTIPS` — PaperDollFrame.lua's. +Interface\FrameXML\GameTooltip.xml # ══ THE DROPDOWN KIT — the reference's own, off the player's chain (1751) ══ # UIDropDownMenuTemplate + the DropDownList frames + the whole `UIDropDownMenu_*` API — before its # first customers (the unit popups below, the world map's pickers, the trainer filter). The stock @@ -559,11 +568,14 @@ Interface\FrameXML\CastingBarFrame.xml # 1.12 never reaches it — vmangos refuses to send that packet and substitutes a full START, # saying so in `Player::SendMirrorTimers` — and `ui_mirror.rs`'s Pause edge carries the note. Interface\FrameXML\MirrorTimer.xml -# The always-up world-state readout (decision 1586, report B190): the tower/flag/base counters an -# outdoor-PvP zone or a battleground shows at top-centre, driven by the UPDATE_WORLD_STATES event -# `crate::world_state_ui` fires. Needs Fonts (GameFontNormalSmall) and GameTooltip; sits beside the -# mirror timers, which share its top-centre lane. -WorldStateFrame.xml +# ══ THE WORLD-STATE FRAMES — the reference's own, off the player's chain (1751; decision 1972) ══ +# WorldStateFrame.xml + WorldStateFrame.lua: the always-up readout 1586 built (the tower/flag/base +# counters at top-centre, `UPDATE_WORLD_STATES` from `crate::world_state_ui`), the capture bars, +# and the battleground SCOREBOARD ours never had — `WorldStateScoreFrame`, over the score family +# 1972 built (`MSG_PVP_LOG_DATA`, the eleven verbs, `UPDATE_BATTLEFIELD_SCORE`) and UIParent.xml's +# `BattlefieldMinimap_LoadUI`. Needs Fonts, GameTooltip, the panel kit (its close button, tabs, +# faux scroll frame) — all above; sits beside the mirror timers, which share its top-centre lane. +Interface\FrameXML\WorldStateFrame.xml # ══ THE DURABILITY ALERT — the reference's own, off the player's chain (1751, window 4) ══ # The "armor guy" under the minimap: `DurabilityFrame`, its eleven glyph textures, and # `DurabilityFrame_SetAlerts` / `_OnUpdate` with `INVENTORY_ALERT_STATUS_SLOTS` and @@ -752,42 +764,34 @@ Interface\FrameXML\SkillFrame.xml # `HonorFrameTemplates.xml` is ``d by `HonorFrame.xml` and inherited by the LoadOnDemand # `Blizzard_InspectUI`, which loads later still. Interface\FrameXML\HonorFrame.xml -# ══ THE INSPECT WINDOW — the reference's own, off the player's chain (1751, window 24) ══ -# Another player's paper doll (decision 0631), and the FIRST LoadOnDemand ADDON we take off the -# chain rather than a FrameXML file. Everything below it in this manifest that names a -# `Blizzard_*` addon follows the shape set here. +# ══ THE LoadOnDemand ADDONS — Inspect, Talent, Macro, Raid: NO ROW HERE (1751; 1967) ══ +# `Blizzard_InspectUI`, `Blizzard_TalentUI`, `Blizzard_MacroUI` and `Blizzard_RaidUI` are not +# listed, exactly as the reference's own `FrameXML.toc` lists no addon: each is `LoadOnDemand: 1` +# on the player's chain — inside patch.MPQ; the loose `Interface\AddOns\Blizzard_*\` folders on +# disk hold one `.pub` decoy each, which is what kept these four windows on transcriptions for +# months — and `ui_script::addons` seats every such addon as a registry row (1957) that +# `UIParentLoadAddOn` loads the first time its opener runs. The openers are the reference's own, +# in UIParent.xml, its home for them: `InspectUnit` → `InspectFrame_LoadUI`, `ToggleTalentFrame` +# → `TalentFrame_LoadUI`, `ShowMacroFrame` → `MacroFrame_LoadUI`, and the stock RaidFrame.lua's +# `RaidFrame_LoadUI` on the first roster update. 1832, 1833, 1848 and 1874 took the four off the +# chain but listed them here with everything else, and left the LoadUI calls out rather than +# stub them (1203); 1967 gives them the reference's load timing and the calls back. # -# **The addon is inside patch.MPQ, not the loose folder.** `Interface\AddOns\Blizzard_InspectUI\` -# on disk holds one `Blizzard_InspectUI.pub` decoy and nothing else; the real four files sit in -# the archive, which the chain mounts. Believing the decoy is what kept this window (and Macro, -# Talent, Raid, Trainer) on a transcription for months. -# -# No LoadOnDemand: we list the addon's files here and they load with everything else. The -# reference reaches them through `InspectUnit` → `InspectFrame_LoadUI`; ours keeps `InspectUnit` -# (in UIParent.xml, the reference's own home for that name) and drops the LoadUI call. -# -# The addon's own toc order, which is load order — the `.xml` files pull their `.lua` siblings -# through `