the world map blips are the reference's, and particles go untinted
- the world map speaks the reference's names: WorldMapTooltip is declared (six corpus addons index it; pfUI dies on it at file scope), the blackout frame takes the reference's spelling BlackoutWorld, and the four hand-written party blips become the reference's own unit-blip templates — all 44 blips as instances, each with its published $parentIcon, the name pfUI recolours group blips by class through; the 40 raid ones are declared but not positioned yet, named in the OUT list rather than faked
- the templates addons build their own buttons from are published: ItemButtonTemplate, ContainerFrameItemButtonTemplate and the bag-slot chain — most of the handler scripts were live the whole time (this client executes the reference's own container and paper-doll code off the player's patch chain), so what was missing was mostly declarations, not behaviour — the bank arm stays out and is named as the omission it is; OptionsFrameSliders becomes real, with the three Graphics rows reading it and re-reading on show, so an addon's write to a slider's bounds actually moves the slider; and the template census that had ranked these at "zero demand" learns to see a local bound to a literal — its table went from 3 rows to 7
- the bindings answer in 1.12's own shapes: Button:IsEnabled() answers the NUMBER 1 or 0 (0 is truthy in Lua, so the reference's own == 0 tests got false forever, and three of our files had hand-worked around the divergence rather than fixed it); the constructors' string arguments are four shapes, not one rule — pfUI passes a Button where a template name goes and the reference constructs the FontString and ignores it; SetInventoryItem returns THREE values, the reference's own paper doll destructuring repairCost; UnitIsVisible is object presence and nothing else (57 bytes, one branch, no distance — an out-of-range party member is exists-yes, visible-nil); the tapped pair reads the two dynamic-flags bits, and its repaint wire fires UNIT_FACTION on the tap bit — the half a passing predicate test never sees; UnitIsPartyLeader is two ORed legs covering disjoint failures (a held stranger leading their own party, and an out-of-range member with no object to read a flag from); and the four nameplate verbs take no argument and return zero values
- the ghost's wisps compose onto its body instead of over it — the four emitters drew at full strength over a body at alpha 0.5, and now inherit the instance alpha down the attachment chain the way the reference recomposes it per frame; the residual we had parked ("the wisps should inherit the tint too") is REFUTED at the bytes: a particle batch commits hardcoded white RGB, and even that never reaches the fragment — particles are never tinted, only the alpha crosses, applied to the alpha byte alone — so the shipped shader split was already right and no code changes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -653,9 +653,30 @@ pub(super) fn install(lua: &Lua) -> mlua::Result<()> {
|
||||
"Disable",
|
||||
lua.create_function(|lua, this: Table| with_button(lua, &this, |bs| bs.enabled = false))?,
|
||||
)?;
|
||||
// IsEnabled() → the NUMBER 1 or the NUMBER 0 — never a boolean, and never nil.
|
||||
//
|
||||
// wow-re `ui/scratch/button-enabled-state.md`, VERIFIED off the Button method table at
|
||||
// `0x879d10`: `IsEnabled 0x7800b0` reads the three-valued STATE at `[obj+0x328]`
|
||||
// (0 DISABLED / 1 NORMAL / 2 PUSHED), does `setne cl` for "not disabled", and pushes that as a
|
||||
// NUMBER. So the reference's own `IsEnabled() == 0` and `== 1` tests (FriendsFrame.lua l.404,
|
||||
// StaticPopup.lua l.713) are live code.
|
||||
//
|
||||
// **This answered a Lua boolean until now, and the difference is not cosmetic, because 0 is
|
||||
// TRUTHY in Lua.** A caller writing the reference's `== 0` got false forever; a caller writing
|
||||
// `IsEnabled() > 0` got "attempt to compare number with boolean" — which is where pfUI's
|
||||
// `api/ui-widgets.lua:812` icon-fade died, taking the widget module with it. The divergence was
|
||||
// known and worked around by hand in three of our own files (FriendsFrame.xml's
|
||||
// `guildButtonDisabled` read BOTH spellings and said so); those workarounds go with this
|
||||
// change, which is 1719's bar — a prior call revisited because a new measurement arrived.
|
||||
//
|
||||
// Slider carries its own `IsEnabled` (slider.rs) and is deliberately NOT changed here: the
|
||||
// note above is the BUTTON method table, and whether the slider widget shares the contract is
|
||||
// unverified. Assuming they match is exactly the guess this comment exists to have avoided.
|
||||
m.set(
|
||||
"IsEnabled",
|
||||
lua.create_function(|lua, this: Table| with_button(lua, &this, |bs| bs.enabled))?,
|
||||
lua.create_function(|lua, this: Table| {
|
||||
with_button(lua, &this, |bs| i64::from(bs.enabled))
|
||||
})?,
|
||||
)?;
|
||||
|
||||
// RegisterForClicks(...): replaces the button's registered-click set outright (the live API's
|
||||
|
||||
Reference in New Issue
Block a user