the cooldown pie survives a /reload, and Bagnon's bags keep their order

- the cooldown pie, the GCD sweep, minimap pings and the map arrow draw again after a logout, login or /reload; they went blank until a restart, which read as OmniCC killing the cooldowns (2113)
- an addon's own font on a button label keeps its face, size and outline instead of being undone every frame, MikScrollingBattleText's reported look (2112)
- an empty label reads as nothing rather than an empty string, so Cartographer's map label keeps its colour; a slider thumb with no authored size takes its art's own size, so Dewdrop's Look'n'Feel slider moves (2109, 2110)
- Bagnon's saved bag list comes back in the order it was written, so the keyring stops jumping to the front after a restart; hovering a Bagnon bag costs a third of what it did (2111, 2114)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Sam
2026-09-11 20:49:50 +07:00
co-authored by Claude Fable 5.1
parent 99b5600e25
commit 321bcbb393
26 changed files with 1256 additions and 90 deletions
+13 -1
View File
@@ -476,14 +476,25 @@ pub(super) fn install(lua: &Lua) -> mlua::Result<()> {
m.set(
"SetText",
lua.create_function(|lua, (this, text): (Table, Option<String>)| {
// `CSimpleButton::SetText 0x778dc0` opens `if (!text) return;` (`0x778dcc`, wow-re
// `button-label-build-and-anchor-order.md`) — a nil never reaches the label at all, so
// it neither clears the text nor lazily creates the FontString. That guard is the
// BUTTON's own: a `FontString:SetText(nil)` is not a no-op, it truncates the cell
// (`0x771d80`, decision 2110). Below the guard the button is a pass-through to
// `[button+0x338]->0x771d80`.
let Some(text) = text else { return Ok(()) };
let id = ensure_slot(lua, &this, Slot::Text)?;
let mut model = lua.app_data_mut::<Model>().expect("model app_data");
let rh = *model.id_to_region.get(&id).expect("text region id");
model.region_data.entry(rh).or_default().text = text;
model.region_data.entry(rh).or_default().text = Some(text);
model.touch_measure(rh);
Ok(())
})?,
)?;
// GetText — like the FontString's own (`region::text`, decision 2110), an **empty label reads
// back nil**: `Button:GetText 0x780e10` carries the same first-byte substitution at `0x780ec5`,
// over three nil conditions rather than two (no label region, a NULL cell, an empty cell).
// Its EditBox neighbour deliberately does not — the law is per binding.
m.set(
"GetText",
lua.create_function(|lua, this: Table| {
@@ -492,6 +503,7 @@ pub(super) fn install(lua: &Lua) -> mlua::Result<()> {
let model = lua.app_data_ref::<Model>().expect("model app_data");
rh.and_then(|rh| model.region_data.get(&rh))
.and_then(|d| d.text.clone())
.filter(|t| !t.is_empty())
};
match text {
Some(t) => Ok(Value::String(lua.create_string(&t)?)),