the mailbox takes typing again, and events carry their real arguments

- the mail window's send tab takes typing again: the subject, body and money boxes were taking no input while the recipient box swallowed every key, and a sent letter clears its subject and item icon instead of putting them straight back (2145)
- seven events fire the way the reference does: UNIT_DYNAMIC_FLAGS fires at all, swapping two identical stacks between bank slots fires PLAYERBANKSLOTS_CHANGED twice, the pet sheet's training points repaint, and ITEM_LOCK_CHANGED loses its invented arguments (2140)
- nine widget methods 1.12 addons probe for are in: ShaguTweaks stops recolouring textures the reference leaves alone, pfUI and _Nameplates stop raising on a tooltip's GetAnchorType, and 63 AceEvent addons get RegisterAllEvents (2142)
- six post-1.12 methods leave the widget surface (SetSize, SetShown, HasFocus, SetFormattedText and two tooltip verbs), so an addon reaching for a later client's API finds what a real 1.12 client gives it (2142, 2146)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Sam
2026-09-11 20:52:50 +07:00
co-authored by Claude Fable 5.1
parent 3f3cf21afa
commit fed2c96ec8
100 changed files with 3837 additions and 869 deletions
+10 -10
View File
@@ -137,13 +137,13 @@ mod tests {
click_a, click_b = 0, 0
drag_button = nil
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetSize(400, 600); a:EnableMouse(true)
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetWidth(400); a:SetHeight(600); a:EnableMouse(true)
a:RegisterForDrag("LeftButton")
a:SetScript("OnDragStart", function(self, button) drag_starts = drag_starts + 1; drag_button = button end)
a:SetScript("OnDragStop", function(self) drag_stops = drag_stops + 1 end)
a:SetScript("OnClick", function(self) click_a = click_a + 1 end)
local b = CreateFrame("Frame", "B")
b:SetPoint("BOTTOMLEFT", 400, 0); b:SetSize(400, 600); b:EnableMouse(true)
b:SetPoint("BOTTOMLEFT", 400, 0); b:SetWidth(400); b:SetHeight(600); b:EnableMouse(true)
b:SetScript("OnReceiveDrag", function(self) receives = receives + 1 end)
b:SetScript("OnClick", function(self) click_b = click_b + 1 end)
"#,
@@ -201,7 +201,7 @@ mod tests {
r#"
clicks = 0
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetSize(400, 600); a:EnableMouse(true)
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetWidth(400); a:SetHeight(600); a:EnableMouse(true)
a:RegisterForDrag("LeftButton")
a:SetScript("OnClick", function(self) clicks = clicks + 1 end)
"#,
@@ -223,7 +223,7 @@ mod tests {
r#"
clicks = 0
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetSize(400, 600); a:EnableMouse(true)
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetWidth(400); a:SetHeight(600); a:EnableMouse(true)
a:RegisterForDrag("LeftButton")
a:SetScript("OnClick", function(self) clicks = clicks + 1 end)
"#,
@@ -252,7 +252,7 @@ mod tests {
r#"
heard = 0
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetSize(400, 600); a:EnableMouse(true)
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetWidth(400); a:SetHeight(600); a:EnableMouse(true)
a:RegisterForDrag("LeftButton")
local f = CreateFrame("Frame", "Listener")
f:RegisterEvent("DELETE_ITEM_CONFIRM")
@@ -395,7 +395,7 @@ mod tests {
WorldFrame = CreateFrame("WorldFrame", "WorldFrame") WorldFrame:SetAllPoints()
heard = 0
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetSize(400, 600); a:EnableMouse(true)
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetWidth(400); a:SetHeight(600); a:EnableMouse(true)
local f = CreateFrame("Frame", "Listener")
f:RegisterEvent("DELETE_ITEM_CONFIRM")
f:SetScript("OnEvent", function() heard = heard + 1 end)
@@ -502,7 +502,7 @@ mod tests {
r#"
heard = 0
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetSize(400, 600); a:EnableMouse(true)
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetWidth(400); a:SetHeight(600); a:EnableMouse(true)
local f = CreateFrame("Frame", "Listener")
f:RegisterEvent("DELETE_ITEM_CONFIRM")
f:SetScript("OnEvent", function() heard = heard + 1 end)
@@ -538,7 +538,7 @@ mod tests {
r#"
heard = 0
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetSize(400, 600); a:EnableMouse(true)
a:SetPoint("BOTTOMLEFT", 0, 0); a:SetWidth(400); a:SetHeight(600); a:EnableMouse(true)
a:RegisterForDrag("LeftButton")
local f = CreateFrame("Frame", "Listener")
f:RegisterEvent("DELETE_ITEM_CONFIRM")
@@ -587,7 +587,7 @@ mod tests {
r#"
stops = 0
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 100, 100); a:SetSize(200, 100)
a:SetPoint("BOTTOMLEFT", 100, 100); a:SetWidth(200); a:SetHeight(100)
a:EnableMouse(true); a:SetMovable(true)
a:RegisterForDrag("LeftButton")
a:SetScript("OnDragStart", function() this:StartMoving() end)
@@ -637,7 +637,7 @@ mod tests {
r#"
stops, starts = 0, 0
local a = CreateFrame("Frame", "A")
a:SetPoint("BOTTOMLEFT", 100, 100); a:SetSize(200, 100)
a:SetPoint("BOTTOMLEFT", 100, 100); a:SetWidth(200); a:SetHeight(100)
a:EnableMouse(true); a:SetMovable(true)
a:RegisterForDrag("LeftButton")
a:SetScript("OnDragStart", function() starts = starts + 1; this:StartMoving() end)
+2 -5
View File
@@ -28,7 +28,7 @@
use mlua::{Lua, Value};
use super::{queue_cursor_update, CursorMoney, CursorPayload};
use crate::script::binding_abi::{number_arg, predicate};
use crate::script::binding_abi::{flag, number_arg};
use crate::script::Model;
/// The coin icon for an amount of copper — `GetCoinIcon 0x48d4e0`'s table, SIGNED thresholds
@@ -161,10 +161,7 @@ pub(super) fn install(lua: &Lua) -> mlua::Result<()> {
"CursorHasMoney",
lua.create_function(|lua, ()| {
let model = lua.app_data_ref::<Model>().expect("model app_data");
Ok(predicate(matches!(
model.cursor,
Some(CursorPayload::Money(_))
)))
Ok(flag(matches!(model.cursor, Some(CursorPayload::Money(_)))))
})?,
)?;
g.set(