diff --git a/Cargo.lock b/Cargo.lock index c3a427ac..057db491 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,6 +121,18 @@ dependencies = [ "libc", ] +[[package]] +name = "alsa" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c88dbbce13b232b26250e1e2e6ac18b6a891a646b8148285036ebce260ac5c3" +dependencies = [ + "alsa-sys", + "bitflags 2.11.1", + "cfg-if", + "libc", +] + [[package]] name = "alsa-sys" version = "0.3.1" @@ -508,6 +520,7 @@ dependencies = [ "bytemuck", "coreaudio-rs 0.13.0", "cosmic-text", + "cpal 0.17.1", "crossbeam-channel", "fontdb", "half", @@ -523,12 +536,14 @@ dependencies = [ "objc2-foundation 0.2.2", "rand 0.8.6", "raw-window-handle", + "regex", "rtrb", "serde", "smithay-clipboard", "symphonia", "toml", "wgpu", + "windows-sys 0.59.0", ] [[package]] @@ -862,7 +877,7 @@ dependencies = [ "bevy_reflect", "bevy_transform", "coreaudio-sys", - "cpal", + "cpal 0.15.3", "rodio", "tracing", ] @@ -2641,14 +2656,14 @@ version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" dependencies = [ - "alsa", + "alsa 0.9.1", "core-foundation-sys", "coreaudio-rs 0.11.3", "dasp_sample", "jni 0.21.1", "js-sys", "libc", - "mach2", + "mach2 0.4.3", "ndk 0.8.0", "ndk-context", "oboe", @@ -2658,6 +2673,36 @@ dependencies = [ "windows 0.54.0", ] +[[package]] +name = "cpal" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b1f9c7312f19fc2fa12fd7acaf38de54e8320ba10d1a02dcbe21038def51ccb" +dependencies = [ + "alsa 0.10.0", + "coreaudio-rs 0.13.0", + "dasp_sample", + "jni 0.21.1", + "js-sys", + "libc", + "mach2 0.5.0", + "ndk 0.9.0", + "ndk-context", + "num-derive", + "num-traits", + "objc2 0.6.4", + "objc2-audio-toolbox", + "objc2-avf-audio", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows 0.62.2", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -4074,8 +4119,6 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "kira" version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065632c16b39f4c00bc5514de0698474d1b6c36120743a154c78ca27ffc1ffe1" dependencies = [ "atomic-arena", "glam 0.33.2", @@ -4108,17 +4151,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" -[[package]] -name = "lewton" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030" -dependencies = [ - "byteorder", - "ogg", - "tinyvec", -] - [[package]] name = "libc" version = "0.2.186" @@ -4247,6 +4279,15 @@ dependencies = [ "libc", ] +[[package]] +name = "mach2" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1b95cd5421ec55b445b5ae102f5ea0e768de1f82bd3001e11f426c269c3aea" +dependencies = [ + "libc", +] + [[package]] name = "malloc_buf" version = "0.0.6" @@ -4672,6 +4713,16 @@ dependencies = [ "objc2-foundation 0.3.2", ] +[[package]] +name = "objc2-avf-audio" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13a380031deed8e99db00065c45937da434ca987c034e13b87e4441f9e4090be" +dependencies = [ + "objc2 0.6.4", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-cloud-kit" version = "0.2.2" @@ -4706,6 +4757,7 @@ dependencies = [ "objc2 0.6.4", "objc2-core-audio-types", "objc2-core-foundation", + "objc2-foundation 0.3.2", ] [[package]] @@ -4737,7 +4789,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.11.1", + "block2 0.6.2", "dispatch2", + "libc", "objc2 0.6.4", ] @@ -4804,6 +4858,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ "bitflags 2.11.1", + "block2 0.6.2", + "libc", "objc2 0.6.4", "objc2-core-foundation", ] @@ -4969,15 +5025,6 @@ dependencies = [ "nonmax", ] -[[package]] -name = "ogg" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e" -dependencies = [ - "byteorder", -] - [[package]] name = "once_cell" version = "1.21.4" @@ -5639,8 +5686,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7ceb6607dd738c99bc8cb28eff249b7cd5c8ec88b9db96c0608c1480d140fb1" dependencies = [ - "cpal", - "lewton", + "cpal 0.15.3", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d3775ec9..78a166f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,27 @@ authors = ["sam "] # and a workspace default-features choice can't be subtracted from downstream. [workspace.dependencies] anyhow = "1.0.102" -bevy = "0.18.1" +# bevy's `default` is `["2d", "3d", "ui"]`, and every one of those three pulls `audio` +# (= `bevy_audio` + `vorbis`) — so a default bevy compiles rodio, a second cpal, a second ALSA +# binding and an ogg/vorbis decoder into a client that mixes through kira and has had bevy's +# `AudioPlugin` disabled at boot since 0530. This spells the same `default` out with `audio` +# taken away: `2d`/`3d`/`ui` decomposed into the parts they are made of, which is the whole +# union of the three minus that one entry (decision 1932 has the expansion, verified against a +# before/after feature tree). Nothing else in the graph asks for it — avian3d, bevy_egui and +# bevy_transform_interpolation all take bevy with `default-features = false`. +# +# If a future bevy needs another member, add it here by name; do not reach back for `2d`/`3d`/ +# `ui`, which would quietly bring the audio stack with it. +bevy = { version = "0.18.1", default-features = false, features = [ + "default_app", + "default_platform", + "2d_bevy_render", + "3d_bevy_render", + "ui_api", + "ui_bevy_render", + "scene", + "picking", +] } # The render app's raw GPU handles (the WOW_GPU_MS meter's query set): bevy 0.18 does not wrap # wgpu's QuerySet family, so the meter reaches for the same wgpu the workspace already builds. wgpu = "27" @@ -26,18 +46,24 @@ sha1 = "0.10.6" # section stood empty for the project's whole life. # # The one entry below is not a fork of a WoW crate at all. `lua-src` compiles the Lua the client's -# addon VM runs on, and the 1.12 corpus needs one opcode that Lua 5.1 deleted — the iterator-less -# generic-for (`for k, v in someTable do`), which 183 of 218 corpus addons are reached by and which -# is the first session-start error for 60 of them. It is an OPCODE, so no layer above the VM can -# reach it: not a library function, not a global, not a metamethod. +# addon VM runs on, and benilla's Lua has to accept EXACTLY the grammar the 1.12.1 client's Lua +# accepts — no more and no less. Six hunks, all byte-read out of the client's own parser and VM: +# three restore what 5.1 removed (the iterator-less generic-for `for k, v in someTable do`, which +# 183 of 218 corpus addons are reached by; nesting long strings; the constructor's compat +# semicolon), three delete what 5.1 added (`...` as an expression, `#`, `%`). Both directions are +# below the reach of any layer above the VM — an opcode and a grammar are not a library function, +# a global, or a metamethod — and the corpus ASKS about the second direction directly: 170 +# `loadstring` sites compile a vararg expression purely to find out which interpreter they are on. # -# The fork is currently BYTE-IDENTICAL to upstream's 5.1.5 sources, and is landed that way on -# purpose: the pipeline is proven transparent before the behavioural payload goes into it, so that -# when the suite moves, the patch is the only thing that could have moved it. The payload waits on -# an RE answer about what the real client's own Lua does — stock Lua 5.0 is corroboration, not the -# authority. `third_party/lua-src/BENILLA.md` has the current state and the verifying command. +# The fork landed BYTE-IDENTICAL to upstream's 5.1.5 sources on purpose: the pipeline was proven +# transparent before any behavioural payload went into it, so when the suite moved, the patch was +# the only thing that could have moved it. `third_party/lua-src/BENILLA.md` has the current state, +# the per-hunk byte evidence and the verifying command (decisions 1215, 1315, 2101). [patch.crates-io] lua-src = { path = "third_party/lua-src" } +# kira 0.12.1 with one patch: spatial gains and the volume tween evaluated per CHUNK and +# interpolated, not per frame (decision 1945; `third_party/kira/BENILLA.md`). +kira = { path = "third_party/kira" } # Optimize *dependencies* even in dev builds. avian/parry collision math (and wgpu/bevy render) is # unusably slow at opt-level 0 — a plain `cargo run` crawls to <1 fps once physics is doing real work. diff --git a/crates/benilla-adt/src/combined_alpha.rs b/crates/benilla-adt/src/combined_alpha.rs index b2c51a9c..05316818 100644 --- a/crates/benilla-adt/src/combined_alpha.rs +++ b/crates/benilla-adt/src/combined_alpha.rs @@ -24,7 +24,7 @@ impl CombinedAlphaMap { /// encoding width and the 63→64 edge fix (vanilla: `false`, `true`). pub fn new(chunk: &McnkChunk, has_big_alpha: bool, fix_alpha: bool) -> Self { let mut map = vec![0u8; W * W * 4]; - for px in map.chunks_exact_mut(4) { + for px in map.as_chunks_mut::<4>().0 { px[3] = 255; // A unused, set opaque for tool visibility (matches wow-adt) } let mut s = Self { diff --git a/crates/benilla-adt/src/lib.rs b/crates/benilla-adt/src/lib.rs index 13dd79cb..ebee4e03 100644 --- a/crates/benilla-adt/src/lib.rs +++ b/crates/benilla-adt/src/lib.rs @@ -342,14 +342,16 @@ fn split_strings(blob: &[u8]) -> Vec { /// `name` tags the truncation error with the chunk this record list came from (MMID/MWID). fn read_u32_list(data: &[u8], name: &'static str) -> Result> { - data.chunks_exact(4) + data.as_chunks::<4>() + .0 + .iter() .map(|c| c.u32_at(0).ok_or(Error::Truncated(name))) .collect() } fn read_mddf(data: &[u8]) -> Result> { let mut out = Vec::new(); - for r in data.chunks_exact(36) { + for r in data.as_chunks::<36>().0 { out.push(DoodadPlacement { name_id: r.u32_at(0).ok_or(Error::Truncated("MDDF"))?, unique_id: r.u32_at(4).ok_or(Error::Truncated("MDDF"))?, @@ -372,7 +374,7 @@ fn read_mddf(data: &[u8]) -> Result> { fn read_modf(data: &[u8]) -> Result> { let mut out = Vec::new(); - for r in data.chunks_exact(64) { + for r in data.as_chunks::<64>().0 { out.push(WmoPlacement { name_id: r.u32_at(0).ok_or(Error::Truncated("MODF"))?, unique_id: r.u32_at(4).ok_or(Error::Truncated("MODF"))?, @@ -503,7 +505,7 @@ fn read_mcnk(data: &[u8]) -> Result { .filter(|&(_, n)| n > 0) { let mut layers = Vec::new(); - for l in slice(p, n).chunks_exact(16) { + for l in slice(p, n).as_chunks::<16>().0 { layers.push(MclyLayer { texture_id: l.u32_at(0).ok_or(Error::Truncated("MCLY"))?, flags: MclyFlags { diff --git a/crates/benilla-app/Cargo.toml b/crates/benilla-app/Cargo.toml index ab73e9c5..26b841c3 100644 --- a/crates/benilla-app/Cargo.toml +++ b/crates/benilla-app/Cargo.toml @@ -58,6 +58,11 @@ half = "2" # macro plus a no-dependency runtime shim — it adds nothing to the graph at runtime, and it is the # crate everyone uses for this. `assets/ui` is OUR content (MIT/Apache), not Blizzard's. include_dir = "0.7" +# The 1.12 chat filters are PCRE over shipped DBCs (decision 2077; `text_filter`): 2289 profanity +# expressions and 28 spam ones, compiled once at startup and run over every chat line. `RegexSet` is +# exactly the shape that needs — one automaton over the whole list for the "can anything match at +# all" pass — and the crate is already in the tree transitively. +regex = "1" # `getrusage` — whole-process CPU time (all threads), the perf probes' `cpu_ms`/`cpu_pct` metric # (`perf::process_cpu_secs`). Wall-clock fps is unusable as a regression instrument on a machine # running parallel sessions' builds; CPU-per-frame is, and it is also the number the Mac report @@ -99,9 +104,11 @@ cosmic-text = "0.16" # `fontdb` in the graph. fontdb = "0.23" # kira renders the mix; the device it plays through is OURS (`sound::output`, decision 1857) — -# kira's own cpal backend is not enabled, and cpal is out of the graph on our path with it: on -# macOS it could neither report a lost default device nor rebuild on one, and it discarded the -# IO-cycle timestamp the deadline meters need. +# kira's own `cpal` backend is not enabled on any target. On macOS that took cpal out of the graph +# entirely: it could neither report a lost default device nor rebuild on one, and it discarded the +# IO-cycle timestamp the deadline meters need. Off macOS cpal is back (1920) but as OUR device +# layer under the same backend, not as kira's — the ring, the render thread and the meters are the +# same code on every platform. kira = { version = "0.12", default-features = false, features = ["mp3", "wav", "pcm", "adpcm"] } # The realtime-audio allocation tripwire (decision 1857): `assert_no_alloc(|| …)` around the output # IO callback and the render pass aborts a DEBUG build on any allocation inside them, so a @@ -167,3 +174,21 @@ objc2-app-kit = { version = "0.2", features = [ "NSEvent", ] } objc2-foundation = { version = "0.2", features = ["NSArray", "NSData", "NSGeometry"] } + +# Everywhere else: the same device layer over cpal (decision 1920, `sound::output::cpal`). 1857 +# owns the mix-ahead ring, the render thread and the meters on every platform; only the last +# hop — find the default device, open a stream on it, hand back one buffer per cycle — is +# platform code, and off macOS that hop is ALSA/PipeWire, WASAPI or the host's own API. cpal is +# the layer that already speaks all of them; on macOS it is still not in the graph, because +# there its defects (a no-op error callback on the default device, a pinned `DefaultOutput` +# unit, the discarded IO-cycle timestamp) are exactly what 1857 went direct to escape. On an +# unsupported target cpal compiles to its Null host, which reports no device — the same silent +# posture the old `stub.rs` had, without a second file to rot. +[target.'cfg(not(target_os = "macos"))'.dependencies] +cpal = "0.17" + +# Windows: the journal's and the probes' CPU clocks (decision 2219, `perf::clock`) — +# `GetProcessTimes`, `GetThreadTimes` and `GetSystemTimes`, the twins of the `getrusage`, +# `clock_gettime` and `host_statistics64` arms. The version is one the graph already carries. +[target.'cfg(windows)'.dependencies] +windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_System_Threading"] } diff --git a/crates/benilla-app/assets/ui/ActionBar.xml b/crates/benilla-app/assets/ui/ActionBar.xml deleted file mode 100644 index 5bccfd6a..00000000 --- a/crates/benilla-app/assets/ui/ActionBar.xml +++ /dev/null @@ -1,2427 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ActionButton_OnEvent() - BenillaActionButton_OnClick(self) - BenillaActionButton_OnDragStart(self) - BenillaActionButton_OnReceiveDrag(self) - ActionButton_OnUpdate(arg1) - BenillaActionButton_OnEnter(self) - if GameTooltip then GameTooltip:Hide() end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaExpBarOverlay_OnLoad() - - - - - - - BenillaExpBar_OnLoad(self) - BenillaExpBar_OnEvent(self) - BenillaExpBar_OnEnter(self) - BenillaExpBar_OnLeave(self) - ExhaustionTick_OnUpdate(arg1) - - if this:IsShown() and TextStatusBar_OnValueChanged then - TextStatusBar_OnValueChanged() - end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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) - - - - - - - - - - this:RegisterEvent("PLAYER_ENTERING_WORLD") - this:RegisterEvent("BAG_UPDATE") - - MainMenuBar_UpdateKeyRing() - - - - - - - - - - - - - - - - - - - - - - BenillaPerformanceBar_OnLoad(self) - BenillaPerformanceBar_OnUpdate(self, arg1) - - - - - BenillaActionBar_OnLoad(self) - BenillaActionBar_OnEvent(self) - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaActionButton_OnLoad(self, 1) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 2) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 3) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 4) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 5) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 6) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 7) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 8) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 9) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 10) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 11) self.isBonus = 1 - - - - BenillaActionButton_OnLoad(self, 12) self.isBonus = 1 - - - - BenillaBonusBar_OnLoad(self) - BonusActionBar_OnUpdate(arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaWatchBar_OnLoad(self) - BenillaWatchBar_OnEvent(self, event) - BenillaWatchBar_OnShow() - UIParent_ManageFramePositions() - ReputationWatchStatusBarText:Show() - - if not ReputationWatchBar.textLocked then - ReputationWatchStatusBarText:Hide() - end - - - - diff --git a/crates/benilla-app/assets/ui/AuctionFrame.xml b/crates/benilla-app/assets/ui/AuctionFrame.xml deleted file mode 100644 index 48960683..00000000 --- a/crates/benilla-app/assets/ui/AuctionFrame.xml +++ /dev/null @@ -1,2503 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - getglobal(this:GetParent():GetName() .. "Silver"):SetFocus() - getglobal(this:GetParent():GetName() .. "Silver"):SetFocus() - this:ClearFocus() - BenillaAuctionMoneyInput_OnChanged(this) - this:HighlightText(0, 0) - this:HighlightText() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - getglobal(this:GetParent():GetName() .. "Copper"):SetFocus() - getglobal(this:GetParent():GetName() .. "Copper"):SetFocus() - this:ClearFocus() - BenillaAuctionMoneyInput_OnChanged(this) - this:HighlightText(0, 0) - this:HighlightText() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - this:ClearFocus() - BenillaAuctionMoneyInput_OnChanged(this) - this:HighlightText(0, 0) - this:HighlightText() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AuctionFrameBid_OnLoad(self) - AuctionFrameBid_OnShow() - AuctionFrameBid_OnEvent() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/BasicControls.xml b/crates/benilla-app/assets/ui/BasicControls.xml deleted file mode 100644 index 7744d3cd..00000000 --- a/crates/benilla-app/assets/ui/BasicControls.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/benilla-app/assets/ui/BinderConfirm.xml b/crates/benilla-app/assets/ui/BinderConfirm.xml deleted file mode 100644 index f9f8dc9f..00000000 --- a/crates/benilla-app/assets/ui/BinderConfirm.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - self:RegisterEvent("CONFIRM_BINDER") - - BenillaBinderConfirmDriver_OnEvent() - - - diff --git a/crates/benilla-app/assets/ui/CastingBar.xml b/crates/benilla-app/assets/ui/CastingBar.xml deleted file mode 100644 index 954627a2..00000000 --- a/crates/benilla-app/assets/ui/CastingBar.xml +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - diff --git a/crates/benilla-app/assets/ui/ChatFrame.xml b/crates/benilla-app/assets/ui/ChatFrame.xml deleted file mode 100644 index dbc4139a..00000000 --- a/crates/benilla-app/assets/ui/ChatFrame.xml +++ /dev/null @@ -1,2317 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if this:GetID() == 1 then - this:RegisterEvent("EXECUTE_CHAT_LINE") - this:RegisterEvent("UPDATE_CHAT_WINDOWS") - end - -- `isDocked` is NOT set here, and that is the reference's own shape: the flag is - -- `FCF_DockFrame`'s to write (FloatingChatFrame.lua:1153), and the chat-cache - -- load is what calls it — this file's trailing seeding loop, which reads - -- `GetChatWindowInfo`'s `docked` position exactly as `FloatingChatFrame_Update` - -- (l.34-70) does. - -- - -- It briefly lived here (1712), gated to ids 1 and 2, while there was no dock - -- model to own it. There is one now (1714), and leaving the assignment here would - -- break it outright: `FCF_DockFrame` early-returns on an already-docked frame, so - -- a pre-set flag would keep both windows out of `DOCKED_CHAT_FRAMES` — docked - -- according to the flag, absent from the list every dock verb walks. - - - if event == "EXECUTE_CHAT_LINE" then - SubmitChatInput(arg1) - elseif event == "UPDATE_CHAT_WINDOWS" then - BenillaFCF_LoadWindowLooks() - end - - - ChatFrame_OnUpdate(arg1) - - - -- WoW wheel convention: +1 per notch up, -1 down. Up = older messages. - if arg1 > 0 then this:ScrollUp() else this:ScrollDown() end - - - BenillaChatFrame_DismissCursor(arg1) - - - SetItemRef(arg1, arg2, arg3) - - - - FCF_StartMove(this) - - - FCF_StopMove(this) - - - - - - - - - - - - - - - - - - - - - - - - FCF_OnUpdate(arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaOnEmoteMenuLoad(BenillaEmoteMenuList) - - - - - - - BenillaOnEmoteMenuLoad(BenillaVoiceMacroList) - - - - - - - ChatMenu_OnLoad() - - - UIMenu_OnShow() - EmoteMenu:Hide() - VoiceMacroMenu:Hide() - 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) - - - - - - - - - - - - diff --git a/crates/benilla-app/assets/ui/CombatText.xml b/crates/benilla-app/assets/ui/CombatText.xml deleted file mode 100644 index 76ab35d8..00000000 --- a/crates/benilla-app/assets/ui/CombatText.xml +++ /dev/null @@ -1,723 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CombatText_OnLoad() - CombatText_OnEvent(event) - CombatText_OnUpdate(arg1) - - - diff --git a/crates/benilla-app/assets/ui/ConfirmSummon.xml b/crates/benilla-app/assets/ui/ConfirmSummon.xml deleted file mode 100644 index 0232d3c2..00000000 --- a/crates/benilla-app/assets/ui/ConfirmSummon.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - self:RegisterEvent("CONFIRM_SUMMON") - - BenillaConfirmSummonDriver_OnEvent() - - - diff --git a/crates/benilla-app/assets/ui/ContainerFrameAdapters.xml b/crates/benilla-app/assets/ui/ContainerFrameAdapters.xml index bc879b6b..d2b71067 100644 --- a/crates/benilla-app/assets/ui/ContainerFrameAdapters.xml +++ b/crates/benilla-app/assets/ui/ContainerFrameAdapters.xml @@ -45,12 +45,6 @@ on — hovering an ordinary bag slot — runs the real client's code, unedited. ── Named, not hidden: what still does not work through the sourced files ──────────────────── - · `MerchantItemButton_OnClick`. The reference's `ContainerFrameItemButton_OnClick` closes its - shift-right-click-at-a-vendor arm with a `SplitStack` closure that calls that global, and - benilla's merchant window publishes `BenillaMerchantItem_OnClick` instead. Confirming a stack - split with a vendor open therefore raises. That is the same "a Benilla name shadows the - reference's" class this whole seam exists to close, one window over, and it is left loud - rather than guarded (1203): the fix is to publish the merchant global, not to hide the call. · `REPAIR_COST` is read by the reference's repair-mode arm. It is a `GlobalStrings.lua` key and this client sources that file too, so it resolves at runtime — and the arm is unreachable today regardless, since `GameTooltip:SetBagItem`'s repairCost is an INTERIM 0. @@ -96,299 +90,74 @@ refItemButtonOnEnter(button) end - -- ══ Re-publishing the three bag verbs 0561 shadows, and why it is HERE ═════════════ + -- ══ The three bag verbs benilla answers differently (decisions 0561 + 1751) ═════════ -- - -- `OpenBackpack`, `CloseBackpack` and `CloseAllBags` are all defined by the sourced - -- `ContainerFrame.lua` (l.187-217, l.702-707) — and benilla answers all three differently, - -- for one reason: **0561, the director's call that a window opening your bags opens EVERY - -- equipped bag**, not just the backpack. The vendor, bank, mail and trade windows call - -- `OpenBackpack` from their OnShow so your bags come up with them and you can sell or - -- deposit from one. + -- `CloseAllBags`, `OpenBackpack` and `CloseBackpack` all exist in the sourced + -- `ContainerFrame.lua` too, and benilla's differ for one reason, not three: **0561, the + -- director's call that a window which opens your bags opens EVERY equipped bag**, not just + -- the backpack. The vendor/bank/mail/trade windows call `OpenBackpack` from their OnShow so + -- your bags come up with them and you can sell or deposit from one; the reference's own + -- body touches bag 0 alone. `CloseBackpack` is its inverse and has to match it, and + -- `CloseAllBags` is the same family's unconditional form. -- - -- The bodies live in `UiPanels.xml`, because every window that calls them is loaded by - -- harnesses that have no bag stack at all, and a nil `OpenBackpack` in a merchant test is - -- a nil for no reason. But UiPanels is manifest entry 7 and the reference's container file - -- is entry 46, so **its publications lose the collision** — the reference's bodies land on - -- top and the vendor silently stops opening your bags. That is not hypothetical: it is - -- what shipped for the length of one session before a test caught it. + -- **The `Benilla*` names, and the publish under them, are load ORDER** (1751). Order + -- decides every collision and the manifest is the order: this file loads after the + -- reference's `ContainerFrame.xml`, so the three publishes at the foot are the ones that + -- stand. The bodies lived in our UIParent.lua counterpart until 1988 retired it — a + -- harness with no bag stack now meets the loader's stand-ins for the three names + -- (`test_ui::UIPARENT_STAND_INS`), not a nil. -- - -- So the bodies stay where their callers can reach them, under `Benilla*` names that - -- nothing overwrites, and this file — entry 49, after the reference's — puts them back on - -- the reference's names. Three lines, and they are the whole of the fix. + -- What CHANGED with the swap is only the plumbing: these used to walk five benilla windows + -- by name and stash `wasOpen` on each frame. The windows are the reference's recycled + -- `ContainerFrame1..12` now — frame N is a different bag every time it opens — so the + -- was-open memory is keyed by BAG ID, and every open and close goes through the + -- reference's own `OpenBag`/`CloseBag`/`IsBagOpen` rather than a raw Show/Hide. That buys + -- the reference's own guards for free (OpenBag's CanOpenPanels + NotWhileDeadError, + -- ToggleBag's `size > 0`) and means an addon replacing those verbs is honoured here too. + BENILLA_BAG_WAS_OPEN = {} + + -- The UNCONDITIONAL close, called by ShowUIPanel's native-center branch above: a centre + -- frame takes the whole screen, so nothing is being "restored afterwards" the way a vendor + -- window restores the bags it opened, and the was-open memory is deliberately ignored. + -- Range 0..NUM_CONTAINER_FRAMES rather than the old five names — the reference's own + -- CloseAllBags covers the bank bags too (l.702-707), and now so does this. + function BenillaCloseAllBags() + for bagId = 0, (NUM_CONTAINER_FRAMES or -1) do + CloseBag(bagId) + end + end + + -- OpenBackpack — 0561's all-bags form. A bag already open is REMEMBERED and left alone, so + -- the paired CloseBackpack does not close a window the player opened themselves; that + -- memory is the reference's own `backpackWasOpen`, one entry per bag instead of one flag. + function BenillaOpenBackpack() + for bagId = 0, (NUM_BAG_FRAMES or -1) do + -- The backpack always exists; an equipped-bag window only when a bag is in the + -- slot — `OpenBag` makes the same test itself, but the memory has to agree with it. + if bagId == 0 or GetContainerNumSlots(bagId) > 0 then + if IsBagOpen(bagId) then + BENILLA_BAG_WAS_OPEN[bagId] = 1 + else + BENILLA_BAG_WAS_OPEN[bagId] = nil + OpenBag(bagId) + end + end + end + end + + function BenillaCloseBackpack() + for bagId = 0, (NUM_BAG_FRAMES or -1) do + if not BENILLA_BAG_WAS_OPEN[bagId] then + CloseBag(bagId) + end + end + end + + -- The publish — after the reference's container file, so these are the definitions that + -- stand (the stock `ShowUIPanel` calls `CloseAllBags` and the vendor's OnShow + -- `OpenBackpack`, and they reach 0561's bodies). OpenBackpack = BenillaOpenBackpack CloseBackpack = BenillaCloseBackpack CloseAllBags = BenillaCloseAllBags - - -- ══ THE ITEM-PUSH DROP CARD, over the reference's own bag bar (decision 0887) ═════════ - -- - -- The bar is `Interface\FrameXML\MainMenuBarBagButtons.xml` now (1751 window 3), and its - -- `ItemAnimTemplate` is a `` playing `Interface\ItemAnimations\ForcedBackpackItem.mdx`. - -- **This engine's `` holds the scene the Lua API reads and writes but draws no - -- pixels** (`script/modelframe.rs` — the pane is the app renderer's job and no renderer - -- claims a FrameXML model), so those six frames load, register, and animate nothing. - -- - -- That is a genuine engine difference, which is the one thing 1751 §2 keeps an adapter - -- for. So the reference's file is sourced unedited — its Models exist and are harmless — - -- and the card the player actually sees is built HERE, as a sibling Frame + Texture on the - -- same six buttons, driven by the model's OWN keyframes read out of the shipped .m2. The - -- bodies below moved verbatim from the deleted `BagFrame.xml`; every number in them is - -- byte-derived and the comments carry their provenance. - -- - -- ONE THING CHANGED IN THE MOVE, and it is the reason the swap needed thought at all. - -- `ItemAnim_OnEvent` matches on `this:GetParent():GetID()`, which for a bag button is its - -- INVENTORY-slot id (20..23, via `GetInventorySlotInfo`). benilla used to translate - -- `ITEM_PUSH`'s `arg1` into its own container vocabulary (1..4) because the old bar was - -- keyed that way, and against the reference's body that comparison is false for every bag - -- — four cards that would simply never have played, with nothing raising. The fix was not - -- to adapt the reference: `ui_loot.rs`'s `push_container` stopped translating and now emits - -- `0x491bb5`'s selector verbatim, which is what addons expect too. So the id a card matches - -- on is `button:GetID()`, exactly as the reference's own body reads it. - -- ── The item-push drop animation (decision 0887) ───────────────────────────────────────── - -- An item lands in a bag: its icon pops in above the bag bar, hangs there, then falls into - -- the button that took it and shrinks away. ref ItemAnim (MainMenuBarBagButtons.xml l.4-16 + - -- .lua l.68-80, .lua l.92-94): each bag button owns a hidden child that, on ITEM_PUSH - -- naming its own container, swaps in the pushed item's icon, rewinds to sequence time 0 and - -- shows itself; OnAnimFinished hides it again. A second push on the same button RESTARTS it - -- (SetSequenceTime(0,0)); pushes into different bags run independently. That is exactly the - -- machine below, with the reference's ITEM_PUSH `arg1` translated from its inventory-slot - -- vocabulary (20..23) into ours (bagId 1..4) app-side — ui_loot.rs `push_container` carries - -- the byte-verified selector. - -- - -- The reference's is a playing Interface\ItemAnimations\ForcedBackpackItem.mdx — a - -- single 4-vertex quad on one animated bone, i.e. a 2D icon card with keyframed scale, alpha - -- and offset. benilla has no Model widget (decision 0137's Cooldown took the same posture: - -- model the mechanism, let our own renderer draw it), so it is a Texture driven by the - -- model's OWN tracks, read out of the shipped .m2 with `benilla-extract m2anim`/`m2bones`: - -- - -- sequence 0, CLAMP (plays once), duration 1.000 s - -- texture-weight (alpha) 0.000→0.0 0.133→1.0 0.267→1.0 1.000→0.0 linear - -- bone 0 scale 0.000→1.0 0.133→1.2 0.267→1.0 1.000→0.014 linear - -- bone 0 translation 0.000→(0,0) 0.500→(0,0) 1.000→(+0.010,-0.040) - -- the quad itself: 0.03 x 0.03 model units, blend Alpha, unlit, no depth write - -- - -- So: fade in over the first 133 ms while swelling to 1.2x; settle back to full size by - -- 267 ms; from there dwindle and fade continuously for the remaining 733 ms — while the - -- POSITION holds until the half-second and only then falls. The three tracks deliberately - -- do not share a schedule: the card is already down to ~0.69 size and ~0.68 alpha when it - -- starts moving, so the drop reads as the icon being drawn into the bag rather than as a - -- solid tile sliding. Those numbers are the file's, not ours. - -- - -- THE MODEL-UNIT → PIXEL SCALE is no longer ours to calibrate: the widget's - -- projection is RE-recorded now (wow-re `system/ui/scratch/modelframe-animation-clock.md`, - -- dispatched over the pet bar's B228 and folded back with it). The ortho leg gives - -- - -- px per model unit = (5/3) * modelScale * layoutScale * screenHeightPx - -- - -- which in FrameXML units is **1280 * modelScale * layoutScale**, aspect- and - -- resolution-independent, with the model ORIGIN at the frame rect's bottom-left. The ref's - -- `ItemAnimTemplate` (MainMenuBarBagButtons.xml:4) carries **no `scale` attribute**, so - -- modelScale is 1 and the constant is a flat 1280. Decision 0887's named gap is closed. - -- - -- This REPLACES a back-fit, and the back-fit is worth naming because it looked like - -- evidence. The old 1200 came from assuming CooldownFrameTemplate's 0.04-unit sweep - -- *exactly* covers a 36 px action button at its scale="0.75" (⇒ K = 1200). The assumption - -- is the error: at the real projection that sweep is 0.04 · 1280 · 0.75 = **38.4 px**, so - -- it overhangs its button by 6.7% rather than fitting it — exactly as the autocast shine's - -- 30.72 px square overhangs its 30 px button. Solving against a wrong premise produced a - -- number that then "cross-checked" against a second model derived the same wrong way, and - -- both files cited the agreement as the reason to trust it. - -- - -- Everything below is the model's own ratios times this constant, so the correction lands - -- in one place and the animation stays in proportion. - BENILLA_ITEM_PUSH_PX_PER_UNIT = 1280 - BENILLA_ITEM_PUSH_DURATION = 1.0 - - -- ── The widget rect, and why the card is not placed against the button ───────────────── - -- A `` with no `` and no `setAllPoints` takes its rect from the **M2 header - -- bounding box** (`MD20+0xB4`, max−min per axis), consumed RAW as layout units — unlike - -- CSimpleTexture's texel fallback, there is no AbsDimension conversion. So the ref's - -- ItemAnim widget is **42.41 x 124.72**, nothing like the 36-square everyone assumes from - -- looking at the XML, and **model-space (0,0,0) lands on that rect's BOTTOM-LEFT corner**. - -- (wow-re `system/ui/scratch/modelframe-implicit-size-law.md`, §5-cross-checked: vtable - -- 0x81c5d8 +0x1c/+0x20 -> 0x76d080/0x76d0d0, bbox source 0x713640 at `713661 add esi,0xb4`. - -- The one worker who read `MD20+0xD0` — the VertexBox — got an all-zero box and concluded - -- the widget was degenerate; that wrong premise is exactly what the pair round exists to - -- catch, and it is why this looked unresolvable in 0887.) - -- - -- That rect is the whole reason this animation reads the way it does: it stands 124.72 tall - -- off the button's own bottom edge, so the card's travel band reaches **54 px above the - -- button's top**. Decision 0887 could not know that and placed the card against the - -- button's CENTER instead, which is what put it in the wrong place in x and gave it no - -- horizontal drift at all. - BENILLA_ITEM_PUSH_FRAME_W = 42.41 - BENILLA_ITEM_PUSH_FRAME_H = 124.72 - -- Where that rect hangs off the button: the ref anchors the widget's BOTTOMRIGHT to the - -- button's, 10 in from the right for the five bag buttons and flush (0) for the keyring — - -- MainMenuBarBagButtons.xml l.19-27 (BagSlotButtonTemplate) and l.152-160 (KeyRingButton). - -- Per-button, so it is an OnLoad argument, not a constant. - BENILLA_ITEM_PUSH_ANCHOR_X = -10 - - -- ── The model's own numbers, unrounded ──────────────────────────────────────────────── - -- Every one of these was rounded in 0887 and every rounding moved the card. The quad span - -- read as 0.03 (it is 0.0288 — a 4% size error), and the translation as (0.010, -0.040) - -- (which alone accounts for half a pixel of the landing point). - -- - -- The bone transform is `v' = pivot + T(t) + S(t) * (v - pivot)` — three wow-re workers - -- derived that independently in three matrix conventions and agreed. The pivot - -- (M2CompBone+0x60) is NOT the quad's centre: it sits 0.23 px right and 0.07 px above it, - -- so the card shrinks *almost* in place and drifts a fifth of a pixel doing it. Keeping - -- the pivot as its own term rather than folding it into the centre is what makes this - -- reproduce the reference exactly at all three sampled times instead of nearly. - -- Bone 0's ROTATION track is empty (nKeys = 0), so there is no roll to model. - BENILLA_ITEM_PUSH_PIVOT_X = 0.017580900341272354 - BENILLA_ITEM_PUSH_PIVOT_Y = 0.053958501666784286 - BENILLA_ITEM_PUSH_QUAD_X = 0.017400000942870975 - BENILLA_ITEM_PUSH_QUAD_Y = 0.053900001570582390 - BENILLA_ITEM_PUSH_QUAD_SPAN = 0.028800001833587885 - - -- {time, value} keyframes, linear between (M2 track interpolation 1) — the file's own keys, - -- at full precision. The three tracks keep DIFFERENT schedules and that is the whole feel: - -- the card fades up while swelling to 1.2x over 133 ms, settles back to full size at - -- 267 ms, then dwindles and fades *continuously* for the remaining 733 ms — while its - -- position holds until the half second and only then falls. So it is already at ~0.69 size - -- and ~0.68 alpha when it starts to move, and it is invisible by the time it lands. - BENILLA_ITEM_PUSH_ALPHA = { {0.000, 0.0}, {0.133, 1.0}, {0.267, 1.0}, {1.000, 0.0} } - BENILLA_ITEM_PUSH_SCALE = { {0.000, 1.0}, {0.133, 1.2000000476837158}, {0.267, 1.0}, {1.000, 0.01441549975425005} } - -- Translation is per-AXIS: the card falls 51.4 px and drifts 13.3 px RIGHT, so one shared - -- 0..1 "drop" curve (0887's shape) cannot express it — the old code had no horizontal term - -- at all and moved the card the wrong way in x when it inferred one. - BENILLA_ITEM_PUSH_TRANS_X = { {0.000, 0.0}, {0.500, 0.0}, {1.000, 0.010394600220024586} } - BENILLA_ITEM_PUSH_TRANS_Y = { {0.000, 0.0}, {0.500, 0.0}, {1.000, -0.040167398750782013} } - - -- Sample a {time, value} keyframe list at `t`, linear between keys, clamped at both ends - -- (the M2 sampler's own shape for a CLAMP sequence). - function BenillaItemPushAnim_Sample(track, t) - local last = table.getn(track) - if t <= track[1][1] then return track[1][2] end - for i = 2, last do - local key = track[i] - if t <= key[1] then - local prev = track[i - 1] - local span = key[1] - prev[1] - if span <= 0 then return key[2] end - return prev[2] + (key[2] - prev[2]) * (t - prev[1]) / span - end - end - return track[last][2] - end - - -- Place/size/fade the card for the current clock, from the model's own transform. - -- - -- The card's centre in MODEL space is `pivot + T(t) + S(t)*(quadCentre - pivot)`; times the - -- projection constant that is its offset in layout units from the model origin, which is - -- the widget rect's bottom-left corner. The rect's own BOTTOMRIGHT hangs off the button's, - -- so the card is placed against the BUTTON'S BOTTOMRIGHT — never its centre — and the - -- frame width is what converts between the two. - -- - -- On screen: a button-sized card appears with its bottom edge ~13.6 px ABOVE the button's - -- top, pops to 1.2x and back while fading in, hangs there through the first half second, - -- then falls down-and-right INTO the button, shrinking to a half-pixel point at its centre - -- as it fades out. Reproduces the reference at t = 0, 0.133 and 1.0 to the hundredth of a - -- pixel (`modelframe-implicit-size-law.md` §3's table). - -- - -- NOT modelled, deliberately, and both are named in the record: the reference's widget - -- CLIPS the card to its own rect, which shaves 1.94 px off the right edge at the 1.2x peak - -- **at 4:3 only** (16:10 and 16:9 clear it); and the widget clears the depth buffer inside - -- that 124.72-tall rect every paint. benilla draws this as a Texture, not a Model, so it - -- inherits neither — reproducing an aspect-conditional sliver would be hard-coding a - -- rendering artefact rather than modelling the mechanism that causes it. - function BenillaItemPushAnim_Paint(anim) - local t = anim.elapsed - local k = BENILLA_ITEM_PUSH_PX_PER_UNIT - local scale = BenillaItemPushAnim_Sample(BENILLA_ITEM_PUSH_SCALE, t) - local size = BENILLA_ITEM_PUSH_QUAD_SPAN * scale * k - local cx = (BENILLA_ITEM_PUSH_PIVOT_X - + BenillaItemPushAnim_Sample(BENILLA_ITEM_PUSH_TRANS_X, t) - + scale * (BENILLA_ITEM_PUSH_QUAD_X - BENILLA_ITEM_PUSH_PIVOT_X)) * k - local cy = (BENILLA_ITEM_PUSH_PIVOT_Y - + BenillaItemPushAnim_Sample(BENILLA_ITEM_PUSH_TRANS_Y, t) - + scale * (BENILLA_ITEM_PUSH_QUAD_Y - BENILLA_ITEM_PUSH_PIVOT_Y)) * k - anim:SetWidth(size) - anim:SetHeight(size) - anim:SetPoint("CENTER", anim:GetParent(), "BOTTOMRIGHT", - anim.anchorX - BENILLA_ITEM_PUSH_FRAME_W + cx, cy) - anim:SetAlpha(BenillaItemPushAnim_Sample(BENILLA_ITEM_PUSH_ALPHA, t)) - end - - -- ref ItemAnim_OnLoad (l.68-70): the card listens for ITEM_PUSH and nothing else. It is - -- authored hidden, so it costs no OnUpdate until a push shows it (events reach hidden - -- frames; OnUpdate does not — the reference's own split). - function BenillaItemPushAnim_OnLoad(anim, containerId, anchorX) - anim.containerId = containerId - -- The widget's own offset from the button's BOTTOMRIGHT: -10 for the five bag buttons, - -- flush 0 for the keyring (the ref's two different anchors — see the constant block). - anim.anchorX = anchorX or BENILLA_ITEM_PUSH_ANCHOR_X - anim.icon = anim.icon or getglobal(anim:GetName() .. "Icon") - anim.elapsed = 0 - anim:RegisterEvent("ITEM_PUSH") - end - - -- ref ItemAnim_OnEvent (l.72-80): `if this:GetParent():GetID() == arg1`, then - -- ReplaceIconTexture(arg2) / SetSequence(0) / SetSequenceTime(0,0) / Show. A push into a bag - -- with no button (a bank bag) matches nothing and animates nowhere, there and here. - function BenillaItemPushAnim_OnEvent(anim) - if arg1 ~= anim.containerId then return end - anim.icon:SetTexture(arg2) - anim.elapsed = 0 - -- Seat the card above its button rather than at load: the bag bar's own level is set in - -- the BUTTON's OnLoad (BenillaActionBarArt_SeatAbove), which the loader may run after - -- this child exists. Re-deriving it per push is one call and can never read it stale. - anim:SetFrameLevel(anim:GetParent():GetFrameLevel() + 1) - BenillaItemPushAnim_Paint(anim) - anim:Show() - end - - -- The CLAMP sequence's end is the ref's OnAnimFinished → this:Hide() (l.92-94). - function BenillaItemPushAnim_OnUpdate(anim, elapsed) - anim.elapsed = anim.elapsed + (elapsed or 0) - if anim.elapsed >= BENILLA_ITEM_PUSH_DURATION then - anim:Hide() - return - end - BenillaItemPushAnim_Paint(anim) - end - - -- The six buttons and the offset each one's card hangs at, read off the reference's own - -- anchors: BOTTOMRIGHT -10 for the five bag buttons (`BagSlotButtonTemplate` l.19-27 and - -- `MainMenuBarBackpackButton` l.69-77), flush 0 for the keyring (l.152-160). - BENILLA_ITEM_PUSH_BUTTONS = { - { "MainMenuBarBackpackButton", -10 }, - { "CharacterBag0Slot", -10 }, - { "CharacterBag1Slot", -10 }, - { "CharacterBag2Slot", -10 }, - { "CharacterBag3Slot", -10 }, - { "KeyRingButton", 0 }, - } - - -- Build one button's card. Authored hidden, so it costs no OnUpdate until a push shows it - -- — the reference's own split (events reach hidden frames, OnUpdate does not). - -- - -- Named `$parentBenillaItemPush` rather than `$parentItemAnim`: the reference's Model - -- already owns that name on every one of these buttons, and an addon that reaches for it - -- must find the reference's frame, not ours. - function BenillaItemPushAnim_Attach(button, anchorX) - local anim = CreateFrame("Frame", button:GetName() .. "BenillaItemPush", button) - anim:Hide() - anim:SetWidth(36) - anim:SetHeight(36) - anim:SetPoint("CENTER", button, "CENTER", 0, 0) - anim.icon = anim:CreateTexture(anim:GetName() .. "Icon", "OVERLAY") - anim.icon:SetAllPoints(anim) - BenillaItemPushAnim_OnLoad(anim, button:GetID(), anchorX) - anim:SetScript("OnEvent", function() BenillaItemPushAnim_OnEvent(this) end) - anim:SetScript("OnUpdate", function() BenillaItemPushAnim_OnUpdate(this, arg1) end) - return anim - end - - -- At load, because the bar is entry 48 and this file is entry 50 — every button exists and - -- has run its own OnLoad, so `GetID()` is already the reference's. A button that is absent - -- (a harness that loaded no bar) is skipped rather than raising: the card is a flourish, - -- and a missing bar is not this file's error to report. - for _, entry in ipairs(BENILLA_ITEM_PUSH_BUTTONS) do - local button = getglobal(entry[1]) - if button then - BenillaItemPushAnim_Attach(button, entry[2]) - end - end ]]> diff --git a/crates/benilla-app/assets/ui/Cooldown.xml b/crates/benilla-app/assets/ui/Cooldown.xml deleted file mode 100644 index d106f15b..00000000 --- a/crates/benilla-app/assets/ui/Cooldown.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - diff --git a/crates/benilla-app/assets/ui/CraftFrame.xml b/crates/benilla-app/assets/ui/CraftFrame.xml deleted file mode 100644 index e36f41cd..00000000 --- a/crates/benilla-app/assets/ui/CraftFrame.xml +++ /dev/null @@ -1,965 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaCraftFrame_OnLoad(self) - BenillaCraftFrame_OnEvent(self) - BenillaCraftFrame_OnMouseWheel(arg1) - PlaySound("igCharacterInfoOpen") - CloseCraft(); PlaySound("igCharacterInfoClose") - - - diff --git a/crates/benilla-app/assets/ui/DeathFrame.xml b/crates/benilla-app/assets/ui/DeathFrame.xml deleted file mode 100644 index a00d638d..00000000 --- a/crates/benilla-app/assets/ui/DeathFrame.xml +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - - - - self:RegisterEvent("PLAYER_DEAD") - self:RegisterEvent("PLAYER_ALIVE") - self:RegisterEvent("PLAYER_UNGHOST") - self:RegisterEvent("RESURRECT_REQUEST") - self:RegisterEvent("CONFIRM_XP_LOSS") - self:RegisterEvent("CORPSE_IN_RANGE") - self:RegisterEvent("CORPSE_IN_INSTANCE") - self:RegisterEvent("CORPSE_OUT_OF_RANGE") - - BenillaDeathDriver_OnEvent() - - - 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/DuelFrame.xml b/crates/benilla-app/assets/ui/DuelFrame.xml deleted file mode 100644 index 59177c3c..00000000 --- a/crates/benilla-app/assets/ui/DuelFrame.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - self:RegisterEvent("DUEL_REQUESTED") - self:RegisterEvent("DUEL_OUTOFBOUNDS") - self:RegisterEvent("DUEL_INBOUNDS") - self:RegisterEvent("DUEL_FINISHED") - - BenillaDuelDriver_OnEvent() - - - diff --git a/crates/benilla-app/assets/ui/EnchantConfirm.xml b/crates/benilla-app/assets/ui/EnchantConfirm.xml deleted file mode 100644 index 0cdcfaa1..00000000 --- a/crates/benilla-app/assets/ui/EnchantConfirm.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - self:RegisterEvent("BIND_ENCHANT") - self:RegisterEvent("REPLACE_ENCHANT") - self:RegisterEvent("CURRENT_SPELL_CAST_CHANGED") - - BenillaEnchantConfirmDriver_OnEvent() - - - diff --git a/crates/benilla-app/assets/ui/Fonts.xml b/crates/benilla-app/assets/ui/Fonts.xml deleted file mode 100644 index 1996af64..00000000 --- a/crates/benilla-app/assets/ui/Fonts.xml +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/benilla-app/assets/ui/FriendsFrame.xml b/crates/benilla-app/assets/ui/FriendsFrame.xml deleted file mode 100644 index 0097d406..00000000 --- a/crates/benilla-app/assets/ui/FriendsFrame.xml +++ /dev/null @@ -1,3385 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaGuildRankCheckbox_OnClick(self) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ScrollFrame_OnLoad() - this.updateFunc = FriendsList_Update - - - - - BenillaFauxScrollFrame_OnMouseWheel(FriendsFrameFriendsScrollFrame, arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ScrollFrame_OnLoad() - this.updateFunc = IgnoreList_Update - - - - - BenillaFauxScrollFrame_OnMouseWheel(FriendsFrameIgnoreScrollFrame, arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - this:ClearFocus() - WhoFrameEditBox_OnEnterPressed() - this:ClearFocus() - - - - - - - - - - ScrollFrame_OnLoad() - this.updateFunc = WhoList_Update - - - - - - SetWhoToUI(0) - SetWhoToUI(1) - SetWhoToUI(0) - BenillaFauxScrollFrame_OnMouseWheel(WhoListScrollFrame, arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RegisterForSave("SHOW_OFFLINE_GUILD_MEMBERS") - this:RegisterEvent("VARIABLES_LOADED") - - - if event == "VARIABLES_LOADED" then - SetGuildRosterShowOffline(SHOW_OFFLINE_GUILD_MEMBERS) - this:SetChecked(GetGuildRosterShowOffline()) - end - - - BenillaGuildOfflineToggle_OnClick(self:GetChecked()) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ScrollFrame_OnLoad() - this.updateFunc = GuildStatus_Update - - - - - - - - - - - - - - - - - GuildRoster() - BenillaGuild_HideSatellitesExcept("GuildInfoFrame") - BenillaFauxScrollFrame_OnMouseWheel(GuildListScrollFrame, arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GuildControlPopupFrameDropDown_OnLoad() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - this:SetText(GuildControlGetRankName(1)) - this:ClearFocus() - - GuildControlPopup_MarkDirty() - - self:ClearFocus() - GuildControlPopup_MarkDirty() - - this:ClearFocus() - - - - - - GuildControlPopupFrame_OnLoad() - GuildControlPopupFrame_OnShow() - GuildControlPopupFrame_OnHide() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GuildInfoFrame_ClaimFocus() - GuildInfoFrame_ClaimFocus() - - - - - - this:ClearFocus() - - GuildInfoEditBox_FollowCaret(self) - - - - - - - - BenillaGuildPane_TooltipBackdrop(self) - GuildInfoFrame_Update() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaGuildPane_TooltipBackdrop(self, 0.5, 0.25) - StaticPopup_Show("SET_GUILDPLAYERNOTE") - - - - - - - - - - - - - - - - - - - - BenillaGuildPane_TooltipBackdrop(self, 0.5, 0.25) - StaticPopup_Show("SET_GUILDOFFICERNOTE") - - - - - - - - - - - - - - - FriendsFrame_OnLoad() - FriendsFrame_OnShow() - FriendsFrame_OnHide() - FriendsFrame_OnEvent() - - - - - - - - - - this:RegisterEvent("GUILD_INVITE_REQUEST") - this:RegisterEvent("GUILD_INVITE_CANCEL") - - BenillaGuildInviteDriver_OnEvent() - - - diff --git a/crates/benilla-app/assets/ui/GameMenuFrame.xml b/crates/benilla-app/assets/ui/GameMenuFrame.xml index 11e68d61..deec951e 100644 --- a/crates/benilla-app/assets/ui/GameMenuFrame.xml +++ b/crates/benilla-app/assets/ui/GameMenuFrame.xml @@ -2,7 +2,7 @@ - - - - - - - - - - - diff --git a/crates/benilla-app/assets/ui/OptionsFrameTemplates.xml b/crates/benilla-app/assets/ui/OptionsFrameTemplates.xml deleted file mode 100644 index 223ff8bd..00000000 --- a/crates/benilla-app/assets/ui/OptionsFrameTemplates.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - diff --git a/crates/benilla-app/assets/ui/PetActionBar.xml b/crates/benilla-app/assets/ui/PetActionBar.xml deleted file mode 100644 index ef099474..00000000 --- a/crates/benilla-app/assets/ui/PetActionBar.xml +++ /dev/null @@ -1,558 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PetActionButton_OnClick(arg1) - PetActionButton_OnDragStart() - PetActionButton_OnReceiveDrag() - PetActionButton_OnEnter() - PetActionButton_OnLeave() - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaPetActionButton_OnLoad(self, 1) - - - - BenillaPetActionButton_OnLoad(self, 2) - - - - BenillaPetActionButton_OnLoad(self, 3) - - - - BenillaPetActionButton_OnLoad(self, 4) - - - - BenillaPetActionButton_OnLoad(self, 5) - - - - BenillaPetActionButton_OnLoad(self, 6) - - - - - BenillaPetActionButton_OnLoad(self, 7) - - - - BenillaPetActionButton_OnLoad(self, 8) - - - - BenillaPetActionButton_OnLoad(self, 9) - - - - BenillaPetActionButton_OnLoad(self, 10) - - - - PetActionBar_OnLoad() - PetActionBar_OnEvent() - UIParent_ManageFramePositions() - UIParent_ManageFramePositions() - - - diff --git a/crates/benilla-app/assets/ui/QuestFrame.xml b/crates/benilla-app/assets/ui/QuestFrame.xml deleted file mode 100644 index ffaeb690..00000000 --- a/crates/benilla-app/assets/ui/QuestFrame.xml +++ /dev/null @@ -1,1346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaQuestGreetingPanel_OnShow() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaQuestDetailPanel_OnShow() - BenillaQuestDetailPanel_OnUpdate(this, arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaQuestProgressPanel_OnShow() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaQuestRewardPanel_OnShow() - - - - QuestFrame_OnLoad() - QuestFrame_OnEvent(event) - BenillaQuestFrame_OnUpdate() - - PlaySound("igQuestListOpen") - - getglobal("QuestFrameGreetingPanel"):Hide() - getglobal("QuestFrameDetailPanel"):Hide() - getglobal("QuestFrameProgressPanel"):Hide() - getglobal("QuestFrameRewardPanel"):Hide() - CloseQuest() - PlaySound("igQuestListClose") - - - - diff --git a/crates/benilla-app/assets/ui/QuestLogFrame.xml b/crates/benilla-app/assets/ui/QuestLogFrame.xml deleted file mode 100644 index 2c659cc2..00000000 --- a/crates/benilla-app/assets/ui/QuestLogFrame.xml +++ /dev/null @@ -1,1975 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - getglobal("QuestLogTrackTracking"):SetVertexColor(1.0, 0, 0) - - - GameTooltip:SetOwner(self, "ANCHOR_RIGHT") - GameTooltip:SetText("Shift-click a quest to add or remove a quest from your quest watch list.", nil, nil, nil, nil, 1) - - - GameTooltip:Hide() - - - - - - - - - - - - - - - - - - - - - - - FauxScrollFrame_OnVerticalScroll(QUESTLOG_QUEST_HEIGHT, BenillaQuestLogList_Update) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaQuestLogFrame_OnLoad(self) - BenillaQuestLogFrame_OnEvent(self) - - QuestLog_OnUpdate(arg1) - - BenillaQuestLogFrame_OnMouseWheel(arg1) - - if UpdateMicroButtons then UpdateMicroButtons() end PlaySound("igQuestLogOpen") BenillaQuestLogFrame_Update() - if UpdateMicroButtons then UpdateMicroButtons() end PlaySound("igQuestLogClose") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaQuestWatchFrame_OnLoad(self) - BenillaQuestWatchFrame_OnEvent(self) - BenillaQuestWatchFrame_OnUpdate(self, arg1) - - - diff --git a/crates/benilla-app/assets/ui/QuestShareFrame.xml b/crates/benilla-app/assets/ui/QuestShareFrame.xml deleted file mode 100644 index 2000a050..00000000 --- a/crates/benilla-app/assets/ui/QuestShareFrame.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - self:RegisterEvent("QUEST_ACCEPT_CONFIRM") - BenillaQuestShareDriver_OnEvent() - - - diff --git a/crates/benilla-app/assets/ui/RaidFrame.xml b/crates/benilla-app/assets/ui/RaidFrame.xml deleted file mode 100644 index ff5a2adb..00000000 --- a/crates/benilla-app/assets/ui/RaidFrame.xml +++ /dev/null @@ -1,1118 +0,0 @@ - - - - - - - - - - - this:SetFrameLevel(this:GetFrameLevel() + 2) - getglobal(this:GetName() .. "Class"):SetFrameLevel(this:GetFrameLevel() + 2) - this:RegisterForDrag("LeftButton") - this:RegisterForClicks("LeftButtonUp", "RightButtonUp") - - RaidGroupButton_OnClick(arg1) - RaidGroupButton_OnDragStart() - RaidGroupButton_OnDragStop() - RaidGroupButton_OnEnter() - GameTooltip:Hide() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - getglobal(this:GetName() .. "Label"):SetText(GROUP .. " " .. this:GetID()) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - this:RegisterEvent("RAID_ROSTER_UPDATE") - - -- The raid ending ends the question with it. - if event == "RAID_ROSTER_UPDATE" and GetNumRaidMembers() == 0 then - ReadyCheckFrame.timer = nil - ReadyCheckFrame:Hide() - end - - ReadyCheck_OnUpdate(arg1) - - - diff --git a/crates/benilla-app/assets/ui/ReputationFrame.xml b/crates/benilla-app/assets/ui/ReputationFrame.xml deleted file mode 100644 index 2d5196b7..00000000 --- a/crates/benilla-app/assets/ui/ReputationFrame.xml +++ /dev/null @@ -1,922 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GameTooltip:SetOwner(this, "ANCHOR_RIGHT") - GameTooltip:SetText(REPUTATION_STATUS_AT_WAR, nil, nil, nil, nil, 1) - - GameTooltip:Hide() - - - - - - - if this.tooltip then - getglobal(this:GetName() .. "FactionStanding"):SetText(this.tooltip) - end - BenillaReputationBar_SetGlow(this:GetName(), 1) - - - getglobal(this:GetName() .. "FactionStanding"):SetText(this.standingText) - BenillaReputationBar_SetGlow(this:GetName(), GetSelectedFaction() == this.id) - - ReputationBar_OnClick() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FauxScrollFrame_OnVerticalScroll(REPUTATIONFRAME_FACTIONHEIGHT, ReputationFrame_Update) - - - - - - - - - - - GameTooltip_AddNewbieTip(FACTION, 1.0, 1.0, 1.0, REPUTATION_FACTION_DESCRIPTION, 1) - GameTooltip:Hide() - - - - - - - - - GameTooltip_AddNewbieTip(STANDING, 1.0, 1.0, 1.0, REPUTATION_STANDING_DESCRIPTION, 1) - GameTooltip:Hide() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - getglobal(this:GetName() .. "Text"):SetText(AT_WAR) - getglobal(this:GetName() .. "Text"):SetVertexColor(RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) - - BenillaReputationAtWarBox_OnClick(self) - - GameTooltip:SetOwner(this, "ANCHOR_RIGHT") - GameTooltip:SetText(REPUTATION_AT_WAR_DESCRIPTION, nil, nil, nil, nil, 1) - - GameTooltip:Hide() - - - - - - - - - - - - - - - - - - - - - getglobal(this:GetName() .. "Text"):SetText(MOVE_TO_INACTIVE) - BenillaReputationInactiveBox_OnClick(self) - - - - - - - - - - - - getglobal(this:GetName() .. "Text"):SetText(SHOW_FACTION_ON_MAINSCREEN) - BenillaReputationMainScreenBox_OnClick(self) - - - - - - - ReputationFrame_OnLoad() - ReputationFrame_OnShow() - ReputationFrame_OnEvent(event) - BenillaReputationFrame_OnMouseWheel(arg1) - - - diff --git a/crates/benilla-app/assets/ui/ScreenshotStatus.xml b/crates/benilla-app/assets/ui/ScreenshotStatus.xml deleted file mode 100644 index 7d74ac32..00000000 --- a/crates/benilla-app/assets/ui/ScreenshotStatus.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - ScreenshotStatus_OnLoad(); - - - ScreenshotStatus_OnEvent(event); - - - ScreenshotStatus_OnUpdate(arg1); - - - - diff --git a/crates/benilla-app/assets/ui/ScriptLogFrame.xml b/crates/benilla-app/assets/ui/ScriptLogFrame.xml index 1d04a38a..21407722 100644 --- a/crates/benilla-app/assets/ui/ScriptLogFrame.xml +++ b/crates/benilla-app/assets/ui/ScriptLogFrame.xml @@ -26,7 +26,8 @@ attached, so the detail is genuinely variable-height content, which is what the real kit is for; `GossipFrame.xml`'s greeting pane is the same wiring). - The window is registered in `UIPanelWindows` (`UiPanels.xml`), which is what seats it in the + The window registers itself in `UIPanelWindows` (below; the table is the stock UIParent.lua's + since 1988), which is what seats it in the left slot and gets it closed by `CloseAllWindows()` — i.e. by ESC — with no code here. Our own toplevels deliberately stay OUT of `UISpecialFrames`: that table is the addons' (0544's note, 1206). @@ -40,6 +41,10 @@ feed and nothing to keep in step — the window polls the log it is a view of. --> - + @@ -312,7 +334,13 @@ - + + + FauxScrollFrame_OnVerticalScroll(BENILLA_SCRIPTLOG_ROW_HEIGHT, BenillaScriptLog_Update) + + + diff --git a/crates/benilla-app/assets/ui/ScrollTemplates.xml b/crates/benilla-app/assets/ui/ScrollTemplates.xml index 4d46ad13..a8713c1c 100644 --- a/crates/benilla-app/assets/ui/ScrollTemplates.xml +++ b/crates/benilla-app/assets/ui/ScrollTemplates.xml @@ -21,14 +21,13 @@ ScrollFrame + Slider + Lua). The real `FauxScrollFrameTemplate` routes the scrollbar's value through its parent `ScrollFrame` (`OnValueChanged → parent:SetVerticalScroll(v)`; the ScrollFrame's `OnVerticalScroll` then derives `offset = floor(v/itemHeight + 0.5)`). That - ScrollFrame adds exactly one thing over the Slider: a *scroll-range clamp* on the value. We - don't need it — the offset comes straight off the Slider value here — and in benilla it would be - a liability: the clamp reads the scroll child's RESOLVED height, which lags a tick behind the - `SetHeight` the faux update does, so a content resize + scroll in one tick could clamp against a - stale range. So benilla's faux frame is a plain `` + a `Slider`: fewer moving parts, no - dependency on within-tick resolved rects, and the identical on-screen result (a smooth, - pixel-granularity thumb whose position maps 1:1 to the scroll offset). See 0251 for the full - rationale + the divergence from 0250's described (real-client) shape. + ScrollFrame adds nothing to the value on its way through: 0251 believed it clamped to the + scroll range and called the clamp a liability, and decision 2017 read the bytes — the + reference's `SetVerticalScroll` stores what the bar hands it. So the relay is a pure + pass-through, and benilla's faux frame is a plain `` + a `Slider`: fewer moving parts + and the identical on-screen result (a smooth, pixel-granularity thumb whose position maps + 1:1 to the scroll offset). See 0251 for the full rationale + the divergence from 0250's + described (real-client) shape. VALUE MODEL. The scrollbar's value is in PIXELS: `[0, (numItems − numToDisplay) * itemHeight]`, `valueStep = itemHeight`. The row offset is `floor(value / itemHeight + 0.5)` — sub-pixel @@ -76,13 +75,12 @@ -- over the template's on inherit (framexml.rs `merge`), so it really is one. Duck-typed for -- exactly that reason. -- - -- GAP, stated where it bites: `SetVerticalScroll` clamps into `[0, GetVerticalScrollRange()]` - -- (scrollframe.rs), and that range comes from the frame's SCROLL CHILD — which the ref's - -- `FauxScrollFrameTemplate` declares as `` - -- and our XML loader has no `` element for. Until it does, an addon frame's - -- range reads 0, so the handler fires with arg1 = 0 and its list stays at the top. The - -- offset our own kit computes above is unaffected — it comes straight off the Slider, which - -- is the whole point of 0251. + -- The engine's SetVerticalScroll takes the bar's value as given (decision 2017 — the + -- reference's never reads the scroll range), so an addon frame's `` + -- fires with this very value and its `FauxScrollFrame_OnVerticalScroll` derives the offset + -- from it, the reference's path end to end. The offset our own kit computes above is the + -- same number by construction — it comes straight off the Slider, which is the whole point + -- of 0251. function BenillaFauxScrollBar_OnValueChanged(scrollBar, value) local frame = scrollBar:GetParent() local step = scrollBar:GetValueStep() @@ -222,9 +220,16 @@ BenillaScrollBar_SetShown(bar, range > 0) end - -- Pan by `delta` px; the engine clamps to [0, range]. + -- Pan by `delta` px, clamped to [0, range] HERE: the engine's SetVerticalScroll stores + -- what it is given (decision 2017 — the reference's never reads the range), and the + -- reference's own wheel handler bounds itself the same way, through its bar's [min, max] + -- (ScrollFrameTemplate_OnMouseWheel → scrollBar:SetValue). function BenillaScroll_Step(sf, delta) - sf:SetVerticalScroll(sf:GetVerticalScroll() + delta) + local target = sf:GetVerticalScroll() + delta + local range = sf:GetVerticalScrollRange() + if target > range then target = range end + if target < 0 then target = 0 end + sf:SetVerticalScroll(target) BenillaScroll_SyncBar(sf) end @@ -394,6 +399,18 @@ + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaSkillFrameExpandButtonFrame_Fit() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ScrollFrame_OnLoad() - self.scrollBarHideable = 1 - - - - - - - - - - - - - - - - - - - - - - - SkillFrame_OnLoad() - SkillFrame_OnShow() - SkillFrame_OnEvent(event) - BenillaSkillFrame_OnMouseWheel(arg1) - - - diff --git a/crates/benilla-app/assets/ui/SpellBookAdapters.xml b/crates/benilla-app/assets/ui/SpellBookAdapters.xml new file mode 100644 index 00000000..80dfc700 --- /dev/null +++ b/crates/benilla-app/assets/ui/SpellBookAdapters.xml @@ -0,0 +1,40 @@ + + + + diff --git a/crates/benilla-app/assets/ui/SpellBookFrame.xml b/crates/benilla-app/assets/ui/SpellBookFrame.xml deleted file mode 100644 index eb295a13..00000000 --- a/crates/benilla-app/assets/ui/SpellBookFrame.xml +++ /dev/null @@ -1,965 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - SpellBookSkillLineTab_OnClick() - - GameTooltip:SetOwner(self, "ANCHOR_RIGHT") - if self.tooltip then - GameTooltip:SetText(self.tooltip) - GameTooltip:Show() - end - - GameTooltip:Hide() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SpellButton_OnLoad() - SpellButton_OnEvent(event) - SpellButton_OnClick() - BenillaSpellButton_UpdateButton(self) - - SpellButton_OnClick(1) - SpellButton_OnClick(1) - BenillaSpellButton_OnEnter(self) - GameTooltip:Hide() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SpellBookFrame_OnLoad() - SpellBookFrame_OnEvent() - SpellBookFrame_OnShow() - SpellBookFrame_OnHide() - - - diff --git a/crates/benilla-app/assets/ui/StanceBar.xml b/crates/benilla-app/assets/ui/StanceBar.xml deleted file mode 100644 index 75933e7b..00000000 --- a/crates/benilla-app/assets/ui/StanceBar.xml +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaShapeshiftButton_OnClick(self) - BenillaShapeshiftButton_OnEnter(self) - BenillaShapeshiftButton_OnLeave(self) - - - - - - - - - - - - - - - - - - - - BenillaShapeshiftButton_OnLoad(self, 1) - - - - BenillaShapeshiftButton_OnLoad(self, 2) - - - - BenillaShapeshiftButton_OnLoad(self, 3) - - - - BenillaShapeshiftButton_OnLoad(self, 4) - - - - BenillaShapeshiftButton_OnLoad(self, 5) - - - - BenillaShapeshiftButton_OnLoad(self, 6) - - - - BenillaShapeshiftButton_OnLoad(self, 7) - - - - BenillaShapeshiftButton_OnLoad(self, 8) - - - - BenillaShapeshiftButton_OnLoad(self, 9) - - - - BenillaShapeshiftButton_OnLoad(self, 10) - - - - ShapeshiftBar_OnLoad() - ShapeshiftBar_OnEvent() - - UIParent_ManageFramePositions() - UIParent_ManageFramePositions() - - - diff --git a/crates/benilla-app/assets/ui/TalentWipeConfirm.xml b/crates/benilla-app/assets/ui/TalentWipeConfirm.xml deleted file mode 100644 index c906f822..00000000 --- a/crates/benilla-app/assets/ui/TalentWipeConfirm.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - self:RegisterEvent("CONFIRM_TALENT_WIPE") - - BenillaTalentWipeConfirmDriver_OnEvent() - - - diff --git a/crates/benilla-app/assets/ui/TradeFrame.xml b/crates/benilla-app/assets/ui/TradeFrame.xml deleted file mode 100644 index e99083e5..00000000 --- a/crates/benilla-app/assets/ui/TradeFrame.xml +++ /dev/null @@ -1,573 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - getglobal(this:GetParent():GetName().."Silver"):SetFocus() - getglobal(this:GetParent():GetName().."Silver"):SetFocus() - this:ClearFocus() - if ( BenillaMoneyInput_Consume("TradePlayerInputMoney") ) then TradeFrame_UpdateMoney() end - this:HighlightText(0, 0) - this:HighlightText() - - - - - - - - - - - - - - - - getglobal(this:GetParent():GetName().."Copper"):SetFocus() - getglobal(this:GetParent():GetName().."Copper"):SetFocus() - this:ClearFocus() - if ( BenillaMoneyInput_Consume("TradePlayerInputMoney") ) then TradeFrame_UpdateMoney() end - this:HighlightText(0, 0) - this:HighlightText() - - - - - - - - - - - - - - - - this:ClearFocus() - if ( BenillaMoneyInput_Consume("TradePlayerInputMoney") ) then TradeFrame_UpdateMoney() end - this:HighlightText(0, 0) - this:HighlightText() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TradeFrame_OnLoad() - TradeFrame_OnEvent() - TradeFrame_OnShow(); PlaySound("igCharacterInfoOpen") - TradeFrame_OnHide(); PlaySound("igCharacterInfoClose") - - - diff --git a/crates/benilla-app/assets/ui/TradeSkillFrame.xml b/crates/benilla-app/assets/ui/TradeSkillFrame.xml deleted file mode 100644 index fb1e996a..00000000 --- a/crates/benilla-app/assets/ui/TradeSkillFrame.xml +++ /dev/null @@ -1,1319 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaTradeSkillInvSlotDropDown_OnLoad() - BenillaTradeSkillInvSlotDropDown_OnShow() - - - - - - BenillaTradeSkillSubClassDropDown_OnLoad() - BenillaTradeSkillSubClassDropDown_OnShow() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/TrainerFrame.xml b/crates/benilla-app/assets/ui/TrainerFrame.xml deleted file mode 100644 index b569a6f5..00000000 --- a/crates/benilla-app/assets/ui/TrainerFrame.xml +++ /dev/null @@ -1,911 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaTrainerFilterDropDown_OnLoad() - BenillaTrainerFilterDropDown_OnLoad() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaTrainerList_OnVerticalScroll() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaTrainerFrame_OnLoad(self) - BenillaTrainerFrame_OnEvent(self) - BenillaTrainerFrame_OnMouseWheel(arg1) - BenillaTrainerFrame_ApplyFilter(); PlaySound("igCharacterInfoOpen") - CloseTrainer(); PlaySound("igCharacterInfoClose") - - - diff --git a/crates/benilla-app/assets/ui/UIParent.xml b/crates/benilla-app/assets/ui/UIParent.xml deleted file mode 100644 index 11789567..00000000 --- a/crates/benilla-app/assets/ui/UIParent.xml +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - this:RegisterEvent("VARIABLES_LOADED") - this:RegisterEvent("MIRROR_TIMER_START") - this:RegisterEvent("PLAYER_ENTERING_WORLD") - this:RegisterEvent("READY_CHECK") - this:RegisterEvent("START_LOOT_ROLL") - this:RegisterEvent("CONFIRM_LOOT_ROLL") - - UIParent_OnEvent(event) - - - - - - - - - diff --git a/crates/benilla-app/assets/ui/UiPanels.xml b/crates/benilla-app/assets/ui/UiPanels.xml deleted file mode 100644 index 891017cb..00000000 --- a/crates/benilla-app/assets/ui/UiPanels.xml +++ /dev/null @@ -1,2656 +0,0 @@ - - - - - - - - - if not FADEFRAMES[1] then this:Hide() return end UIFrameFadeUpdate(arg1) - - - - - - - if not PULSEBUTTONS[1] then this:Hide() return end ButtonPulse_OnUpdate(arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SmallMoneyFrame_OnLoad(); MoneyFrame_SetType("STATIC") - - - - - - - - StaticPopup_OnShow() - StaticPopup_OnHide() - StaticPopup_OnUpdate(this, arg1) - - - - - - - - - - - - - - - - - - - - - - - self:RegisterEvent("DELETE_ITEM_CONFIRM") - - BenillaDeleteItemConfirmDriver_OnEvent(self) - - - - - - - - - - self:RegisterEvent("EQUIP_BIND_CONFIRM") - self:RegisterEvent("AUTOEQUIP_BIND_CONFIRM") - self:RegisterEvent("USE_BIND_CONFIRM") - self:RegisterEvent("LOOT_BIND_CONFIRM") - self:RegisterEvent("PLAYER_CAMPING") - self:RegisterEvent("PLAYER_QUITING") - self:RegisterEvent("LOGOUT_CANCEL") - self:RegisterEvent("PARTY_INVITE_REQUEST") - self:RegisterEvent("PARTY_INVITE_CANCEL") - self:RegisterEvent("CURSOR_UPDATE") - - BenillaBindConfirmDriver_OnEvent(self) - - - diff --git a/crates/benilla-app/assets/ui/UnitPopup.xml b/crates/benilla-app/assets/ui/UnitPopup.xml deleted file mode 100644 index ebc205f2..00000000 --- a/crates/benilla-app/assets/ui/UnitPopup.xml +++ /dev/null @@ -1,885 +0,0 @@ - - - - - - - - - - UnitPopup_OnUpdate(arg1) - - - diff --git a/crates/benilla-app/assets/ui/WorldMapFrame.xml b/crates/benilla-app/assets/ui/WorldMapFrame.xml deleted file mode 100644 index 20655b36..00000000 --- a/crates/benilla-app/assets/ui/WorldMapFrame.xml +++ /dev/null @@ -1,953 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WorldMapContinentsDropDown_OnLoad(); - - - - - - - - - - - - - - - - - - - - - WorldMapZoneDropDown_OnLoad(); - this:RegisterEvent("WORLD_MAP_UPDATE"); - - - if ( this:IsVisible() ) then - WorldMapContinentsDropDown_OnLoad(); - WorldMap_UpdateContinentDropDownText(); - WorldMapZoneDropDown_OnLoad(); - WorldMap_UpdateZoneDropDownText(); - end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - this:RegisterEvent("WORLD_MAP_UPDATE"); - -- The hover area label inherits WorldMapTextFont (nominal 102). 33 was the - -- director's taste call (0235) — which the one-to-one raster cap (the fold-back - -- record; wow-re fontstring-overflow.md) now clamps to the byte law's 32, one - -- unit under that call and closer to it than the 36 the atlas snap used to - -- deliver. The real client draws this SetFont(33) at 32 too. Still a taste dial: - -- any value ≤ 32 is honored exactly. - WorldMapFrameAreaLabel:SetFont("Fonts\\FRIZQT__.TTF", 33); - WorldMapFrame_Update(); - - - - BlackoutWorld:Show(); - SetupFullscreenScale(); - SetMapToCurrentZone(); - WorldMapFrame_Update(); - if UpdateMicroButtons then UpdateMicroButtons() end; - PlaySound("igQuestLogOpen"); - CloseDropDownMenus(); - - - BlackoutWorld:Hide(); - if UpdateMicroButtons then UpdateMicroButtons() end; - PlaySound("igQuestLogClose"); - - - if ( WorldMapFrame:IsVisible() ) then - WorldMapFrame_Update(); - end - - - - - - diff --git a/crates/benilla-app/assets/ui/WorldMapFrameTemplates.xml b/crates/benilla-app/assets/ui/WorldMapFrameTemplates.xml deleted file mode 100644 index 63ac7ca1..00000000 --- a/crates/benilla-app/assets/ui/WorldMapFrameTemplates.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - this:SetFrameLevel(this:GetFrameLevel() + 1); - this.unit = "party" .. this:GetID(); - getglobal(this:GetName() .. "Icon"):SetTexture("Interface\\WorldMap\\WorldMapPartyIcon"); - - WorldMapUnit_OnEnter() - WorldMapTooltip:Hide() - - - - - - - - this:SetFrameLevel(this:GetFrameLevel() + 1); - getglobal(this:GetName() .. "Icon"):SetTexture("Interface\\WorldMap\\WorldMapPartyIcon"); - - - - 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 18a1e924..5ee18e5d 100644 --- a/crates/benilla-app/assets/ui/benilla.toc +++ b/crates/benilla-app/assets/ui/benilla.toc @@ -38,7 +38,13 @@ # The named virtual Font objects (decision 0084) — must load first so any FontString's # `inherits="GameFontNormal"` resolves against a registered object. -Fonts.xml +# ══ THE FONT REGISTRY — the reference's own, off the player's chain (1751, 1888) ══ +# All 51 `` objects, name for name, plus the colour codes, `CHAT_FONT_HEIGHTS`, +# `MATERIAL_TEXT_COLOR_TABLE`, `MATERIAL_TITLETEXT_COLOR_TABLE` and `RAID_CLASS_COLORS`. +# Ours was a transcription differing only in formatting (it inlined ``), plus one +# addition: `ITEM_QUALITY_COLORS`, whose reference home is `UIParent.lua` and which 1888 moved +# to our UIParent.xml so it survives this swap. +Interface\FrameXML\Fonts.xml # ══ THE STRINGS — the reference's own first line, seated second here (1848) ══ # **Second, not first, and that is deliberate.** Manifest entry 0 is the FONT REGISTRY: @@ -96,7 +102,7 @@ Interface\FrameXML\LocaleProperties.lua # ScriptErrors dialog, and the DialogBoxFrame + DialogButton*Texture kit it is built from. # Straight after Fonts.xml because those are the only things it needs (GameFontRedLarge, # DialogButtonNormalText/HighlightText) and everything above it in FrameXML.toc is engine. -BasicControls.xml +Interface\FrameXML\BasicControls.xml # **UIParent itself, and it must come before every frame that declares `parent="UIParent"`** — # a parent name is resolved at LOAD, and a name that does not exist yet does not error: the loader # warns and silently falls back to the enclosing frame (`loader/mod.rs`, "names no frame"). With @@ -109,7 +115,35 @@ BasicControls.xml # (UIPARENT_MANAGED_FRAME_POSITIONS + UIParent_ManageFramePositions, decision 0272, the ref # mechanism that re-anchors the cast bar / chat over the bottom bars) are called later, applied by # the loader's post-load bootstrap (ui_script/manifest.rs). -UIParent.xml +# ══ THE WORLD FRAME — the reference's own, off the player's chain (1751; decision 1983) ══ +# WorldFrame.xml + WorldFrame.lua: the singleton (the engine's own kind, mouse-enabled +# by construction, its hits the world's), the framerate readout ToggleFramerate/TOGGLEFPS drives +# off GetFramerate, the OnUpdate that ticks StaticPopup and MirrorTimer frames while the UI is +# hidden, and the ScreenshotStatus child ("Screen Captured" over SCREENSHOT_SUCCEEDED/FAILED, +# the 1.5 s GetTime fade, TakeScreenshot for the SCREENSHOT binding). Right above UIParent.xml as +# the reference's toc has it (l.7-8). Needs Fonts.xml's SystemFont above; everything else it +# names is call-time. +Interface\FrameXML\WorldFrame.xml +# UIParent itself and its Lua — the reference's own file (1751; decision 1988), at the slot its +# toc gives it (l.8, right after BasicControls). UIParent.lua is the whole of the glue this +# engine used to carry as UIParent.xml + UiPanels.xml: the UIPanelWindows table and the slot +# manager (Show/HideUIPanel, CloseAllWindows, ToggleGameMenu's ESC ladder), the fade/flash/pulse +# kits (ticked from UIParent's own OnUpdate, so the three driver frames of ours retired with +# it), the managed bottom-stack positions, the model turntable, the LoadOnDemand shims, and the +# sixty-six globally-routed events and their arms. It sources LocaleProperties.lua itself. Its +# OnUpdate also ticks FCF_OnUpdate, UnitPopup_OnUpdate, BattlefieldFrame_OnUpdate, the +# battlefield-position ask (1980) and the ready-check timeout (1989) — call-time names, all of +# them below. LowHealthFrame (parent WorldFrame, above) and OutOfControlFrame ride along — +# created hidden and never shown: the one function that would flash them, PlayerStatus_OnUpdate, +# has no caller in the image or the chain (wow-re, decision 1999). Dead code in 5875, kept as +# the reference keeps it. +# What stayed ours moved out: the placeholder icon (ScrollTemplates.xml; the window tab template +# and its settle went with it and are the chain's since 1993), 0561's bag verbs (ContainerFrameAdapters.xml), the script log's row +# (ScriptLogFrame.xml). The three aliases OptionsFrame.xml used to carry for the reference's three +# options windows and its Cancel button are all gone: each of those four names is a REAL frame off +# the chain now (2115, 2147, 2177), and the last of them — the video window's `OptionsFrame` — is +# why our own window is `BenillaOptionsFrame`. +Interface\FrameXML\UIParent.xml # ══ THE ITEM-SLOT BASE — the reference's own, off the player's chain (1751, window 24) ══ # `ItemButtonTemplate` and the eight `SetItemButton*` verbs out of `ItemButtonTemplate.lua`. It # sits as early as it can be read: no frames, no dependencies of its own, and every window that @@ -122,17 +156,15 @@ UIParent.xml # `$parentNormalTexture`, 37x37) — which is what makes this the safest of the foundational swaps # rather than the widest: everything that inherits it asks for the same four names. Interface\FrameXML\ItemButtonTemplate.xml -# The reference's money-frame kit: MoneyFrameTemplate/SmallMoneyFrameTemplate + MoneyTypeInfo -# + the MoneyFrame_* API. Needs only Fonts (NumberFontNormal/NumberFontNormalLarge) — and it must -# come BEFORE UiPanels.xml, because the shared StaticPopup's coin row is a child frame declaring -# `inherits="SmallMoneyFrameTemplate"`, which is resolved at LOAD (decision 1580). That is the -# reference's own order too (FrameXML.toc: MoneyFrame.xml l.10, StaticPopup.xml l.23); this file -# used to sit 140 lines lower, beside the other shared widget kits, which was only ever tenable -# while nothing above it showed coins. AuctionFrame far below is laid out on it as well (its price -# columns need a money TYPE, which the other kit has no notion of); our other eight coin displays -# still run on the BenillaMoney_* slot kit (which now lives HERE), and this file's header is where -# the two are reconciled. -MoneyFrame.xml +# ══ THE MONEY KIT — the reference's own, off the player's chain (1751; decision 1962) ══ +# MoneyFrame.lua + MoneyFrame.xml (two rows: the .xml sources no .lua): MoneyTypeInfo, the +# MoneyFrame_* API, MoneyFrameTemplate / SmallMoneyFrameTemplate. Needs only Fonts, and must come +# BEFORE the dialog engine (StaticPopup's coin row inherits SmallMoneyFrameTemplate at LOAD), which +# is the reference's own order too (FrameXML.toc l.9-10 against l.23). The money CURSOR family the +# kit's PickupFunc/DropFunc rows drive (PickupPlayerMoney, DropCursorMoney, GetCursorMoney, the +# trade and send-mail pairs) is this engine's now. 1190's transcription is gone. +Interface\FrameXML\MoneyFrame.lua +Interface\FrameXML\MoneyFrame.xml # ══ THE MONEY INPUT KIT — the reference's own, off the player's chain (1751, window 23) ══ # `MoneyInputFrameTemplate` and the ten `MoneyInputFrame_*` verbs out of `MoneyInputFrame.lua` — # the three-box gold/silver/copper editor a player types an amount into. Nothing of ours ever @@ -144,9 +176,10 @@ MoneyFrame.xml # It is groundwork rather than a window, and the windows it is groundwork FOR are named so the # next session does not have to re-derive it: stock `TradeFrame.xml` and `MailFrame.xml` both build # their amount entry from this template and call `MoneyInputFrame_SetMode`/`_GetCopper`/ -# `_SetCopper`/`_ClearFocus`/`_SetTextColor`/`_SetOnvalueChangedFunc` — six of the names below — -# and neither can be sourced until they exist. (Trade still needs four ENGINE verbs beyond this: -# `AddTradeMoney`, `GetCursorMoney`, `GetTradePlayerItemLink`, `GetTradeTargetItemLink`.) +# `_SetCopper`/`_ClearFocus`/`_SetTextColor`/`_SetOnvalueChangedFunc` — six of the names below. +# Both windows are migrated now: `MailFrame.xml` at l.897 and `TradeFrame.xml` at l.906, the +# latter once 1966 bound the four engine verbs it also needed (`AddTradeMoney`, +# `GetCursorMoney`, `GetTradePlayerItemLink`, `GetTradeTargetItemLink`). # # **TWO entries, and the `.lua` was missing.** This `.xml` declares only the template and does not # source its `.lua`; the reference's toc lists both (l.11-12). Listing the `.xml` alone brought the @@ -156,17 +189,22 @@ MoneyFrame.xml # `every_chain_xml_brings_its_own_lua` is now a gate so neither can recur. Interface\FrameXML\MoneyInputFrame.lua Interface\FrameXML\MoneyInputFrame.xml -# The UIPanel slot manager (decision 0084 §2): script-only, no frames of its own — must load -# before any panel frame (Gossip/Merchant today) so ShowUIPanel/HideUIPanel already exist -# when those frames' OnLoad/OnEvent reference them. -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 @@ -185,17 +223,25 @@ Interface\FrameXML\UIDropDownMenu.xml # The kit was a block inside our ChatFrame.xml — a transcription that kept the reference's names # for the addon surface and said so, and whose own note recorded a divergence it had to make (the # row label authored LEFT-anchored, because the reference leans on 1.12's ButtonText default rect -# and our lazy label slot did not reproduce it). Sourcing the file retires the transcription and -# the divergence together. +# and our lazy label slot did not reproduce it). +# +# **Sourcing the file retired only the XML half, and this header claimed both for months.** The ten +# `UIMenu_*`/`UIMenuButton_*` functions stayed in ChatFrame.xml under the reference's own names, and +# that file loads at 939 — so OURS overwrote the chain's from the day this entry landed, the reverse +# of 1855's direction and just as silent. They are gone now; the kit is the reference's end to end +# (1869). # # THE POSITION is the reference's own (FrameXML.toc l.12, straight after GameTooltip.xml, which it # needs for the tooltip backdrop its menu wears). Far above ChatFrame.xml, which is the one thing # that used it here — resolved at load, and now satisfied earlier rather than in the same file. Interface\FrameXML\UIMenu.xml -# The unit right-click popups (0434 phase 5): UnitPopupMenus/Buttons + UnitPopup_ShowMenu -# — after the dropdown kit it drives, before the unit/party frames whose DropDown -# children's OnLoad initialize into it. -UnitPopup.xml +# ══ THE UNIT MENUS — the reference's own, off the player's chain (1751; decision 1958) ══ +# UnitPopup.xml + UnitPopup.lua: UnitPopupButtons/Menus and UnitPopup_ShowMenu, the nine menus +# and every row's facts — after the dropdown kit it drives (its own position, FrameXML.toc +# l.16), before the unit/party frames whose DropDown children's OnLoad initialize into it. Its +# enable pass runs from UIParent's OnUpdate line, the reference's own hook. 0434's +# transcription is gone. +Interface\FrameXML\UnitPopup.xml # ══ THE CHAT-LINK TOOLTIP — the reference's own, off the player's chain (1751, window 6) ══ # `SetItemRef` (the chat-link click router) and `ItemRefTooltip` / `ItemRefCloseButton`. # @@ -296,81 +342,267 @@ Interface\FrameXML\PetFrame.xml # below TargetFrame.xml. Its fade chain needs UiPanels.xml's `UIFrameFade` family, far above, at # call time. `MAX_COMBO_POINTS` comes from TargetFrame.lua now, which is where 1.12 declares it. Interface\FrameXML\ComboFrame.xml -# The center-screen scrolling combat text (decision 0578) — the Blizzard_CombatText -# transcription; consumes COMBAT_TEXT_UPDATE + the regen/health/power events, needs -# only Fonts.xml (CombatTextFont) + UIParent before it. -CombatText.xml -# The death arc's dialogs + event driver (decision 0308): registry entries on the shared -# StaticPopup engine, so after UiPanels.xml. -DeathFrame.xml -# The two duel dialogs + their event driver (decision 0633): registry entries on the same -# StaticPopup engine, and DUEL_OUTOFBOUNDS leans on its per-tick countdown branch. -DuelFrame.xml -# The escort-quest confirm + its event driver (decision 1733): one more registry entry on the same -# StaticPopup engine. Not QuestFrame.xml's or QuestLogFrame.xml's — it belongs to no window, the -# way the duel dialogs above belong to none. -QuestShareFrame.xml -# The two enchant-apply confirms + their event driver (decision 0928): the same StaticPopup -# registry again. Not CraftFrame's — the gate that raises them is the generic item-target -# bind, reached by a poison or a sharpening stone with no profession window open. -EnchantConfirm.xml -# The innkeeper's bind confirm + its event driver (decision 1331): the same StaticPopup registry. -# Not GossipFrame's, and the wire is why — the server closes the gossip menu BEFORE it asks, so -# this dialog is free-standing by the time it shows. Needs only UiPanels.xml, far above. -BinderConfirm.xml -# The summon confirm + its event driver (decision 1747): the same StaticPopup registry once more. -# Free-standing like the two around it, and for a stronger reason — a warlock's ritual, a meeting -# stone and a GM `.summon` all raise it with nothing whatever on screen. The only entry here whose -# event carries no arguments: the dialog reads the summoner, the destination and the clock back out -# of the engine every tick, so it needs UiPanels.xml's countdown branch as well as its registry. -ConfirmSummon.xml -# The class trainer's respec confirm + its event driver (decision 1580): the binder confirm's twin -# one line up, free-standing for the identical reason — the server closes the gossip menu before it -# asks. The only entry in the registry that raises a money frame, so it needs MoneyFrame.xml (far -# above, ahead of UiPanels.xml) as well as the StaticPopup engine itself. -TalentWipeConfirm.xml -# The shared CooldownFrame_SetTimer (the ref's Cooldown.lua file split) — before its -# consumers (ActionBar's buttons, the multibars, the stance bar, BagFrame's slots). -Cooldown.xml -ActionBar.xml +# The scrolling combat text is the reference's own `Blizzard_CombatText`, a LoadOnDemand addon +# off the chain (its toc says so), loaded by the options window when SHOW_COMBAT_TEXT is "1" — +# at login and on the switch, the reference's own two sites. No row here (decision 1964; 0578's +# transcription is gone). +# ── MEASUREMENT (1938): the options window at the reference's slot (FrameXML.toc l.21, before +# MainMenuBar l.34) with the four rows it inherits from. ── +# The faux-scroll kit (decisions 0247/0250/0251): BenillaScrollBarTemplate (the draggable +# Slider scroll bar) + FauxScrollFrameTemplate + the reference's own FauxScrollFrame_* +# API (Update/GetOffset/SetOffset/OnVerticalScroll + ScrollFrame_OnLoad) — +# before its first customer (the trainer list) below. +ScrollTemplates.xml + +# ══ THE PANEL TEMPLATE KIT — the reference's own, off the player's chain (1751, window 31) ══ +# TWO entries, because the reference splits this kit the way it splits every other: the `.lua` +# carries the verbs and the `.xml` the templates. Listing the `.xml` alone brings none of the verbs +# (`every_chain_xml_brings_its_own_lua` is a gate because that already bit twice). +# +# ONE swap, THREE of our files, which is why it had to move as a unit and why 1837 measured it +# before anyone executed it: +# * `UIPanelTemplates.xml` — DELETED. Our 18 templates were a strict SUBSET of the reference's, +# zero benilla-only additions, so the template half is a pure gain. +# * the scroll half of `ScrollTemplates.xml` — `FauxScrollFrameTemplate`, `FauxScrollFrame_*`, +# `ScrollFrame_*` — now the chain's. What stays there is `BenillaScrollBarTemplate` and +# `BenillaScrollTroughTemplate`, which are ours and which six windows still inherit. +# * the `PanelTemplates_*` family out of `UiPanels.xml`. +# +# It could not be split: `ScrollTemplates.xml` sits ABOVE this entry, so the chain's +# `FauxScrollFrameTemplate` lands after ours and wins (registration is last-in). There is no +# ordering that takes the templates without also taking Faux. +# +# GAINED: `TabButtonTemplate`, and the whole `ScrollingEdit_*` family, which we had NOWHERE — that +# is HelpFrame's named blocker, answered as a side effect. And it unblocks MacroFrame (1835). +Interface\FrameXML\UIPanelTemplates.lua + +Interface\FrameXML\UIPanelTemplates.xml +# ══ THE STOCK VIDEO OPTIONS WINDOW — loaded, and HIDDEN, in the reference's own l.19 seat ══ +# `FrameXML.toc` l.19, whole: the file, its `\n", + ); + let report = load_in(&s, &doc, "Interface/AddOns/Probe/Probe.xml", &|p: &str| { + (p == "Interface/AddOns/Probe/Sibling.lua") + .then(|| b"BenillaFile = ({}).missing.deeper".to_vec()) + }); + assert_eq!(report.errors.len(), 2, "{:?}", report.errors); + assert!( + report.errors[0].contains("Interface\\AddOns\\Probe\\Sibling.lua:1:"), + "a