diff --git a/crates/benilla-ui/src/script/chat_bubble.rs b/crates/benilla-ui/src/script/chat_bubble.rs index 185574fd..17684d70 100644 --- a/crates/benilla-ui/src/script/chat_bubble.rs +++ b/crates/benilla-ui/src/script/chat_bubble.rs @@ -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::("return C_ChatBubbles.GetAllChatBubbles()[1]:GetTop()") + .unwrap(), + 340.0, + "and the height is added upward, not downward" + ); assert!( s.eval::( "local f = C_ChatBubbles.GetAllChatBubbles()[1]