Log In  


Cart #textfit-0 | 2023-12-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Hello again, Toy Box Jammers!

This cart has a few tools that are handy when using text.

By editing the text in this cart, and rerunning it, you can encode all the text for your game in a string, while setting the maximum width and height of individual pages. It can also embed x- and y-offsets so that your text prints centered without requiring any additional code (just print!), and optionally, you can have it return the width and height of each text box so that you can put nice borders (such as the included "speech bubble") around it.

Simply include one of the two decode functions in your program, and call it with the text that's copied to the clipboard after running this cart, and the decoder will return a table organized into:

table[string_number][page_number] (stored as a str)

or

table[string_number][page_number][1...3] (stored in w, h, str order)

2



[Please log in to post a comment]