A quick little function to draw 9-slice boxes. Has modes for stretched or repeated sprites along the borders, and an optional background color. A little heavy for general use at ~444 tokens, and could probably be optimized further.
Use:
nineslice(x origin,y origin,width in px,height in px, sprite index for upper left corner, stretched mode (true/false), background color) |
[Please log in to post a comment]