OK, I've implemented sprite-based borders in the SpeechBubble module. As mentioned this led to a major rewrite, which I'm still not finished with, so this is just a beta of the new version that you can test out:
SpeechBubble v0.8.9The way you configure it is now a little bit different. I've moved all the formatting settings into a
SpeechBubbleFormat class, and you can set
SpeechBubble.TalkFormat and
SpeechBubble.ThinkFormat to control those formats separately, or just
SpeechBubble.Format to set the formatting for all SpeechBubbles generally (eventually you'll also be able to provide your own SpeechBubbleFormats to control the formatting of bubbles individually.
In your case, you'll need something like this to set up the formatting correctly:
// Set up the border
SpeechBubble.Format.BorderRenderMode = eRenderSprite; // Use sprites to render the border
SpeechBubble.Format.BorderSpriteTopLeft = 32; // Sprite index...
SpeechBubble.Format.BorderSpriteTopRight = 33;
SpeechBubble.Format.BorderSpriteBottomRight = 34;
SpeechBubble.Format.BorderSpriteBottomLeft = 35;
SpeechBubble.Format.BorderSpriteTop = 39;
SpeechBubble.Format.BorderSpriteBottom = 36;
SpeechBubble.Format.BorderSpriteLeft = 37;
SpeechBubble.Format.BorderSpriteRight = 38;
// Set up the tail
SpeechBubble.Format.TailRenderMode = eRenderSprite; // Use a sprite to render the tail
SpeechBubble.Format.TailSprite = 31;
SpeechBubble.Format.TailTipOffset = 35; // This is what x-coordinate in the tail sprite the tip is (the pixel that should be over the character's head)
SpeechBubble.Format.AllowTailSlide = false; // The tail will always be centered in the bubble
// We set negative padding so the text actually extends into the edge sprites (since they are quite big)
SpeechBubble.Format.PaddingTop = -10;
SpeechBubble.Format.PaddingBottom = -10;
SpeechBubble.Format.PaddingLeft = -20;
SpeechBubble.Format.PaddingRight = -20;
// General formatting
SpeechBubble.Format.BackgroundColor = Game.GetColorFromRGB(0, 0, 0); // Black background
SpeechBubble.Format.TextOutlineWidth = 2;