superwow: pin the bubble's seat, the one placement that could be silently wrong

The widget tests proved the frame's size, its alpha and its text; none of
them would have noticed an anchor on the wrong point, which would still
size and draw — just in the wrong place. The bubble hangs from its bottom
centre on the projected point and grows UPWARD (`0x4b0c30`), so the test
now reads `GetCenter`, `GetBottom` and `GetTop` back and pins all three.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
2026-10-25 16:13:03 -06:00
co-authored by Claude Opus 5
parent 434d514879
commit 1e9ef80c41
@@ -696,6 +696,26 @@ mod tests {
return f:GetWidth() == 120 and f:GetHeight() == 40 and f:GetAlpha() == 0.5"
)
.unwrap());
// **The seat, which is the one thing most easily wrong**: the bubble hangs from its bottom
// centre on the projected point and grows UPWARD (`0x4b0c30`). An anchor on the wrong
// point would still size and draw, just in the wrong place — and nothing else here would
// notice.
assert_eq!(
s.eval::<(f64, f64)>(
"local f = C_ChatBubbles.GetAllChatBubbles()[1]
local cx = f:GetCenter()
return cx, f:GetBottom()"
)
.unwrap(),
(400.0, 300.0),
"bottom centre on the seat the app handed over"
);
assert_eq!(
s.eval::<f64>("return C_ChatBubbles.GetAllChatBubbles()[1]:GetTop()")
.unwrap(),
340.0,
"and the height is added upward, not downward"
);
assert!(
s.eval::<bool>(
"local f = C_ChatBubbles.GetAllChatBubbles()[1]