From 44ff4353045e76ba314e5fcbf8ca6f6795c375c6 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 11 Aug 2026 18:18:31 +0700 Subject: [PATCH] the addon arc: the AddOns folder opens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- crates/benilla-app/assets/ui/ActionBar.xml | 299 +-- crates/benilla-app/assets/ui/AddonList.xml | 366 ++++ crates/benilla-app/assets/ui/BagFrame.xml | 101 +- crates/benilla-app/assets/ui/BankFrame.xml | 198 +- .../benilla-app/assets/ui/BasicControls.xml | 134 ++ crates/benilla-app/assets/ui/BuffFrame.xml | 671 ++++-- .../benilla-app/assets/ui/CharacterFrame.xml | 508 ++--- crates/benilla-app/assets/ui/ChatFrame.xml | 258 ++- .../assets/ui/ColorPickerFrame.xml | 246 +++ crates/benilla-app/assets/ui/CombatText.xml | 4 +- crates/benilla-app/assets/ui/ComboFrame.xml | 54 +- crates/benilla-app/assets/ui/CraftFrame.xml | 16 +- crates/benilla-app/assets/ui/DeathFrame.xml | 2 +- crates/benilla-app/assets/ui/DressUpFrame.xml | 64 +- crates/benilla-app/assets/ui/ErrorsFrame.xml | 35 +- crates/benilla-app/assets/ui/Fonts.xml | 81 +- crates/benilla-app/assets/ui/FriendsFrame.xml | 624 +++--- .../benilla-app/assets/ui/GameMenuFrame.xml | 49 +- crates/benilla-app/assets/ui/GameTooltip.xml | 200 +- crates/benilla-app/assets/ui/GossipFrame.xml | 112 +- .../benilla-app/assets/ui/GroupLootFrame.xml | 48 +- crates/benilla-app/assets/ui/InspectFrame.xml | 2 +- crates/benilla-app/assets/ui/ItemRef.xml | 34 +- .../benilla-app/assets/ui/ItemTextFrame.xml | 132 +- .../benilla-app/assets/ui/KeyBindingsPage.xml | 4 +- crates/benilla-app/assets/ui/LootFrame.xml | 88 +- crates/benilla-app/assets/ui/MacroFrame.xml | 12 +- crates/benilla-app/assets/ui/MailFrame.xml | 673 +++--- .../benilla-app/assets/ui/MerchantFrame.xml | 280 +-- crates/benilla-app/assets/ui/MicroMenu.xml | 12 +- crates/benilla-app/assets/ui/MoneyFrame.xml | 601 +++++ crates/benilla-app/assets/ui/MultiBars.xml | 130 +- crates/benilla-app/assets/ui/OptionsFrame.xml | 8 +- .../assets/ui/OptionsFrameTemplates.xml | 127 ++ crates/benilla-app/assets/ui/PartyFrame.xml | 6 +- crates/benilla-app/assets/ui/PetActionBar.xml | 119 +- .../assets/ui/PetPaperDollFrame.xml | 266 +-- crates/benilla-app/assets/ui/QuestFrame.xml | 551 ++--- .../benilla-app/assets/ui/QuestLogFrame.xml | 485 ++-- .../benilla-app/assets/ui/QuestTimerFrame.xml | 16 +- .../benilla-app/assets/ui/ScrollTemplates.xml | 153 +- crates/benilla-app/assets/ui/SkillFrame.xml | 160 +- .../benilla-app/assets/ui/SpellBookFrame.xml | 352 +-- crates/benilla-app/assets/ui/StackSplit.xml | 58 +- crates/benilla-app/assets/ui/StanceBar.xml | 64 +- crates/benilla-app/assets/ui/TalentFrame.xml | 6 +- crates/benilla-app/assets/ui/TaxiFrame.xml | 160 +- crates/benilla-app/assets/ui/TradeFrame.xml | 218 +- .../benilla-app/assets/ui/TradeSkillFrame.xml | 22 +- crates/benilla-app/assets/ui/TrainerFrame.xml | 16 +- .../benilla-app/assets/ui/UIDropDownMenu.xml | 108 +- .../assets/ui/UIPanelTemplates.xml | 433 ++++ crates/benilla-app/assets/ui/UIParent.xml | 152 +- crates/benilla-app/assets/ui/UiPanels.xml | 111 +- crates/benilla-app/assets/ui/UnitFrames.xml | 205 +- crates/benilla-app/assets/ui/UnitPopup.xml | 2 +- .../benilla-app/assets/ui/WorldMapFrame.xml | 4 +- crates/benilla-app/assets/ui/ZoneText.xml | 7 +- crates/benilla-app/assets/ui/benilla.toc | 78 +- crates/benilla-app/examples/addon_harness.rs | 219 ++ crates/benilla-app/src/addon_harness.rs | 1565 +++++++++++++ crates/benilla-app/src/bindings.rs | 419 +++- crates/benilla-app/src/bindings/commands.rs | 196 +- crates/benilla-app/src/bindings/store.rs | 24 +- crates/benilla-app/src/capture/fixtures.rs | 12 +- .../src/capture/probe_castcancel.rs | 6 +- crates/benilla-app/src/capture/probe_mail.rs | 21 +- crates/benilla-app/src/capture/scenarios.rs | 2 +- crates/benilla-app/src/char_select/addons.rs | 730 ++++++ crates/benilla-app/src/char_select/input.rs | 10 +- crates/benilla-app/src/char_select/mod.rs | 5 + crates/benilla-app/src/char_select/screen.rs | 30 + crates/benilla-app/src/items.rs | 18 + crates/benilla-app/src/lib.rs | 1 + crates/benilla-app/src/local_state.rs | 33 + crates/benilla-app/src/player.rs | 14 + crates/benilla-app/src/player/camera.rs | 7 + crates/benilla-app/src/preflight.rs | 7 +- crates/benilla-app/src/target/by_name.rs | 42 + crates/benilla-app/src/target/mod.rs | 4 + crates/benilla-app/src/ui_action/usable.rs | 4 +- crates/benilla-app/src/ui_aura.rs | 146 +- crates/benilla-app/src/ui_char.rs | 45 + crates/benilla-app/src/ui_chat.rs | 30 + .../benilla-app/src/ui_chat/ace_gate_tests.rs | 245 +++ crates/benilla-app/src/ui_chat/channels.rs | 340 +++ crates/benilla-app/src/ui_chat/edit.rs | 72 +- crates/benilla-app/src/ui_chat/event.rs | 279 ++- crates/benilla-app/src/ui_chat/feed.rs | 45 +- crates/benilla-app/src/ui_chat/frames.rs | 77 +- crates/benilla-app/src/ui_chat/input/mod.rs | 50 + crates/benilla-app/src/ui_chat/tests.rs | 315 +++ crates/benilla-app/src/ui_items/feed.rs | 25 + crates/benilla-app/src/ui_items/mod.rs | 12 + crates/benilla-app/src/ui_net.rs | 2 +- crates/benilla-app/src/ui_party/feed.rs | 248 ++- crates/benilla-app/src/ui_pet_stats.rs | 6 +- crates/benilla-app/src/ui_saved.rs | 36 +- .../src/ui_script/action_bar_tests.rs | 28 +- .../src/ui_script/addon_list_tests.rs | 360 +++ crates/benilla-app/src/ui_script/addons.rs | 1947 +++++++++++++++++ crates/benilla-app/src/ui_script/bag_tests.rs | 96 +- .../benilla-app/src/ui_script/bank_tests.rs | 41 +- .../src/ui_script/basic_controls_tests.rs | 164 ++ .../benilla-app/src/ui_script/buff_tests.rs | 331 ++- .../benilla-app/src/ui_script/cast_tests.rs | 9 +- .../src/ui_script/character_tests.rs | 183 +- .../benilla-app/src/ui_script/chat_tests.rs | 171 +- .../src/ui_script/color_picker_tests.rs | 526 +++++ .../src/ui_script/combo_frame_tests.rs | 12 +- crates/benilla-app/src/ui_script/content.rs | 47 +- .../src/ui_script/delete_item_tests.rs | 4 +- .../src/ui_script/dressup_tests.rs | 40 +- .../src/ui_script/durability_tests.rs | 2 +- .../benilla-app/src/ui_script/errors_tests.rs | 38 +- .../benilla-app/src/ui_script/escape_tests.rs | 62 +- .../src/ui_script/exp_bar_tests.rs | 57 +- .../src/ui_script/faux_scroll_tests.rs | 360 +++ .../src/ui_script/friends_tests.rs | 120 +- .../src/ui_script/game_menu_tests.rs | 47 +- .../src/ui_script/group_loot_tests.rs | 9 +- .../src/ui_script/keybindings_tests.rs | 6 +- .../benilla-app/src/ui_script/loot_tests.rs | 40 +- crates/benilla-app/src/ui_script/manifest.rs | 185 +- .../src/ui_script/merchant_tests.rs | 51 +- .../src/ui_script/micro_menu_tests.rs | 8 +- crates/benilla-app/src/ui_script/mod.rs | 191 +- .../src/ui_script/money_frame_tests.rs | 367 ++++ .../src/ui_script/multibar_stance_tests.rs | 36 +- .../src/ui_script/options_tests.rs | 13 +- .../src/ui_script/panel_template_tests.rs | 471 ++++ .../benilla-app/src/ui_script/panel_tests.rs | 154 +- .../src/ui_script/perf_bar_tests.rs | 23 +- .../src/ui_script/pet_bar_tests.rs | 50 +- .../src/ui_script/pet_frame_tests.rs | 117 +- .../src/ui_script/pet_paperdoll_tests.rs | 82 +- .../benilla-app/src/ui_script/quest_tests.rs | 114 +- .../src/ui_script/questlog_tests.rs | 136 +- .../src/ui_script/shipped_xml_tests.rs | 75 +- .../src/ui_script/skills_frame_tests.rs | 17 +- .../src/ui_script/spellbook_tests.rs | 99 +- .../src/ui_script/target_aura_tests.rs | 75 +- .../benilla-app/src/ui_script/taxi_tests.rs | 47 +- .../src/ui_script/tooltip_anchor_tests.rs | 32 +- .../src/ui_script/tooltip_compare_tests.rs | 10 +- .../src/ui_script/tooltip_template_tests.rs | 448 ++++ .../src/ui_script/uiparent_tests.rs | 253 +++ .../src/ui_script/unit_frame_tests.rs | 176 +- .../src/ui_script/unit_popup_tests.rs | 36 +- crates/benilla-app/src/ui_unit.rs | 66 +- .../tests/create_frame_template.rs | 198 ++ crates/benilla-app/tests/item_text_frame.rs | 50 +- crates/benilla-app/tests/mail_frame.rs | 114 +- crates/benilla-app/tests/talent_frame.rs | 6 +- crates/benilla-app/tests/trade_frame.rs | 101 +- crates/benilla-app/tests/tradeskill_frame.rs | 6 +- crates/benilla-formats/src/area_table.rs | 7 + crates/benilla-formats/src/chat_channels.rs | 288 +++ crates/benilla-formats/src/itemclass.rs | 115 + crates/benilla-formats/src/languages.rs | 148 ++ crates/benilla-formats/src/lib.rs | 8 + crates/benilla-formats/src/spells/duration.rs | 35 + crates/benilla-ui/examples/dump_globals.rs | 70 + crates/benilla-ui/src/bindings_xml.rs | 344 +++ crates/benilla-ui/src/framexml.rs | 22 + crates/benilla-ui/src/lib.rs | 10 +- crates/benilla-ui/src/loader/geometry.rs | 41 +- crates/benilla-ui/src/loader/mod.rs | 513 ++++- crates/benilla-ui/src/loader/scripts.rs | 2 +- crates/benilla-ui/src/loader/tests.rs | 167 +- crates/benilla-ui/src/loader/widgets.rs | 26 +- crates/benilla-ui/src/script/action.rs | 133 ++ crates/benilla-ui/src/script/addon.rs | 593 +++++ .../src/script/{aura.rs => aura/mod.rs} | 111 +- .../benilla-ui/src/script/aura/player_buff.rs | 675 ++++++ crates/benilla-ui/src/script/bank.rs | 4 +- crates/benilla-ui/src/script/binding_abi.rs | 116 + crates/benilla-ui/src/script/button.rs | 21 +- crates/benilla-ui/src/script/chat_send.rs | 244 +++ crates/benilla-ui/src/script/client.rs | 199 ++ crates/benilla-ui/src/script/colorselect.rs | 259 +++ crates/benilla-ui/src/script/container.rs | 406 ++-- crates/benilla-ui/src/script/cursor.rs | 2 +- crates/benilla-ui/src/script/cursor/doll.rs | 20 +- crates/benilla-ui/src/script/cvars.rs | 25 +- crates/benilla-ui/src/script/event.rs | 58 +- crates/benilla-ui/src/script/font.rs | 552 +++++ crates/benilla-ui/src/script/item_stats.rs | 622 +++++- crates/benilla-ui/src/script/keybind.rs | 411 +++- crates/benilla-ui/src/script/layout.rs | 54 + crates/benilla-ui/src/script/lua50.rs | 543 +++++ crates/benilla-ui/src/script/mod.rs | 153 +- crates/benilla-ui/src/script/model.rs | 102 +- crates/benilla-ui/src/script/object.rs | 82 +- .../src/script/object/events_regions.rs | 114 + .../src/script/object/frame_state.rs | 34 + .../src/script/object/layout_methods.rs | 2 +- .../benilla-ui/src/script/object/movable.rs | 316 +++ .../benilla-ui/src/script/object/toplevel.rs | 255 +++ crates/benilla-ui/src/script/party.rs | 468 +++- crates/benilla-ui/src/script/pointer.rs | 134 +- crates/benilla-ui/src/script/region.rs | 127 +- crates/benilla-ui/src/script/saved.rs | 11 +- crates/benilla-ui/src/script/scrollframe.rs | 4 + crates/benilla-ui/src/script/slash.rs | 188 ++ crates/benilla-ui/src/script/stdlib.rs | 107 +- .../benilla-ui/src/script/tests/cooldown.rs | 4 +- .../src/script/tests/create_frame_template.rs | 381 ++++ .../src/script/tests/font_object.rs | 716 ++++++ crates/benilla-ui/src/script/tests/input.rs | 362 +++ crates/benilla-ui/src/script/tests/mod.rs | 6 + crates/benilla-ui/src/script/tests/movable.rs | 350 +++ .../src/script/tests/reference_surface.rs | 179 ++ .../src/script/tests/size_changed.rs | 161 ++ crates/benilla-ui/src/script/tests/stdlib.rs | 85 + .../src/script/tests/texcoord_font.rs | 44 +- .../src/script/tests/tooltip_spell.rs | 92 +- .../benilla-ui/src/script/tests/toplevel.rs | 499 +++++ crates/benilla-ui/src/script/tooltip/mod.rs | 10 + crates/benilla-ui/src/script/tooltip/verbs.rs | 66 + crates/benilla-ui/src/script/tooltip_spell.rs | 44 +- crates/benilla-ui/src/script/types.rs | 43 +- crates/benilla-ui/src/script/unit/bindings.rs | 144 +- crates/benilla-ui/src/script/unit/mod.rs | 24 +- crates/benilla-ui/src/script/unit/tests.rs | 105 +- .../benilla-ui/src/script/weapon_enchant.rs | 277 +++ crates/benilla-ui/src/source.rs | 207 ++ crates/benilla-ui/src/toc.rs | 24 + crates/benilla-ui/src/widget/kinds/mod.rs | 227 ++ crates/benilla-ui/src/widget/mod.rs | 62 +- crates/benilla-ui/src/widget/propagation.rs | 83 +- 231 files changed, 31316 insertions(+), 5594 deletions(-) create mode 100644 crates/benilla-app/assets/ui/AddonList.xml create mode 100644 crates/benilla-app/assets/ui/BasicControls.xml create mode 100644 crates/benilla-app/assets/ui/ColorPickerFrame.xml create mode 100644 crates/benilla-app/assets/ui/MoneyFrame.xml create mode 100644 crates/benilla-app/assets/ui/OptionsFrameTemplates.xml create mode 100644 crates/benilla-app/assets/ui/UIPanelTemplates.xml create mode 100644 crates/benilla-app/examples/addon_harness.rs create mode 100644 crates/benilla-app/src/addon_harness.rs create mode 100644 crates/benilla-app/src/char_select/addons.rs create mode 100644 crates/benilla-app/src/ui_chat/ace_gate_tests.rs create mode 100644 crates/benilla-app/src/ui_chat/channels.rs create mode 100644 crates/benilla-app/src/ui_script/addon_list_tests.rs create mode 100644 crates/benilla-app/src/ui_script/addons.rs create mode 100644 crates/benilla-app/src/ui_script/basic_controls_tests.rs create mode 100644 crates/benilla-app/src/ui_script/color_picker_tests.rs create mode 100644 crates/benilla-app/src/ui_script/faux_scroll_tests.rs create mode 100644 crates/benilla-app/src/ui_script/money_frame_tests.rs create mode 100644 crates/benilla-app/src/ui_script/panel_template_tests.rs create mode 100644 crates/benilla-app/src/ui_script/tooltip_template_tests.rs create mode 100644 crates/benilla-app/src/ui_script/uiparent_tests.rs create mode 100644 crates/benilla-app/tests/create_frame_template.rs create mode 100644 crates/benilla-formats/src/chat_channels.rs create mode 100644 crates/benilla-formats/src/itemclass.rs create mode 100644 crates/benilla-formats/src/languages.rs create mode 100644 crates/benilla-ui/examples/dump_globals.rs create mode 100644 crates/benilla-ui/src/bindings_xml.rs create mode 100644 crates/benilla-ui/src/script/addon.rs rename crates/benilla-ui/src/script/{aura.rs => aura/mod.rs} (74%) create mode 100644 crates/benilla-ui/src/script/aura/player_buff.rs create mode 100644 crates/benilla-ui/src/script/binding_abi.rs create mode 100644 crates/benilla-ui/src/script/chat_send.rs create mode 100644 crates/benilla-ui/src/script/client.rs create mode 100644 crates/benilla-ui/src/script/colorselect.rs create mode 100644 crates/benilla-ui/src/script/font.rs create mode 100644 crates/benilla-ui/src/script/lua50.rs create mode 100644 crates/benilla-ui/src/script/object/movable.rs create mode 100644 crates/benilla-ui/src/script/object/toplevel.rs create mode 100644 crates/benilla-ui/src/script/slash.rs create mode 100644 crates/benilla-ui/src/script/tests/create_frame_template.rs create mode 100644 crates/benilla-ui/src/script/tests/font_object.rs create mode 100644 crates/benilla-ui/src/script/tests/movable.rs create mode 100644 crates/benilla-ui/src/script/tests/reference_surface.rs create mode 100644 crates/benilla-ui/src/script/tests/size_changed.rs create mode 100644 crates/benilla-ui/src/script/tests/toplevel.rs create mode 100644 crates/benilla-ui/src/script/weapon_enchant.rs create mode 100644 crates/benilla-ui/src/source.rs diff --git a/crates/benilla-app/assets/ui/ActionBar.xml b/crates/benilla-app/assets/ui/ActionBar.xml index 8ba4802f..14d5fc86 100644 --- a/crates/benilla-app/assets/ui/ActionBar.xml +++ b/crates/benilla-app/assets/ui/ActionBar.xml @@ -8,13 +8,13 @@ ACTIONBAR_SLOT_CHANGED repaint, HasAction/GetActionTexture in, UseAction out. Structure mirrors the real hierarchy so the draw order falls out of the frame tree: - BenillaActionBar (1024x53, BOTTOM of screen) - ├─ BenillaExpBar (StatusBar, TOP) — drawn first ⇒ lowest - │ ├─ BenillaExhaustionLevelFillBar (BORDER) — the pale rested wash up to the tick - │ └─ BenillaExpBarOverlayFrame (DIALOG) — the hover "curr / max" numerals - ├─ BenillaActionBarArtFrame (fills the bar) — dwarf strips + end caps over the XP bar + MainMenuBar (1024x53, BOTTOM of screen) + ├─ MainMenuExpBar (StatusBar, TOP) — drawn first ⇒ lowest + │ ├─ ExhaustionLevelFillBar (BORDER) — the pale rested wash up to the tick + │ └─ MainMenuBarOverlayFrame (DIALOG) — the hover "curr / max" numerals + ├─ MainMenuBarArtFrame (fills the bar) — dwarf strips + end caps over the XP bar │ └─ 12 buttons + page up/down — child frames ⇒ over the art - └─ BenillaExhaustionTick (DIALOG) — the rested-boundary marker on the strip + └─ ExhaustionTick (DIALOG) — the rested-boundary marker on the strip (The real client gets the same order via RaiseFrameLevel(MainMenuBarArtFrame); our loader's later-sibling-is-higher + child-over-parent rules reproduce it without the explicit raise.) @@ -47,12 +47,12 @@ - Exhaustion tick + rest fill, XP text (hover/cvar-gated), MaxLevelBar: OUT. The bar's right-hand cluster is otherwise complete — the backpack toggle + four bag slots live in BagFrame.xml and the eight micro buttons in MicroMenu.xml (both anchored into - BenillaActionBarArtFrame and seated over the art by BenillaActionBarArt_SeatAbove below), + MainMenuBarArtFrame and seated over the art by BenillaActionBarArt_SeatAbove below), and the performance meter is at the foot of this file. The KEYRING landed with decision 0765: its button and container live in BagFrame.xml (the ref's own split — MainMenuBarBagButtons.xml / ContainerFrame.lua), and the bar's half of it — swapping the two right-hand strips to the keyring art and sliding the performance meter over to make - room — is BenillaMainMenuBar_UpdateKeyRing below, exactly where the ref keeps it + room — is MainMenuBar_UpdateKeyRing below, exactly where the ref keeps it (MainMenuBar.lua l.174-183). --> @@ -982,14 +991,14 @@ BenillaActionButton_OnClick(self) BenillaActionButton_OnDragStart(self) BenillaActionButton_OnReceiveDrag(self) - BenillaActionButton_OnUpdate(self, arg1) + ActionButton_OnUpdate(arg1) BenillaActionButton_OnEnter(self) if GameTooltip then GameTooltip:Hide() end - + @@ -1005,7 +1014,7 @@ --> - + @@ -1019,33 +1028,33 @@ - + - + - + - + - + - + @@ -1057,16 +1066,16 @@ a DIALOG-strata child so the "1234 / 5678" text draws over the dwarf-notch art and the buttons; its own OnLoad wires the FontString to the bar (BenillaExpBarOverlay_OnLoad's note). --> - + - - + + - + - + @@ -1083,7 +1092,7 @@ BenillaExpBar_OnEvent(self) BenillaExpBar_OnEnter(self) BenillaExpBar_OnLeave(self) - BenillaExhaustionTick_OnUpdate(arg1) + ExhaustionTick_OnUpdate(arg1) if this:IsShown() and TextStatusBar_OnValueChanged then TextStatusBar_OnValueChanged() @@ -1095,23 +1104,23 @@ - - + - + - + - + - + - + - + - + @@ -1171,31 +1180,31 @@ strips (ARTWORK) + the 2 end caps and page number (OVERLAY); the buttons are its children so they draw over the art. --> - + - - + + - + - + - + - + @@ -1207,16 +1216,16 @@ fix landed in 87c97d7). Page number: GameFontNormalSmall CENTER (30,-5), static "1" (l.311-319). --> - + - + - + @@ -1227,71 +1236,71 @@ - + BenillaActionButton_OnLoad(self, 1) - - + + BenillaActionButton_OnLoad(self, 2) - - + + BenillaActionButton_OnLoad(self, 3) - - + + BenillaActionButton_OnLoad(self, 4) - - + + BenillaActionButton_OnLoad(self, 5) - - + + BenillaActionButton_OnLoad(self, 6) - - + + BenillaActionButton_OnLoad(self, 7) - - + + BenillaActionButton_OnLoad(self, 8) - - + + BenillaActionButton_OnLoad(self, 9) - - + + BenillaActionButton_OnLoad(self, 10) - - + + BenillaActionButton_OnLoad(self, 11) - - + + BenillaActionButton_OnLoad(self, 12) - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AddonListFrameTitle:SetText(ADDONS) + AddonListFrameNote:SetText(ADDON_LIST_APPLY_NOTE) + + AddonList_Update() + AddonList_Scroll(-arg1) + + + diff --git a/crates/benilla-app/assets/ui/BagFrame.xml b/crates/benilla-app/assets/ui/BagFrame.xml index e72a442b..294a6b5c 100644 --- a/crates/benilla-app/assets/ui/BagFrame.xml +++ b/crates/benilla-app/assets/ui/BagFrame.xml @@ -4,7 +4,7 @@ (dressing arc, decision 0084; whole-space generalization, decision 0216 slice 2): the geometry and art below are QUOTED from the real `ContainerFrame.xml`/`ContainerFrame.lua` (scratchpad `ref-framexml/ContainerFrame.xml`, `ContainerFrame.lua`; line citations inline), - turned onto our own C_Container feed/intents. FIVE windows now — the backpack (bag id 0, 16 + turned onto our own container feed/intents. FIVE windows now — the backpack (bag id 0, 16 slots, its own hand-authored block below, unchanged in shape) plus the four equipped bags (ids 1..4, `BenillaBagWindowTemplate`, up to 20 slots each) — the ContainerFrameTemplate generalization this file's header always said was coming. @@ -46,7 +46,7 @@ --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/benilla-app/assets/ui/BuffFrame.xml b/crates/benilla-app/assets/ui/BuffFrame.xml index 60377654..10e73e4e 100644 --- a/crates/benilla-app/assets/ui/BuffFrame.xml +++ b/crates/benilla-app/assets/ui/BuffFrame.xml @@ -1,56 +1,110 @@ - - - - - - + + + + template (BuffButtonDurationTemplate, l.45-49 — GameFontNormalSmall + a bare TOP anchor). + Region templates DO exist in the loader now (Loader::expand_region), but chaining to a FONT + OBJECT through one does not: `framexml::merge` lets the instance's own `inherits=` win, so + the spliced element still reads `inherits="BuffButtonDurationTemplate"` and + `apply_fontstring_font` looks that up in the FONT registry — a separate namespace — and + misses. Each instance therefore names GameFontNormalSmall directly; the anchor is re-seated + by BuffFrame_OnLoad / TemporaryEnchantFrame's OnLoad anyway. Same resolved font, no + indirection. --> @@ -398,85 +603,127 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaBuffFrame_OnLoad(this) - BenillaBuffFrame_OnUpdate(arg1) + BuffFrame_OnLoad() + BuffFrame_OnUpdate(arg1) + + + + + + + + + + + + + + + + + + + + + + + + TempEnchant1Duration:SetPoint("TOP", "TempEnchant1", "BOTTOM", 0, 0) + TempEnchant2Duration:SetPoint("TOP", "TempEnchant2", "BOTTOM", 0, 0) + BuffButtons_UpdatePositions() + + BuffFrame_Enchant_OnUpdate(arg1) diff --git a/crates/benilla-app/assets/ui/CharacterFrame.xml b/crates/benilla-app/assets/ui/CharacterFrame.xml index e4ba3cbe..8cc53e40 100644 --- a/crates/benilla-app/assets/ui/CharacterFrame.xml +++ b/crates/benilla-app/assets/ui/CharacterFrame.xml @@ -13,20 +13,18 @@ here, not redefined. Docks the left UIPanel slot exactly like Gossip/Merchant/Quest/QuestLog (`UiPanels.xml` - `UIPanelWindows["BenillaCharacterFrame"] = { area = "left", pushable = 0 }`, mirroring the + `UIPanelWindows["CharacterFrame"] = { area = "left", pushable = 0 }`, mirroring the ref's own `CharacterFrame` row, `UIParent.lua` pin cited in `UiPanels.xml`'s header) — so it competes for/replaces those windows, never stacks with them. `ToggleCharacter(tab)` (ref - `CharacterFrame.lua:3-23`, kept BARE — not Benilla-prefixed — matching this codebase's own - `ToggleQuestLog()` precedent: the addon-facing entry point keeps the real global name even - though the frames it drives are Benilla-prefixed) is the show/hide/tab-switch entry point; + `CharacterFrame.lua:3-23`) is the show/hide/tab-switch entry point; the app's 'C' binding calls it (`ui_script/mod.rs`). - ONE deliberate naming deviation from the ref, applied consistently: every frame this file - defines is Benilla-prefixed (`BenillaCharacterFrame`, `BenillaPaperDollFrame`, …) — including - the string `ToggleCharacter`/`CharacterFrame_ShowSubFrame` pass around internally - (`BENILLA_CHARACTERFRAME_SUBFRAMES` lists `"BenillaPaperDollFrame"`, not the ref's bare - `"PaperDollFrame"`) — matching the same-prefix convention every other window in this codebase - already follows (Merchant/Bag/QuestLog never leave a sub-piece unprefixed). + Every frame this file defines wears the REFERENCE's name (`CharacterFrame`, + `PaperDollFrame`, …) — including the strings `ToggleCharacter`/`CharacterFrame_ShowSubFrame` + pass around internally (`BENILLA_CHARACTERFRAME_SUBFRAMES` lists `"PaperDollFrame"`). The + `Benilla` prefix these carried until the reference-naming pass is gone: addons index these + globals by the reference's name, and a prefixed frame is simply the wrong name for a frame + that IS the reference's. Phase 1a shipped the window, display-only. Phase 1b (THIS pass) adds the equip interactions over the SAME display — `PickupInventoryItem`/`UseInventoryItem`/ @@ -78,7 +76,7 @@ in the real client — omitted outright rather than transcribing unreachable branches; the ammo slot always shows. - Class-specific stat-tooltip flavor text (`WARRIOR_STRENGTH_TOOLTIP` and its ~20 siblings): - only the 5 `DEFAULT_*_TOOLTIP` fallbacks ship. `BenillaPaperDollStatTooltip` still looks + only the 5 `DEFAULT_*_TOOLTIP` fallbacks ship. `PaperDollStatTooltip` still looks the class-specific global up FIRST exactly like the ref, so dropping in the per-class table later is pure string data, no logic change — the numeric stat lines (the load-bearing content) are complete either way. @@ -108,12 +106,12 @@ Engine-gap notes (transcribed anyway per this file's own instructions, or worked around) — the first two are CLOSED, kept only because the workarounds below still read as if they held: - - `HitRectInsets` (both `BenillaCharacterFrame` and `BenillaPaperDollFrame`, ref's identical + - `HitRectInsets` (both `CharacterFrame` and `PaperDollFrame`, ref's identical 0/30/0/45 on both) was a loader no-op when this file was written; it landed with the micro menu (decision 0655) and now really insets the mouse rect. - `enableMouse`/`setAllPoints` (frame-level) were no-ops on `` too; both are wired now (`loader/geometry.rs`'s `apply_attrs`/`apply_anchors`, and - `loader/tests.rs::frame_set_all_points_pins_to_parent`). `BenillaPaperDollFrame` still + `loader/tests.rs::frame_set_all_points_pins_to_parent`). `PaperDollFrame` still carries an explicit `Size`+`TOPLEFT` anchor rather than the ref's `setAllPoints="true"` — exactly equivalent for a child sized to fill its parent, so it is left alone rather than churned. @@ -240,14 +238,14 @@ -- frost/shadow; Holy(1) never rides the paper doll (only 5 of the 6 schools show here). BENILLA_MAGICRES_IDS = { 6, 2, 3, 4, 5 } -- The pages that exist so far (this file's header comment; the 0138 merchant-tab - -- precedent — tabs arrive with their pages). Benilla-prefixed, unlike the ref's bare - -- "PaperDollFrame"/"SkillFrame". 1:1 with the tab row below (index N is tab N's page) — + -- precedent — tabs arrive with their pages), named exactly as the reference names them + -- ("PaperDollFrame"/"SkillFrame"). 1:1 with the tab row below (index N is tab N's page) — -- decision 0437 phase 4 added the Skills page, decision 1057 the Pet one, which takes the -- real client's own slot 2 and pushes Skills to 3. Reputation/Honor (the real client's -- tabs 3/5) are still OMITTED, which is the whole reason our Skills tab renders 3rd where -- the reference's is 4th. BENILLA_CHARACTERFRAME_SUBFRAMES = { - "BenillaPaperDollFrame", "BenillaPetPaperDollFrame", "BenillaSkillFrame", + "PaperDollFrame", "PetPaperDollFrame", "SkillFrame", } -- ── The window: toggle / tab dispatch (ref CharacterFrame.lua:1-48) ───────────────────── @@ -272,10 +270,10 @@ -- lets the page CLOSE itself when the pet vanishes underneath it (the pet page's own -- OnEvent calls straight back in here to do exactly that). Hoisted below the getglobal -- (the ref tests it above) purely so the visibility read has a frame to ask. - if tab == "BenillaPetPaperDollFrame" and not HasPetUI() and not subFrame:IsVisible() then + if tab == "PetPaperDollFrame" and not HasPetUI() and not subFrame:IsVisible() then return end - local frame = getglobal("BenillaCharacterFrame") + local frame = getglobal("CharacterFrame") -- ref CharacterFrame.lua:11, and the line whose absence desynced this window: the tab -- row is selected HERE, from the page's own id, on EVERY path — including the one that -- closes the window. Having it only on the tab-button OnClick meant a KEYBIND @@ -315,12 +313,13 @@ PlaySound("igCharacterInfoTab") end - function BenillaCharacterFrame_OnLoad(frame) + function CharacterFrame_OnLoad() + local frame = this -- GetID()/SetID() DO exist (landed with slice 2's BagFrame, which relies on them for -- its own per-window bag id) — the STALE claim this comment used to make is corrected -- here (0208 phase 1b touched this function anyway). 3 tabs ship as of decision 1057 -- (Character + Pet + Skills); the window opens on tab 1 by default, matching the real - -- client. Tab 2 raises and hides itself with the pet — BenillaPetTab_Update, which the + -- client. Tab 2 raises and hides itself with the pet — PetTab_Update, which the -- pet page runs at its own OnLoad and on every pet transition — so the COUNT here is -- the full row, not the currently-visible one, exactly as the ref's SetNumTabs(5) is. PanelTemplates_SetNumTabs(frame, 3) @@ -345,41 +344,41 @@ -- lockShow refcount the hover uses — so a hover inside an open sheet still balances. -- ShowWatchedReputationBarText stays OMITTED: no reputation watch bar exists. -- UnitPVPName -> plain UnitName (this file's header comment: PVP rank is a named deferral). - function BenillaCharacterFrame_OnShow() + function CharacterFrame_OnShow() if UpdateMicroButtons then UpdateMicroButtons() end PlaySound("igCharacterInfoOpen") - SetPortraitTexture(getglobal("BenillaCharacterFramePortrait"), "player") - getglobal("BenillaCharacterNameText"):SetText(UnitName("player")) + SetPortraitTexture(getglobal("CharacterFramePortrait"), "player") + getglobal("CharacterNameText"):SetText(UnitName("player")) if ShowTextStatusBarText then -- engine tests load file subsets - ShowTextStatusBarText(BenillaPlayerFrameHealthBar) - ShowTextStatusBarText(BenillaPlayerFramePowerBar) - ShowTextStatusBarText(BenillaExpBar) - ShowTextStatusBarText(BenillaPetFrameHealthBar) - ShowTextStatusBarText(BenillaPetFrameManaBar) + ShowTextStatusBarText(PlayerFrameHealthBar) + ShowTextStatusBarText(PlayerFramePowerBar) + ShowTextStatusBarText(MainMenuExpBar) + ShowTextStatusBarText(PetFrameHealthBar) + ShowTextStatusBarText(PetFrameManaBar) end end -- ref CharacterFrame_OnHide (l.95-104): everything past the PlaySound is the OnShow list's -- Hide-twin — UpdateMicroButtons live (MicroMenu.xml), the bar-text calls live too (1146), -- the reputation one still omitted for the same reason as above. The subframe hide-loop is OUR OWN addition - -- (decision 0437 phase 4): BenillaPaperDollFrame is a true engine child of this frame (its + -- (decision 0437 phase 4): PaperDollFrame is a true engine child of this frame (its -- own header comment) so it hides for free on the parent's Hide-cascade, but - -- BenillaSkillFrame is a SEPARATE top-level file — this engine has no cross-file `parent=` + -- SkillFrame is a SEPARATE top-level file — this engine has no cross-file `parent=` -- attachment (grepped `benilla-ui/src/loader`: the XML `parent=` attribute is read nowhere, -- unlike `relativeTo`, which resolves by name regardless of tree position — see -- SkillFrame.xml's own header comment) — so nothing else would hide it when the WHOLE -- character window closes (ESC, the close X, or another left-slot window bumping it via -- UIPanel exclusivity). Looping every BENILLA_CHARACTERFRAME_SUBFRAMES entry here, once, -- keeps this correct as more non-nested tabs (Pet/Reputation/Honor) land the same way. - function BenillaCharacterFrame_OnHide() + function CharacterFrame_OnHide() if UpdateMicroButtons then UpdateMicroButtons() end PlaySound("igCharacterInfoClose") if HideTextStatusBarText then -- engine tests load file subsets - HideTextStatusBarText(BenillaPlayerFrameHealthBar) - HideTextStatusBarText(BenillaPlayerFramePowerBar) - HideTextStatusBarText(BenillaExpBar) - HideTextStatusBarText(BenillaPetFrameHealthBar) - HideTextStatusBarText(BenillaPetFrameManaBar) + HideTextStatusBarText(PlayerFrameHealthBar) + HideTextStatusBarText(PlayerFramePowerBar) + HideTextStatusBarText(MainMenuExpBar) + HideTextStatusBarText(PetFrameHealthBar) + HideTextStatusBarText(PetFrameManaBar) end for _, name in ipairs(BENILLA_CHARACTERFRAME_SUBFRAMES) do local subFrame = getglobal(name) @@ -398,14 +397,15 @@ -- SKILL_LINES_CHANGED are OMITTED (talents/guild/skills are out of this phase's event -- contract; UNIT_RANGEDDAMAGE isn't in it either — UNIT_DAMAGE/UNIT_ATTACK_SPEED alone -- trigger the ranged refresh below, same as the ref's own first branch already does). - function BenillaPaperDollFrame_OnLoad(frame) - getglobal("BenillaCharacterAttackFrameLabel"):SetText(MELEE_ATTACK) - getglobal("BenillaCharacterDamageFrameLabel"):SetText(DAMAGE_COLON) - getglobal("BenillaCharacterAttackPowerFrameLabel"):SetText(ATTACK_POWER_COLON) - getglobal("BenillaCharacterRangedAttackFrameLabel"):SetText(RANGED_ATTACK) - getglobal("BenillaCharacterRangedDamageFrameLabel"):SetText(DAMAGE_COLON) - getglobal("BenillaCharacterRangedAttackPowerFrameLabel"):SetText(ATTACK_POWER_COLON) - getglobal("BenillaCharacterArmorFrameLabel"):SetText(ARMOR_COLON) + function PaperDollFrame_OnLoad() + local frame = this + getglobal("CharacterAttackFrameLabel"):SetText(MELEE_ATTACK) + getglobal("CharacterDamageFrameLabel"):SetText(DAMAGE_COLON) + getglobal("CharacterAttackPowerFrameLabel"):SetText(ATTACK_POWER_COLON) + getglobal("CharacterRangedAttackFrameLabel"):SetText(RANGED_ATTACK) + getglobal("CharacterRangedDamageFrameLabel"):SetText(DAMAGE_COLON) + getglobal("CharacterRangedAttackPowerFrameLabel"):SetText(ATTACK_POWER_COLON) + getglobal("CharacterArmorFrameLabel"):SetText(ARMOR_COLON) frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:RegisterEvent("UNIT_LEVEL") frame:RegisterEvent("UNIT_RESISTANCES") @@ -417,33 +417,37 @@ frame:RegisterEvent("UNIT_ATTACK") end - -- ref PaperDollFrame_OnEvent (l.37-76), the unit-token branch only (unit == "player" always - -- true here — no pet/other-unit reuse in phase 1a) and this file's registered subset only. - function BenillaPaperDollFrame_OnEvent(frame) + -- ref PaperDollFrame_OnEvent(event, unit) (l.37-76), the unit-token branch only (unit == + -- "player" always true here — no pet/other-unit reuse in phase 1a) and this file's + -- registered subset only. `unit` is the DECLARED second parameter, not the `arg1` global: + -- the XML passes `arg1` into it exactly as the reference's own does (PaperDollFrame.xml), + -- so an addon calling the 1.12 arity is read correctly rather than off a stale global. + function PaperDollFrame_OnEvent(event, unit) + local frame = this if event == "PLAYER_ENTERING_WORLD" then return end if not frame:IsVisible() then return end - if arg1 ~= "player" then return end + if unit ~= "player" then return end if event == "UNIT_LEVEL" then - BenillaPaperDollFrame_SetLevel() + PaperDollFrame_SetLevel() elseif event == "UNIT_DAMAGE" or event == "UNIT_ATTACK_SPEED" then - BenillaPaperDollFrame_SetDamage() - BenillaPaperDollFrame_SetRangedAttack() - BenillaPaperDollFrame_SetRangedDamage() - BenillaPaperDollFrame_SetAttackBothHands() + PaperDollFrame_SetDamage() + PaperDollFrame_SetRangedAttack() + PaperDollFrame_SetRangedDamage() + PaperDollFrame_SetAttackBothHands() elseif event == "UNIT_ATTACK" then - BenillaPaperDollFrame_SetAttackBothHands() + PaperDollFrame_SetAttackBothHands() elseif event == "UNIT_RESISTANCES" then - BenillaPaperDollFrame_SetResistances() - BenillaPaperDollFrame_SetArmor() + PaperDollFrame_SetResistances() + PaperDollFrame_SetArmor() elseif event == "UNIT_STATS" then - BenillaPaperDollFrame_SetStats() + PaperDollFrame_SetStats() elseif event == "UNIT_ATTACK_POWER" then - BenillaPaperDollFrame_SetAttackPower() + PaperDollFrame_SetAttackPower() elseif event == "UNIT_RANGED_ATTACK_POWER" then - BenillaPaperDollFrame_SetRangedAttack() - BenillaPaperDollFrame_SetRangedAttackPower() + PaperDollFrame_SetRangedAttack() + PaperDollFrame_SetRangedAttackPower() end end @@ -451,17 +455,17 @@ -- header). The relic Hide/Show branch is DROPPED outright — UnitHasRelicSlot is -- vanilla-always-false, so CharacterAmmoSlot simply never has a reason to hide; it ships -- with no hidden="true" at all (see its own Button below). - function BenillaPaperDollFrame_OnShow() - BenillaPaperDollFrame_SetLevel() - BenillaPaperDollFrame_SetStats() - BenillaPaperDollFrame_SetResistances() - BenillaPaperDollFrame_SetArmor() - BenillaPaperDollFrame_SetDamage() - BenillaPaperDollFrame_SetAttackPower() - BenillaPaperDollFrame_SetAttackBothHands() - BenillaPaperDollFrame_SetRangedAttack() - BenillaPaperDollFrame_SetRangedDamage() - BenillaPaperDollFrame_SetRangedAttackPower() + function PaperDollFrame_OnShow() + PaperDollFrame_SetLevel() + PaperDollFrame_SetStats() + PaperDollFrame_SetResistances() + PaperDollFrame_SetArmor() + PaperDollFrame_SetDamage() + PaperDollFrame_SetAttackPower() + PaperDollFrame_SetAttackBothHands() + PaperDollFrame_SetRangedAttack() + PaperDollFrame_SetRangedDamage() + PaperDollFrame_SetRangedAttackPower() end -- ref PaperDollFrame_OnHide (l.587-592) is entirely commented-out in the ref itself (the -- ShoppingTooltip/compare-tooltip lines, OMIT) — nothing to transcribe, no OnHide wired. @@ -471,18 +475,18 @@ -- harmless placeholder for that one-tick window, not a fidelity change (verified live: an -- unguarded format() errors "string expected, got nil" the instant this fires before the -- first snapshot). - function BenillaPaperDollFrame_SetLevel() - getglobal("BenillaCharacterLevelText"):SetText( + function PaperDollFrame_SetLevel() + getglobal("CharacterLevelText"):SetText( format(PLAYER_LEVEL, UnitLevel("player"), UnitRace("player") or "?", UnitClass("player") or "?")) end -- ref PaperDollFrame_SetStats (l.131-174), including its per-refresh label SetText (l.140) - -- — the labels' one source of text (see BenillaPaperDollFrame_OnLoad's header comment). - function BenillaPaperDollFrame_SetStats() + -- — the labels' one source of text (see PaperDollFrame_OnLoad's header comment). + function PaperDollFrame_SetStats() for i = 1, BENILLA_NUM_STATS do - local label = getglobal("BenillaCharacterStatFrame" .. i .. "Label") - local text = getglobal("BenillaCharacterStatFrame" .. i .. "StatText") - local frame = getglobal("BenillaCharacterStatFrame" .. i) + local label = getglobal("CharacterStatFrame" .. i .. "Label") + local text = getglobal("CharacterStatFrame" .. i .. "StatText") + local frame = getglobal("CharacterStatFrame" .. i) local statName = getglobal("SPELL_STAT" .. (i - 1) .. "_NAME") label:SetText(statName .. ":") local stat, effectiveStat, posBuff, negBuff = UnitStat("player", i) @@ -517,11 +521,11 @@ -- ref PaperDollFrame_SetResistances (l.176-228). `resistanceLevel` is a proper `local` here -- (the ref leaks it as an implicit global, harmless there — Lua 5.0's default — but our -- sandboxed globals table is worth not littering). - function BenillaPaperDollFrame_SetResistances() + function PaperDollFrame_SetResistances() for i = 1, BENILLA_NUM_RESISTANCE_TYPES do local resistId = BENILLA_MAGICRES_IDS[i] - local text = getglobal("BenillaMagicResText" .. i) - local frame = getglobal("BenillaMagicResFrame" .. i) + local text = getglobal("MagicResText" .. i) + local frame = getglobal("MagicResFrame" .. i) local base, resistance, positive, negative = UnitResistance("player", resistId) local resistanceName = getglobal("RESISTANCE" .. resistId .. "_NAME") frame.tooltip = resistanceName .. " " .. resistance @@ -566,13 +570,13 @@ -- ref PaperDollFrame_SetArmor (l.230-250). NOTE the ref's own third UnitArmor return -- (`armor`) is unused here too — PaperDollFormatStat gets `base`, not `armor`; transcribed -- verbatim, not "fixed". - function BenillaPaperDollFrame_SetArmor(unit, prefix) + function PaperDollFrame_SetArmor(unit, prefix) unit = unit or "player" - prefix = prefix or "BenillaCharacter" + prefix = prefix or "Character" local base, effectiveArmor, armor, posBuff, negBuff = UnitArmor(unit) local frame = getglobal(prefix .. "ArmorFrame") local text = getglobal(prefix .. "ArmorFrameStatText") - BenillaPaperDollFormatStat(ARMOR, base, posBuff, negBuff, frame, text) + PaperDollFormatStat(ARMOR, base, posBuff, negBuff, frame, text) local playerLevel = UnitLevel(unit) local armorReduction = effectiveArmor / ((85 * playerLevel) + 400) armorReduction = 100 * (armorReduction / (armorReduction + 1)) @@ -584,9 +588,9 @@ -- solely for the pet page (decision 1057), which is why it arrives now and not in 0208. -- `UnitDefense`'s second return is a single signed modifier, not the pos/neg pair the other -- setters get, so the split into posBuff/negBuff happens here. - function BenillaPaperDollFrame_SetDefense(unit, prefix) + function PaperDollFrame_SetDefense(unit, prefix) unit = unit or "player" - prefix = prefix or "BenillaCharacter" + prefix = prefix or "Character" local base, modifier = UnitDefense(unit) local frame = getglobal(prefix .. "DefenseFrame") local text = getglobal(prefix .. "DefenseFrameStatText") @@ -597,13 +601,13 @@ elseif modifier < 0 then negBuff = modifier end - BenillaPaperDollFormatStat(DEFENSE_COLON, base, posBuff, negBuff, frame, text) + PaperDollFormatStat(DEFENSE_COLON, base, posBuff, negBuff, frame, text) end -- ref PaperDollFrame_SetDamage (l.274-372). - function BenillaPaperDollFrame_SetDamage(unit, prefix) + function PaperDollFrame_SetDamage(unit, prefix) unit = unit or "player" - prefix = prefix or "BenillaCharacter" + prefix = prefix or "Character" local damageText = getglobal(prefix .. "DamageFrameStatText") local damageFrame = getglobal(prefix .. "DamageFrame") local speed, offhandSpeed = UnitAttackSpeed(unit) @@ -677,13 +681,13 @@ end -- ref PaperDollFrame_SetAttackPower (l.374-389). - function BenillaPaperDollFrame_SetAttackPower(unit, prefix) + function PaperDollFrame_SetAttackPower(unit, prefix) unit = unit or "player" - prefix = prefix or "BenillaCharacter" + prefix = prefix or "Character" local base, posBuff, negBuff = UnitAttackPower(unit) local frame = getglobal(prefix .. "AttackPowerFrame") local text = getglobal(prefix .. "AttackPowerFrameStatText") - BenillaPaperDollFormatStat(MELEE_ATTACK_POWER, base, posBuff, negBuff, frame, text) + PaperDollFormatStat(MELEE_ATTACK_POWER, base, posBuff, negBuff, frame, text) frame.tooltipSubtext = format(MELEE_ATTACK_POWER_TOOLTIP, math.max(base + posBuff + negBuff, 0) / BENILLA_ATTACK_POWER_MAGIC_NUMBER) end @@ -691,9 +695,9 @@ -- ref PaperDollFrame_SetAttackBothHands (l.391-417) — the weapon-skill line (decision 0208's -- own "to confirm": the equipped-weapon subclass -> skill-id table is UnitAttackBothHands's -- own concern, not this file's). - function BenillaPaperDollFrame_SetAttackBothHands(unit, prefix) + function PaperDollFrame_SetAttackBothHands(unit, prefix) unit = unit or "player" - prefix = prefix or "BenillaCharacter" + prefix = prefix or "Character" local mainHandAttackBase, mainHandAttackMod = UnitAttackBothHands(unit) local frame = getglobal(prefix .. "AttackFrame") local text = getglobal(prefix .. "AttackFrameStatText") @@ -717,13 +721,13 @@ -- The literal slot id 18 is the ref's OWN hardcoded value (l.435) — quoted verbatim; what -- GetInventoryItemTexture resolves id 18 to is the parallel binding's call, not re-derived -- here. - function BenillaPaperDollFrame_SetRangedAttack(unit, prefix) + function PaperDollFrame_SetRangedAttack(unit, prefix) if unit == "pet" then return end unit = unit or "player" - prefix = prefix or "BenillaCharacter" + prefix = prefix or "Character" local frame = getglobal(prefix .. "RangedAttackFrame") local text = getglobal(prefix .. "RangedAttackFrameStatText") - local paperDoll = getglobal("BenillaPaperDollFrame") + local paperDoll = getglobal("PaperDollFrame") local rangedAttackBase, rangedAttackMod = UnitRangedAttack(unit) local rangedTexture = GetInventoryItemTexture("player", 18) local oldValue = paperDoll.noRanged @@ -735,8 +739,8 @@ frame.tooltip = nil end if oldValue ~= paperDoll.noRanged then - BenillaPaperDollFrame_SetRangedAttackPower() - BenillaPaperDollFrame_SetRangedDamage() + PaperDollFrame_SetRangedAttackPower() + PaperDollFrame_SetRangedDamage() end if not rangedTexture then return end if rangedAttackMod == 0 then @@ -755,13 +759,13 @@ end -- ref PaperDollFrame_SetRangedDamage (l.468-537). - function BenillaPaperDollFrame_SetRangedDamage(unit, prefix) + function PaperDollFrame_SetRangedDamage(unit, prefix) if unit == "pet" then return end unit = unit or "player" - prefix = prefix or "BenillaCharacter" + prefix = prefix or "Character" local damageText = getglobal(prefix .. "RangedDamageFrameStatText") local damageFrame = getglobal(prefix .. "RangedDamageFrame") - local paperDoll = getglobal("BenillaPaperDollFrame") + local paperDoll = getglobal("PaperDollFrame") if paperDoll.noRanged then damageText:SetText(NOT_APPLICABLE) damageFrame.damage = nil @@ -813,13 +817,13 @@ end -- ref PaperDollFrame_SetRangedAttackPower (l.539-566). - function BenillaPaperDollFrame_SetRangedAttackPower(unit, prefix) + function PaperDollFrame_SetRangedAttackPower(unit, prefix) if unit == "pet" then return end unit = unit or "player" - prefix = prefix or "BenillaCharacter" + prefix = prefix or "Character" local frame = getglobal(prefix .. "RangedAttackPowerFrame") local text = getglobal(prefix .. "RangedAttackPowerFrameStatText") - local paperDoll = getglobal("BenillaPaperDollFrame") + local paperDoll = getglobal("PaperDollFrame") if paperDoll.noRanged then text:SetText(NOT_APPLICABLE) frame.tooltip = nil @@ -831,13 +835,13 @@ return end local base, posBuff, negBuff = UnitRangedAttackPower(unit) - BenillaPaperDollFormatStat(RANGED_ATTACK_POWER, base, posBuff, negBuff, frame, text) + PaperDollFormatStat(RANGED_ATTACK_POWER, base, posBuff, negBuff, frame, text) frame.tooltipSubtext = format(RANGED_ATTACK_POWER_TOOLTIP, math.max(base + posBuff + negBuff, 0) / BENILLA_ATTACK_POWER_MAGIC_NUMBER) end -- ref PaperDollFormatStat (l.804-833). - function BenillaPaperDollFormatStat(name, base, posBuff, negBuff, frame, textString) + function PaperDollFormatStat(name, base, posBuff, negBuff, frame, textString) local effective = math.max(0, base + posBuff + negBuff) local text = HIGHLIGHT_FONT_COLOR_CODE .. name .. " " .. effective if posBuff == 0 and negBuff == 0 then @@ -865,17 +869,13 @@ frame.tooltip = text end - -- ref PaperDollStatTooltip (l.786-802) — `this` (the ref's ambient global) becomes an - -- explicit `button` param here, matching this codebase's own house convention (Merchant/ - -- Bag/QuestLog all thread `self` explicitly rather than lean on the engine's `this` - -- global, which DOES exist — `benilla-ui/src/script/event.rs` — but isn't this codebase's - -- idiom). - -- `unit` joins the signature for the pet page (decision 1057): the ref's own - -- PaperDollStatTooltip(unit, stat) always took it — its pet rows pass "pet" (ref - -- PetPaperDollFrame.xml:345) — and phase 1a simply had no second unit to pass, so it was - -- inlined as "player". Restored, defaulted, and third rather than first because `button` - -- leads by house convention (above). - function BenillaPaperDollStatTooltip(button, stat, unit) + -- ref PaperDollStatTooltip(unit, stat) (l.786-802), signature-exact: the button is the + -- ambient `this` the reference reads, NOT a leading parameter, and `unit` leads `stat` + -- exactly as the ref declares them (its pet rows pass "pet" — ref PetPaperDollFrame.xml:345; + -- ours likewise, decision 1057). A leading frame parameter here was a wrong SHAPE behind a + -- right name — 1199's failure mode — because an addon calls the 1.12 arity. + function PaperDollStatTooltip(unit, stat) + local button = this -- classFileName nil until the first player snapshot lands (this file's SetLevel comment -- on the same engine timing gap) — "" just misses every class lookup, falling through to -- DEFAULT_*_TOOLTIP below exactly like an unrecognized class would. A pet has no class @@ -893,7 +893,8 @@ end -- ref CharacterDamageFrame_OnEnter (l.835-851). - function BenillaCharacterDamageFrame_OnEnter(button) + function CharacterDamageFrame_OnEnter() + local button = this GameTooltip:SetOwner(button, "ANCHOR_RIGHT") GameTooltip:SetText(INVTYPE_WEAPONMAINHAND, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b) GameTooltip:AddDoubleLine(ATTACK_SPEED_COLON, string.format("%.2f", button.attackSpeed), @@ -916,7 +917,8 @@ end -- ref CharacterRangedDamageFrame_OnEnter (l.853-863). - function BenillaCharacterRangedDamageFrame_OnEnter(button) + function CharacterRangedDamageFrame_OnEnter() + local button = this if not button.damage then return end GameTooltip:SetOwner(button, "ANCHOR_RIGHT") GameTooltip:SetText(INVTYPE_RANGED, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b) @@ -1141,7 +1143,7 @@ -- ── The model pane (ref UIParent.lua:1420-1462) ───────────────────────────────────────── -- This file's header comment: a booth-texture stand-in, not a live widget. `frame` here is - -- BenillaCharacterModelFrame; `frame.facing` stands in for the ref's `model.rotation`. + -- CharacterModelFrame; `frame.facing` stands in for the ref's `model.rotation`. -- These four are the ref's SHARED Model_* helpers (UIParent.lua), and they are shared here -- too: the pet page's pane (decision 1057) drives the very same code. The one thing that -- differs per pane is WHERE the yaw goes — the engine has no `Model:SetFacing` widget @@ -1294,7 +1296,7 @@ @@ -1313,7 +1315,7 @@ - + @@ -1325,7 +1327,7 @@ (the live model-bake binding, UnitFrames.xml's own precedent) — "player" is a fixed token here (unlike a unit frame, this window only ever shows the local player). --> - + @@ -1336,12 +1338,12 @@ l.35-64). UnitPVPName -> plain UnitName (this file's header comment: PVP rank is a named deferral) — CharacterTitleText/CharacterGuildText (both PVP-rank/guild-driven) are dropped with it. --> - + - + @@ -1355,13 +1357,13 @@ - - - - @@ -1406,7 +1408,7 @@ exactly fill the parent instead of the ref's setAllPoints="true" — the same effect (see this file's header: frame-level setAllPoints was a no-op when this was written and is wired now; the explicit size is equivalent, so it stays). --> - + @@ -1431,9 +1433,9 @@ - + - + @@ -1442,7 +1444,7 @@ - + @@ -1463,7 +1465,7 @@ `RegisterForClicks("LeftButtonDown","LeftButtonUp")` is the ref's own (l.241-243/l.263-265): OnClick fires on BOTH edges, so one tap nudges twice (2 × 0.03), and holding hands the spin to the pane's OnUpdate. --> - - @@ -1506,54 +1508,54 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1561,52 +1563,52 @@ - + self:EnableMouse(true) - BenillaPaperDollStatTooltip(self, "STRENGTH") + PaperDollStatTooltip("player", "STRENGTH") GameTooltip:Hide() - - + + self:EnableMouse(true) - BenillaPaperDollStatTooltip(self, "AGILITY") + PaperDollStatTooltip("player", "AGILITY") GameTooltip:Hide() - - + + self:EnableMouse(true) - BenillaPaperDollStatTooltip(self, "STAMINA") + PaperDollStatTooltip("player", "STAMINA") GameTooltip:Hide() - - + + self:EnableMouse(true) - BenillaPaperDollStatTooltip(self, "INTELLECT") + PaperDollStatTooltip("player", "INTELLECT") GameTooltip:Hide() - - + + self:EnableMouse(true) - BenillaPaperDollStatTooltip(self, "SPIRIT") + PaperDollStatTooltip("player", "SPIRIT") GameTooltip:Hide() - - + + self:EnableMouse(true) @@ -1620,8 +1622,8 @@ - - + + self:EnableMouse(true) @@ -1634,8 +1636,8 @@ - - + + self:EnableMouse(true); self:SetWidth(99) @@ -1648,17 +1650,17 @@ - - + + self:EnableMouse(true); self:SetWidth(99) - BenillaCharacterDamageFrame_OnEnter(self) + CharacterDamageFrame_OnEnter() GameTooltip:Hide() - - + + self:EnableMouse(true) @@ -1672,8 +1674,8 @@ - - + + self:EnableMouse(true); self:SetWidth(99) @@ -1689,11 +1691,11 @@ - - + + self:EnableMouse(true); self:SetWidth(99) - BenillaCharacterRangedDamageFrame_OnEnter(self) + CharacterRangedDamageFrame_OnEnter() GameTooltip:Hide() @@ -1704,72 +1706,72 @@ 32x160 wrapper, TOPRIGHT of PaperDollFrame's own TOPLEFT (297,-77); each 32x29 icon TOP-chained off the previous, ids 6/2/3/4/5 (arcane/fire/nature/ frost/shadow — Holy(1) never rides the paper doll). --> - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + @@ -1781,80 +1783,80 @@ - - - - - - - - - - - - - - - - - - - @@ -1868,10 +1870,10 @@ Merchant/this file's own template) uses the same "blank text = invisible" idiom with no Show/Hide dance, applied here too for consistency. $parentStock OMITTED (this file's header comment: no ref Lua populates it). --> - - BenillaPaperDollFrame_OnLoad(self) - BenillaPaperDollFrame_OnEvent(self) - BenillaPaperDollFrame_OnShow() + PaperDollFrame_OnLoad() + PaperDollFrame_OnEvent(event, arg1) + PaperDollFrame_OnShow() - BenillaCharacterFrame_OnLoad(self) - BenillaCharacterFrame_OnShow() - BenillaCharacterFrame_OnHide() + CharacterFrame_OnLoad() + CharacterFrame_OnShow() + CharacterFrame_OnHide() diff --git a/crates/benilla-app/assets/ui/ChatFrame.xml b/crates/benilla-app/assets/ui/ChatFrame.xml index 3e517bd2..4611637f 100644 --- a/crates/benilla-app/assets/ui/ChatFrame.xml +++ b/crates/benilla-app/assets/ui/ChatFrame.xml @@ -17,6 +17,173 @@ "Say:" with static insets. --> @@ -560,8 +730,8 @@ if event == "EXECUTE_CHAT_LINE" then SubmitChatInput(arg1) end - BenillaFCF_OnUpdate(arg1) - BenillaChatFrame_OnUpdate(this, arg1) + FCF_OnUpdate(arg1) + ChatFrame_OnUpdate(arg1) -- WoW wheel convention: +1 per notch up, -1 down. Up = older messages. @@ -694,16 +864,16 @@ - BenillaUIMenuButton_OnLoad() + UIMenuButton_OnLoad() - BenillaUIMenuButton_OnClick() + UIMenuButton_OnClick() - BenillaUIMenuButton_OnEnter() + UIMenuButton_OnEnter() - BenillaUIMenuButton_OnLeave() + UIMenuButton_OnLeave() @@ -762,13 +932,13 @@ - BenillaUIMenu_OnShow() + UIMenu_OnShow() PlaySound("UChatScrollButton") this:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b) this:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b) - BenillaUIMenu_OnUpdate(arg1) + UIMenu_OnUpdate(arg1) @@ -819,10 +989,10 @@ - BenillaChatMenu_OnLoad() + ChatMenu_OnLoad() - BenillaUIMenu_OnShow() + UIMenu_OnShow() EmoteMenu:Hide() VoiceMacroMenu:Hide() this:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b) @@ -903,6 +1073,14 @@ chat-cache window COLOR, which ships 0 0 0; the ChatFrameBackground art itself is white, so untinted it reads as a white wash over the world). --> + + + + diff --git a/crates/benilla-app/assets/ui/CombatText.xml b/crates/benilla-app/assets/ui/CombatText.xml index 344041fb..65ff2e5c 100644 --- a/crates/benilla-app/assets/ui/CombatText.xml +++ b/crates/benilla-app/assets/ui/CombatText.xml @@ -197,10 +197,10 @@ end elseif event == "UNIT_POWER_UPDATE" then -- Ref: UNIT_MANA + UnitMana/UnitManaMax (header deviation — the Era surface). - local mana = UnitPower("player") + local mana = UnitMana("player") local powerType = UnitPowerType("player") if arg1 == "player" then - if mana / UnitPowerMax("player") <= COMBAT_TEXT_LOW_MANA_THRESHOLD and powerType == 0 then + if mana / UnitManaMax("player") <= COMBAT_TEXT_LOW_MANA_THRESHOLD and powerType == 0 then if not CombatText.lowMana then messageType = "MANA_LOW" CombatText.lowMana = 1 diff --git a/crates/benilla-app/assets/ui/ComboFrame.xml b/crates/benilla-app/assets/ui/ComboFrame.xml index cebe32a8..e78ff1e8 100644 --- a/crates/benilla-app/assets/ui/ComboFrame.xml +++ b/crates/benilla-app/assets/ui/ComboFrame.xml @@ -58,46 +58,46 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -107,11 +107,11 @@ this:RegisterEvent("PLAYER_TARGET_CHANGED"); this:RegisterEvent("PLAYER_COMBO_POINTS"); - BenillaComboPoint1Highlight:SetAlpha(0); - BenillaComboPoint1Shine:SetAlpha(0); + ComboPoint1Highlight:SetAlpha(0); + ComboPoint1Shine:SetAlpha(0); - BenillaComboPointsFrame_OnEvent(); + ComboPointsFrame_OnEvent(); @@ -130,22 +130,22 @@ -- 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 BenillaComboPointsFrame_OnEvent() + function ComboPointsFrame_OnEvent() local comboPoints = GetComboPoints(); if comboPoints > 0 then - if not BenillaComboFrame:IsVisible() then - BenillaComboFrame:Show(); - UIFrameFadeIn(BenillaComboFrame, COMBOFRAME_FADE_IN); + if not ComboFrame:IsVisible() then + ComboFrame:Show(); + UIFrameFadeIn(ComboFrame, COMBOFRAME_FADE_IN); end for i = 1, MAX_COMBO_POINTS do - local comboPointHighlight = getglobal("BenillaComboPoint"..i.."Highlight"); - local comboPointShine = getglobal("BenillaComboPoint"..i.."Shine"); + 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 = BenillaComboPointShineFadeIn; + fadeInfo.finishedFunc = ComboPointShineFadeIn; fadeInfo.finishedArg1 = comboPointShine; UIFrameFade(comboPointHighlight, fadeInfo); end @@ -155,25 +155,25 @@ end end else - BenillaComboPoint1Highlight:SetAlpha(0); - BenillaComboPoint1Shine:SetAlpha(0); - BenillaComboFrame:Hide(); + ComboPoint1Highlight:SetAlpha(0); + ComboPoint1Shine:SetAlpha(0); + ComboFrame:Hide(); end COMBO_FRAME_LAST_NUM_POINTS = comboPoints; end - function BenillaComboPointShineFadeIn(frame) + function ComboPointShineFadeIn(frame) local fadeInfo = {}; fadeInfo.mode = "IN"; fadeInfo.timeToFade = COMBOFRAME_SHINE_FADE_IN; - fadeInfo.finishedFunc = BenillaComboPointShineFadeOut; + 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 BenillaComboPointShineFadeOut(frameName) + function ComboPointShineFadeOut(frameName) UIFrameFadeOut(getglobal(frameName), COMBOFRAME_SHINE_FADE_OUT); end ]]> diff --git a/crates/benilla-app/assets/ui/CraftFrame.xml b/crates/benilla-app/assets/ui/CraftFrame.xml index 9deee9d5..fae0035f 100644 --- a/crates/benilla-app/assets/ui/CraftFrame.xml +++ b/crates/benilla-app/assets/ui/CraftFrame.xml @@ -31,7 +31,7 @@ session), the UIPanel slot system (carries NO hardcoded — ShowUIPanel/SetLeftFrame SetPoints it), OnShow/OnHide PlaySound pair. - TradeSkillFrame.xml — the FLAT layout constraint (below), the faux-scroll list kit - (BenillaFauxScrollFrameTemplate, ScrollTemplates.xml), the locally-reconstructed + (FauxScrollFrameTemplate, ScrollTemplates.xml), the locally-reconstructed UIPanelButtonTemplate/close-button/item-button idioms (no such templates ship in this house dialect — TalentFrame.xml's own ENGINE API note, restated per-window, StackSplit.xml's own "own local virtual template, not a cross-file inherits" convention), the persistent @@ -316,8 +316,8 @@ end local scrollFrame = getglobal("BenillaCraftListScrollFrame") - BenillaFauxScrollFrame_Update(scrollFrame, numCrafts, CRAFTS_DISPLAYED, CRAFT_SKILL_HEIGHT) - local craftOffset = BenillaFauxScrollFrame_GetOffset(scrollFrame) + FauxScrollFrame_Update(scrollFrame, numCrafts, CRAFTS_DISPLAYED, CRAFT_SKILL_HEIGHT) + local craftOffset = FauxScrollFrame_GetOffset(scrollFrame) -- The skill-rank StatusBar (ref l.107-123): Show/Hide are real here (real widgets, not -- flattened Layer regions). @@ -437,7 +437,7 @@ ExpandCraftSkillLine(0) else self.collapsed = true - BenillaFauxScrollFrame_SetOffset(getglobal("BenillaCraftListScrollFrame"), 0) + FauxScrollFrame_SetOffset(getglobal("BenillaCraftListScrollFrame"), 0) CollapseCraftSkillLine(0) end end @@ -513,7 +513,7 @@ else BenillaCraftFrame_SetSelection(GetCraftSelectionIndex()) end - BenillaFauxScrollFrame_SetOffset(getglobal("BenillaCraftListScrollFrame"), 0) + FauxScrollFrame_SetOffset(getglobal("BenillaCraftListScrollFrame"), 0) SetPortraitTexture(getglobal("BenillaCraftFramePortrait"), "player") BenillaCraftFrame_Update() ShowUIPanel(frame) @@ -529,7 +529,7 @@ BenillaCraftFrame_SetSelection(selection) elseif GetNumCrafts() > 0 then BenillaCraftFrame_SetSelection(1) - BenillaFauxScrollFrame_SetOffset(getglobal("BenillaCraftListScrollFrame"), 0) + FauxScrollFrame_SetOffset(getglobal("BenillaCraftListScrollFrame"), 0) end BenillaCraftFrame_Update() elseif event == "CRAFT_CLOSE" then @@ -839,11 +839,11 @@ - - + diff --git a/crates/benilla-app/assets/ui/DeathFrame.xml b/crates/benilla-app/assets/ui/DeathFrame.xml index d28321b2..f74ce76b 100644 --- a/crates/benilla-app/assets/ui/DeathFrame.xml +++ b/crates/benilla-app/assets/ui/DeathFrame.xml @@ -229,7 +229,7 @@ end end -- The ref hides the gossip window under the confirm (UIParent.lua l.412). - local gossip = getglobal("BenillaGossipFrame") + local gossip = getglobal("GossipFrame") if gossip and gossip:IsVisible() then HideUIPanel(gossip) end diff --git a/crates/benilla-app/assets/ui/DressUpFrame.xml b/crates/benilla-app/assets/ui/DressUpFrame.xml index 27f0af84..04ff0a8d 100644 --- a/crates/benilla-app/assets/ui/DressUpFrame.xml +++ b/crates/benilla-app/assets/ui/DressUpFrame.xml @@ -46,8 +46,8 @@ -- tries the clicked item on. Both halves ride ONE ordered intent queue app-side, so the -- reset can never overtake the try-on (dressup.rs's module doc). function DressUpItem(item) - if not BenillaDressUpFrame:IsVisible() then - ShowUIPanel(BenillaDressUpFrame) + if not DressUpFrame:IsVisible() then + ShowUIPanel(DressUpFrame) BenillaDressUpModel_Dress() -- ref: DressUpModel:SetUnit("player") end BenillaDressUpModel_TryOn(item) -- ref: DressUpModel:TryOn(item) @@ -86,10 +86,10 @@ -- character window's level line documents). function SetDressUpBackground() local texture = DressUpTexturePath() - BenillaDressUpBackgroundTopLeft:SetTexture(texture .. 1) - BenillaDressUpBackgroundTopRight:SetTexture(texture .. 2) - BenillaDressUpBackgroundBotLeft:SetTexture(texture .. 3) - BenillaDressUpBackgroundBotRight:SetTexture(texture .. 4) + DressUpBackgroundTopLeft:SetTexture(texture .. 1) + DressUpBackgroundTopRight:SetTexture(texture .. 2) + DressUpBackgroundBotLeft:SetTexture(texture .. 3) + DressUpBackgroundBotRight:SetTexture(texture .. 4) end -- The pane's facing — the paper doll's pair of handlers, over this room's own booth yaw @@ -147,7 +147,7 @@ - + @@ -156,7 +156,7 @@ - + @@ -180,61 +180,61 @@ - + - + - + - + - + - + - + - + - + - + - - - - @@ -303,7 +303,7 @@ SetDressUpBackground() SetDressUpBackground() - SetPortraitTexture(BenillaDressUpFramePortrait, "player") + SetPortraitTexture(DressUpFramePortrait, "player") PlaySound("igCharacterInfoOpen") - + @@ -95,23 +100,23 @@ - + - + - + - + - + - BenillaErrorsFrame_OnLoad(self) - BenillaErrorsFrame_OnEvent(self) + UIErrorsFrame_OnLoad() + UIErrorsFrame_OnEvent(event, arg1) BenillaErrorsFrame_OnUpdate(self, arg1) diff --git a/crates/benilla-app/assets/ui/Fonts.xml b/crates/benilla-app/assets/ui/Fonts.xml index 5e1d8fc1..ba4d97d0 100644 --- a/crates/benilla-app/assets/ui/Fonts.xml +++ b/crates/benilla-app/assets/ui/Fonts.xml @@ -28,6 +28,23 @@ the two color tables tooltip AddLine calls read. Defined here (the ref's own home, loaded first) so every window shares one verified set. --> diff --git a/crates/benilla-app/assets/ui/FriendsFrame.xml b/crates/benilla-app/assets/ui/FriendsFrame.xml index 1223706a..01ffe533 100644 --- a/crates/benilla-app/assets/ui/FriendsFrame.xml +++ b/crates/benilla-app/assets/ui/FriendsFrame.xml @@ -64,11 +64,11 @@ } BENILLA_FRIENDS_SUBFRAMES = { - "BenillaFriendsListFrame", "BenillaIgnoreListFrame", "BenillaWhoFrame", + "FriendsListFrame", "IgnoreListFrame", "WhoFrame", } -- ── Sub-frame switching (ref FriendsFrame_ShowSubFrame l.25-33) ──────────────────────── - function BenillaFriendsFrame_ShowSubFrame(frameName) + function FriendsFrame_ShowSubFrame(frameName) for i = 1, table.getn(BENILLA_FRIENDS_SUBFRAMES) do local value = BENILLA_FRIENDS_SUBFRAMES[i] if value == frameName then @@ -107,38 +107,38 @@ -- ── The window's repaint (ref FriendsFrame_Update l.81-126) ──────────────────────────── -- Each tab swaps the four corner art textures as well as the sub-frame: the ref reuses one -- 384x512 window shell for lists that want different bottom art. - function BenillaFriendsFrame_Update() - local frame = BenillaFriendsFrame + function FriendsFrame_Update() + local frame = FriendsFrame if frame.selectedTab == 1 then - BenillaFriendsFrameTopLeft:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-General-TopLeft") - BenillaFriendsFrameTopRight:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-General-TopRight") + FriendsFrameTopLeft:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-General-TopLeft") + FriendsFrameTopRight:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-General-TopRight") if frame.showFriendsList then - BenillaFriendsFrameBottomLeft:SetTexture("Interface\\FriendsFrame\\UI-FriendsFrame-BotLeft") - BenillaFriendsFrameBottomRight:SetTexture("Interface\\FriendsFrame\\UI-FriendsFrame-BotRight") - BenillaFriendsFrameTitleText:SetText(FRIENDS_LIST) - BenillaFriendsList_Update() - BenillaFriendsFrame_ShowSubFrame("BenillaFriendsListFrame") + FriendsFrameBottomLeft:SetTexture("Interface\\FriendsFrame\\UI-FriendsFrame-BotLeft") + FriendsFrameBottomRight:SetTexture("Interface\\FriendsFrame\\UI-FriendsFrame-BotRight") + FriendsFrameTitleText:SetText(FRIENDS_LIST) + FriendsList_Update() + FriendsFrame_ShowSubFrame("FriendsListFrame") else - BenillaFriendsFrameBottomLeft:SetTexture("Interface\\FriendsFrame\\UI-IgnoreFrame-BotLeft") - BenillaFriendsFrameBottomRight:SetTexture("Interface\\FriendsFrame\\UI-IgnoreFrame-BotRight") - BenillaFriendsFrameTitleText:SetText(IGNORE_LIST) - BenillaIgnoreList_Update() - BenillaFriendsFrame_ShowSubFrame("BenillaIgnoreListFrame") + FriendsFrameBottomLeft:SetTexture("Interface\\FriendsFrame\\UI-IgnoreFrame-BotLeft") + FriendsFrameBottomRight:SetTexture("Interface\\FriendsFrame\\UI-IgnoreFrame-BotRight") + FriendsFrameTitleText:SetText(IGNORE_LIST) + IgnoreList_Update() + FriendsFrame_ShowSubFrame("IgnoreListFrame") end elseif frame.selectedTab == 2 then - BenillaFriendsFrameTopLeft:SetTexture("Interface\\ClassTrainerFrame\\UI-ClassTrainer-TopLeft") - BenillaFriendsFrameTopRight:SetTexture("Interface\\ClassTrainerFrame\\UI-ClassTrainer-TopRight") - BenillaFriendsFrameBottomLeft:SetTexture("Interface\\FriendsFrame\\WhoFrame-BotLeft") - BenillaFriendsFrameBottomRight:SetTexture("Interface\\FriendsFrame\\WhoFrame-BotRight") - BenillaFriendsFrameTitleText:SetText(WHO_LIST) - BenillaWhoList_Update() - BenillaFriendsFrame_ShowSubFrame("BenillaWhoFrame") + FriendsFrameTopLeft:SetTexture("Interface\\ClassTrainerFrame\\UI-ClassTrainer-TopLeft") + FriendsFrameTopRight:SetTexture("Interface\\ClassTrainerFrame\\UI-ClassTrainer-TopRight") + FriendsFrameBottomLeft:SetTexture("Interface\\FriendsFrame\\WhoFrame-BotLeft") + FriendsFrameBottomRight:SetTexture("Interface\\FriendsFrame\\WhoFrame-BotRight") + FriendsFrameTitleText:SetText(WHO_LIST) + WhoList_Update() + FriendsFrame_ShowSubFrame("WhoFrame") end end -- ── The friends list (ref FriendsList_Update l.142-210) ──────────────────────────────── - function BenillaFriendsList_Update() - local frame = BenillaFriendsFrame + function FriendsList_Update() + local frame = FriendsFrame local numFriends = GetNumFriends() frame.selectedFriend = GetSelectedFriend() @@ -151,25 +151,25 @@ end local _, _, _, _, connected = GetFriendInfo(frame.selectedFriend) if connected then - BenillaFriendsFrameSendMessageButton:Enable() - BenillaFriendsFrameGroupInviteButton:Enable() + FriendsFrameSendMessageButton:Enable() + FriendsFrameGroupInviteButton:Enable() else - BenillaFriendsFrameSendMessageButton:Disable() - BenillaFriendsFrameGroupInviteButton:Disable() + FriendsFrameSendMessageButton:Disable() + FriendsFrameGroupInviteButton:Disable() end - BenillaFriendsFrameRemoveFriendButton:Enable() + FriendsFrameRemoveFriendButton:Enable() else - BenillaFriendsFrameSendMessageButton:Disable() - BenillaFriendsFrameGroupInviteButton:Disable() - BenillaFriendsFrameRemoveFriendButton:Disable() + FriendsFrameSendMessageButton:Disable() + FriendsFrameGroupInviteButton:Disable() + FriendsFrameRemoveFriendButton:Disable() end - local offset = BenillaFauxScrollFrame_GetOffset(BenillaFriendsFrameFriendsScrollFrame) + local offset = FauxScrollFrame_GetOffset(FriendsFrameFriendsScrollFrame) for i = 1, FRIENDS_TO_DISPLAY do local index = offset + i local name, level, class, area, connected, status = GetFriendInfo(index) - local nameLocation = getglobal("BenillaFriendsFrameFriendButton" .. i .. "NameLocation") - local info = getglobal("BenillaFriendsFrameFriendButton" .. i .. "Info") + local nameLocation = getglobal("FriendsFrameFriendButton" .. i .. "NameLocation") + local info = getglobal("FriendsFrameFriendButton" .. i .. "Info") if not name or name == "" then name = UNKNOWN end @@ -181,7 +181,7 @@ info:SetText(UNKNOWN) end - local button = getglobal("BenillaFriendsFrameFriendButton" .. i) + local button = getglobal("FriendsFrameFriendButton" .. i) button:SetID(index) if index == frame.selectedFriend then button:LockHighlight() @@ -195,13 +195,13 @@ end end - BenillaFauxScrollFrame_Update(BenillaFriendsFrameFriendsScrollFrame, numFriends, + FauxScrollFrame_Update(FriendsFrameFriendsScrollFrame, numFriends, FRIENDS_TO_DISPLAY, FRIENDS_FRAME_FRIEND_HEIGHT) end -- ── The ignore list (ref IgnoreList_Update l.212-251) ────────────────────────────────── - function BenillaIgnoreList_Update() - local frame = BenillaFriendsFrame + function IgnoreList_Update() + local frame = FriendsFrame local numIgnores = GetNumIgnores() frame.selectedIgnore = GetSelectedIgnore() if numIgnores > 0 then @@ -209,17 +209,17 @@ SetSelectedIgnore(1) frame.selectedIgnore = GetSelectedIgnore() end - BenillaFriendsFrameStopIgnoreButton:Enable() + FriendsFrameStopIgnoreButton:Enable() else - BenillaFriendsFrameStopIgnoreButton:Disable() + FriendsFrameStopIgnoreButton:Disable() end - local offset = BenillaFauxScrollFrame_GetOffset(BenillaFriendsFrameIgnoreScrollFrame) + local offset = FauxScrollFrame_GetOffset(FriendsFrameIgnoreScrollFrame) for i = 1, IGNORES_TO_DISPLAY do local index = offset + i - getglobal("BenillaFriendsFrameIgnoreButton" .. i .. "Name") + getglobal("FriendsFrameIgnoreButton" .. i .. "Name") :SetText(GetIgnoreName(index) or "") - local button = getglobal("BenillaFriendsFrameIgnoreButton" .. i) + local button = getglobal("FriendsFrameIgnoreButton" .. i) button:SetID(index) if index == frame.selectedIgnore then button:LockHighlight() @@ -233,14 +233,14 @@ end end - BenillaFauxScrollFrame_Update(BenillaFriendsFrameIgnoreScrollFrame, numIgnores, + FauxScrollFrame_Update(FriendsFrameIgnoreScrollFrame, numIgnores, IGNORES_TO_DISPLAY, FRIENDS_FRAME_IGNORE_HEIGHT) end -- ── The who list (ref WhoList_Update l.253-325) ──────────────────────────────────────── - function BenillaWhoList_Update() + function WhoList_Update() local numWhos, totalCount = GetNumWhoResults() - local frame = BenillaWhoFrame + local frame = WhoFrame -- "132 People Found (50 displayed)" — the suffix appears only when the server -- matched more than it could send (ref l.264-268). @@ -252,25 +252,25 @@ if totalCount == 1 then totalTemplate = WHO_FRAME_TOTAL_TEMPLATE end - BenillaWhoFrameTotals:SetText(format(totalTemplate, totalCount) .. " " .. displayedText) + WhoFrameTotals:SetText(format(totalTemplate, totalCount) .. " " .. displayedText) local showScrollBar = nil if numWhos > WHOS_TO_DISPLAY then showScrollBar = 1 end - local column = UIDropDownMenu_GetSelectedID(BenillaWhoFrameDropDown) or 1 - local offset = BenillaFauxScrollFrame_GetOffset(BenillaWhoListScrollFrame) + local column = UIDropDownMenu_GetSelectedID(WhoFrameDropDown) or 1 + local offset = FauxScrollFrame_GetOffset(WhoListScrollFrame) for i = 1, WHOS_TO_DISPLAY do local index = offset + i - local button = getglobal("BenillaWhoFrameButton" .. i) + local button = getglobal("WhoFrameButton" .. i) button.whoIndex = index local name, guild, level, race, class, zone = GetWhoInfo(index) - getglobal("BenillaWhoFrameButton" .. i .. "Name"):SetText(name or "") - getglobal("BenillaWhoFrameButton" .. i .. "Level"):SetText(level or "") - getglobal("BenillaWhoFrameButton" .. i .. "Class"):SetText(class or "") + getglobal("WhoFrameButton" .. i .. "Name"):SetText(name or "") + getglobal("WhoFrameButton" .. i .. "Level"):SetText(level or "") + getglobal("WhoFrameButton" .. i .. "Class"):SetText(class or "") -- The variable column follows the dropdown: zone / guild / race (ref l.274-279). local columnTable = { zone, guild, race } - local variable = getglobal("BenillaWhoFrameButton" .. i .. "Variable") + local variable = getglobal("WhoFrameButton" .. i .. "Variable") variable:SetText(columnTable[column] or "") if showScrollBar then variable:SetWidth(95) @@ -292,80 +292,80 @@ -- The two who buttons need a selected row (ref l.302-309). if not frame.selectedWho then - BenillaWhoFrameGroupInviteButton:Disable() - BenillaWhoFrameAddFriendButton:Disable() + WhoFrameGroupInviteButton:Disable() + WhoFrameAddFriendButton:Disable() else - BenillaWhoFrameGroupInviteButton:Enable() - BenillaWhoFrameAddFriendButton:Enable() + WhoFrameGroupInviteButton:Enable() + WhoFrameAddFriendButton:Enable() frame.selectedName = GetWhoInfo(frame.selectedWho) end -- The middle column and the dropdown narrow to make room for the bar (ref l.311-318). if showScrollBar then - BenillaWhoFrameColumn_SetWidth(105, BenillaWhoFrameColumnHeader2) - UIDropDownMenu_SetWidth(80, BenillaWhoFrameDropDown) + WhoFrameColumn_SetWidth(105, WhoFrameColumnHeader2) + UIDropDownMenu_SetWidth(80, WhoFrameDropDown) else - BenillaWhoFrameColumn_SetWidth(120, BenillaWhoFrameColumnHeader2) - UIDropDownMenu_SetWidth(95, BenillaWhoFrameDropDown) + WhoFrameColumn_SetWidth(120, WhoFrameColumnHeader2) + UIDropDownMenu_SetWidth(95, WhoFrameDropDown) end - BenillaFauxScrollFrame_Update(BenillaWhoListScrollFrame, numWhos, WHOS_TO_DISPLAY, + FauxScrollFrame_Update(WhoListScrollFrame, numWhos, WHOS_TO_DISPLAY, FRIENDS_FRAME_WHO_HEIGHT) end -- Ref WhoFrameColumn_SetWidth l.605-611: the header's middle slice carries the width less -- the two 9px end caps. - function BenillaWhoFrameColumn_SetWidth(width, frame) + function WhoFrameColumn_SetWidth(width, frame) frame:SetWidth(width) getglobal(frame:GetName() .. "Middle"):SetWidth(width - 9) end -- ── The who column dropdown (ref WhoFrameDropDown_* l.613-633) ───────────────────────── - function BenillaWhoFrameDropDown_Initialize() + function WhoFrameDropDown_Initialize() for i = 1, table.getn(WHOFRAME_DROPDOWN_LIST) do local info = {} info.text = WHOFRAME_DROPDOWN_LIST[i].name - info.func = BenillaWhoFrameDropDownButton_OnClick + info.func = WhoFrameDropDownButton_OnClick UIDropDownMenu_AddButton(info) end end - function BenillaWhoFrameDropDown_OnLoad() - UIDropDownMenu_Initialize(this, BenillaWhoFrameDropDown_Initialize) + function WhoFrameDropDown_OnLoad() + UIDropDownMenu_Initialize(this, WhoFrameDropDown_Initialize) UIDropDownMenu_SetWidth(80, this) UIDropDownMenu_SetButtonWidth(24, this) UIDropDownMenu_JustifyText("LEFT", this) end - function BenillaWhoFrameDropDownButton_OnClick() - UIDropDownMenu_SetSelectedID(BenillaWhoFrameDropDown, this:GetID()) + function WhoFrameDropDownButton_OnClick() + UIDropDownMenu_SetSelectedID(WhoFrameDropDown, this:GetID()) -- The ref sorts on the dropdown's OnMouseUp; doing it on the pick is the same intent -- with one fewer hook, and keeps the column and its sort in step. local entry = WHOFRAME_DROPDOWN_LIST[this:GetID()] if entry and entry.sortType then SortWho(entry.sortType) end - BenillaWhoList_Update() + WhoList_Update() end -- ── Events (ref FriendsFrame_OnEvent l.635-662) ──────────────────────────────────────── - function BenillaFriendsFrame_OnEvent() + function FriendsFrame_OnEvent() if event == "FRIENDLIST_SHOW" then - BenillaFriendsList_Update() - BenillaFriendsFrame_Update() + FriendsList_Update() + FriendsFrame_Update() elseif event == "FRIENDLIST_UPDATE" then - BenillaFriendsList_Update() + FriendsList_Update() elseif event == "IGNORELIST_UPDATE" then - BenillaIgnoreList_Update() + IgnoreList_Update() elseif event == "WHO_LIST_UPDATE" then -- A fresh answer drops the old selection: row 3 of the last query is not row 3 of -- this one, and the ref's own Refresh button clears it for exactly that reason. - BenillaWhoFrame.selectedWho = nil - BenillaWhoList_Update() + WhoFrame.selectedWho = nil + WhoList_Update() end end - function BenillaFriendsFrame_OnLoad() + function FriendsFrame_OnLoad() PanelTemplates_SetNumTabs(this, 3) this.selectedTab = 1 this.showFriendsList = 1 @@ -381,8 +381,8 @@ this:RegisterEvent("WHO_LIST_UPDATE") end - function BenillaFriendsFrame_OnShow() - BenillaFriendsFrame_Update() + function FriendsFrame_OnShow() + FriendsFrame_Update() -- Guarded, the house idiom (CharacterFrame/QuestLogFrame do the same): MicroMenu.xml -- loads before this file in the real manifest, but a window must stay loadable on its -- own for its tests. @@ -390,7 +390,7 @@ PlaySound("igMainMenuOpen") end - function BenillaFriendsFrame_OnHide() + function FriendsFrame_OnHide() if UpdateMicroButtons then UpdateMicroButtons() end PlaySound("igMainMenuClose") for i = 1, table.getn(BENILLA_FRIENDS_SUBFRAMES) do @@ -399,59 +399,59 @@ end -- ── Row clicks (ref l.664-688) ───────────────────────────────────────────────────────── - function BenillaFriendsFrameFriendButton_OnClick(button) + function FriendsFrameFriendButton_OnClick(button) if button == "RightButton" then local name, _, _, _, connected = GetFriendInfo(this:GetID()) BenillaFriendsFrame_ShowDropdown(name, connected) return end SetSelectedFriend(this:GetID()) - BenillaFriendsList_Update() + FriendsList_Update() end - function BenillaFriendsFrameIgnoreButton_OnClick() + function FriendsFrameIgnoreButton_OnClick() SetSelectedIgnore(this:GetID()) - BenillaIgnoreList_Update() + IgnoreList_Update() end - function BenillaFriendsFrameWhoButton_OnClick(button) + function FriendsFrameWhoButton_OnClick(button) local name = getglobal(this:GetName() .. "Name"):GetText() if button == "RightButton" then -- A /who hit is online by construction, so the menu is never gated shut here. BenillaFriendsFrame_ShowDropdown(name, 1) return end - BenillaWhoFrame.selectedWho = this.whoIndex - BenillaWhoFrame.selectedName = name - BenillaWhoList_Update() + WhoFrame.selectedWho = this.whoIndex + WhoFrame.selectedName = name + WhoList_Update() end -- ── The buttons (ref l.714-739) ──────────────────────────────────────────────────────── - function BenillaFriendsFrame_UnIgnore() - local name = GetIgnoreName(BenillaFriendsFrame.selectedIgnore) + function FriendsFrame_UnIgnore() + local name = GetIgnoreName(FriendsFrame.selectedIgnore) if name then DelIgnore(name) end end - function BenillaFriendsFrame_RemoveFriend() - if BenillaFriendsFrame.selectedFriend and BenillaFriendsFrame.selectedFriend > 0 then - RemoveFriend(BenillaFriendsFrame.selectedFriend) + function FriendsFrame_RemoveFriend() + if FriendsFrame.selectedFriend and FriendsFrame.selectedFriend > 0 then + RemoveFriend(FriendsFrame.selectedFriend) end end -- The ref opens the chat edit box prefilled "/w " (l.726-734). benilla's chat edit -- box is app-side, so the same intent goes through `ChatFrame_SendTell`, the whisper-target -- queue the unit popup's WHISPER row already feeds. - function BenillaFriendsFrame_SendMessage() - local name = GetFriendInfo(BenillaFriendsFrame.selectedFriend) + function FriendsFrame_SendMessage() + local name = GetFriendInfo(FriendsFrame.selectedFriend) if name and name ~= "" then ChatFrame_SendTell(name) end end - function BenillaFriendsFrame_GroupInvite() - local name = GetFriendInfo(BenillaFriendsFrame.selectedFriend) + function FriendsFrame_GroupInvite() + local name = GetFriendInfo(FriendsFrame.selectedFriend) if name and name ~= "" then InviteByName(name) end @@ -462,42 +462,42 @@ -- closes the window (the ref's own second branch). function ToggleFriendsFrame(tab) if not tab then - if BenillaFriendsFrame:IsVisible() then - HideUIPanel(BenillaFriendsFrame) + if FriendsFrame:IsVisible() then + HideUIPanel(FriendsFrame) else - ShowUIPanel(BenillaFriendsFrame) + ShowUIPanel(FriendsFrame) end return end - if tab == PanelTemplates_GetSelectedTab(BenillaFriendsFrame) - and BenillaFriendsFrame:IsVisible() then - HideUIPanel(BenillaFriendsFrame) + if tab == PanelTemplates_GetSelectedTab(FriendsFrame) + and FriendsFrame:IsVisible() then + HideUIPanel(FriendsFrame) return end - PanelTemplates_SetTab(BenillaFriendsFrame, tab) - if BenillaFriendsFrame:IsVisible() then - BenillaFriendsFrame_OnShow() + PanelTemplates_SetTab(FriendsFrame, tab) + if FriendsFrame:IsVisible() then + FriendsFrame_OnShow() else - ShowUIPanel(BenillaFriendsFrame) + ShowUIPanel(FriendsFrame) end end function ShowWhoPanel() - PanelTemplates_SetTab(BenillaFriendsFrame, 2) - if BenillaFriendsFrame:IsVisible() then - BenillaFriendsFrame_OnShow() + PanelTemplates_SetTab(FriendsFrame, 2) + if FriendsFrame:IsVisible() then + FriendsFrame_OnShow() else - ShowUIPanel(BenillaFriendsFrame) + ShowUIPanel(FriendsFrame) end end function ShowIgnorePanel() - BenillaFriendsFrame.showFriendsList = nil - PanelTemplates_SetTab(BenillaFriendsFrame, 1) - if BenillaFriendsFrame:IsVisible() then - BenillaFriendsFrame_OnShow() + FriendsFrame.showFriendsList = nil + PanelTemplates_SetTab(FriendsFrame, 1) + if FriendsFrame:IsVisible() then + FriendsFrame_OnShow() else - ShowUIPanel(BenillaFriendsFrame) + ShowUIPanel(FriendsFrame) end end @@ -513,9 +513,9 @@ .. minLevel .. "-" .. (level + 3) end - function BenillaWhoFrameEditBox_OnEnterPressed() - SendWho(BenillaWhoFrameEditBox:GetText()) - BenillaWhoFrameEditBox:ClearFocus() + function WhoFrameEditBox_OnEnterPressed() + SendWho(WhoFrameEditBox:GetText()) + WhoFrameEditBox:ClearFocus() end -- ── The slash bodies (ref ChatFrame.lua SlashCmdList l.1013-1062, verbatim) ──────────── @@ -526,7 +526,7 @@ msg = WhoFrame_GetDefaultWhoCommand() ShowWhoPanel() end - BenillaWhoFrameEditBox:SetText(msg) + WhoFrameEditBox:SetText(msg) SendWho(msg) end @@ -634,7 +634,7 @@ this:RegisterForClicks("LeftButtonUp", "RightButtonUp") - BenillaFriendsFrameFriendButton_OnClick(arg1); PlaySound("igMainMenuOptionCheckBoxOn") + FriendsFrameFriendButton_OnClick(arg1); PlaySound("igMainMenuOptionCheckBoxOn") @@ -649,7 +649,7 @@ - BenillaFriendsFrameIgnoreButton_OnClick(); PlaySound("igMainMenuOptionCheckBoxOn") + FriendsFrameIgnoreButton_OnClick(); PlaySound("igMainMenuOptionCheckBoxOn") @@ -679,7 +679,7 @@ this:RegisterForClicks("LeftButtonUp", "RightButtonUp") - BenillaFriendsFrameWhoButton_OnClick(arg1); PlaySound("igMainMenuOptionCheckBoxOn") + FriendsFrameWhoButton_OnClick(arg1); PlaySound("igMainMenuOptionCheckBoxOn") @@ -727,7 +727,7 @@ - + @@ -739,25 +739,25 @@ - + - + - + - + - + @@ -771,7 +771,7 @@ - - + - - - - - - - - - - - - - - - - + - - self.updateFunc = BenillaFriendsList_Update + + self.updateFunc = FriendsList_Update - BenillaFauxScrollFrame_OnMouseWheel(BenillaFriendsFrameFriendsScrollFrame, arg1) + BenillaFauxScrollFrame_OnMouseWheel(FriendsFrameFriendsScrollFrame, arg1) - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - self.updateFunc = BenillaIgnoreList_Update + + self.updateFunc = IgnoreList_Update - BenillaFauxScrollFrame_OnMouseWheel(BenillaFriendsFrameIgnoreScrollFrame, arg1) + BenillaFauxScrollFrame_OnMouseWheel(FriendsFrameIgnoreScrollFrame, arg1) - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + this:ClearFocus() - BenillaWhoFrameEditBox_OnEnterPressed() + WhoFrameEditBox_OnEnterPressed() this:ClearFocus() - + - - self.updateFunc = BenillaWhoList_Update + + self.updateFunc = WhoList_Update @@ -1140,41 +1140,41 @@ SetWhoToUI(0) SetWhoToUI(1) SetWhoToUI(0) - BenillaFauxScrollFrame_OnMouseWheel(BenillaWhoListScrollFrame, arg1) + BenillaFauxScrollFrame_OnMouseWheel(WhoListScrollFrame, arg1) - - - - BenillaFriendsFrame_OnLoad() - BenillaFriendsFrame_OnShow() - BenillaFriendsFrame_OnHide() - BenillaFriendsFrame_OnEvent() + FriendsFrame_OnLoad() + FriendsFrame_OnShow() + FriendsFrame_OnHide() + FriendsFrame_OnEvent() diff --git a/crates/benilla-app/assets/ui/GameMenuFrame.xml b/crates/benilla-app/assets/ui/GameMenuFrame.xml index 8aefafd2..05a1b225 100644 --- a/crates/benilla-app/assets/ui/GameMenuFrame.xml +++ b/crates/benilla-app/assets/ui/GameMenuFrame.xml @@ -81,9 +81,14 @@ - The Options label stays a literal "Options": 1.12 GlobalStrings has no era GAMEMENU_OPTIONS (checked; its OPTIONS_MENU is "Options Menu", a different string). - The ref frame is `toplevel="true" movable="true" parent="UIParent"`. Dropped: this engine has - no cross-file `parent=` attachment (SkillFrame.xml's header comment), no frame-level raise, - and `movable` is inert in the ref too (GameMenuFrame defines no drag scripts, so it never - actually moves). `frameStrata="DIALOG"` is what puts it over the world UI, and that is kept. + no cross-file `parent=` attachment (SkillFrame.xml's header comment), and `movable` is inert + in the ref too (GameMenuFrame defines no drag scripts, so it never actually moves). + `frameStrata="DIALOG"` is what puts it over the world UI, and that is kept. + **The "no frame-level raise" half of that reason is gone**: the raise law is built + (`script::object::toplevel`, wow-re `ui/scratch/toplevel-raise.md`) and the loader honours + `toplevel="true"`. Re-adding it here is a one-word change and would make the Esc menu come + to the front over any other DIALOG-strata frame it overlaps; left off pending the + director's call on the look, not on the mechanism. --> -