This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
syseQ's profile picture

[WIP] Format API (ComputerCraft 1.6)

Started by syseQ, 24 January 2015 - 11:49 AM
syseQ #1
Posted 24 January 2015 - 12:49 PM
Format API
Allows to print text on the center of the screen and (WIP)fastly draw images.

pastebin get tEXh0pen format

This API is still WIP! The image fast drawing may not work properly!

Commands:

cPrint(sText) prints text on center of the screen
fastDraw(sPath, x, y) work in progress, it works but with error

Examples:

-- cPrint example
os.loadAPI("format") -- loads api
format.cPrint("Hello, centered world!") -- uses format's cPrint to print the text on center of the screen
More examples soon!

Feel free to use it in your programs!
Cya! - syseQ
InDieTasten #2
Posted 24 January 2015 - 02:07 PM
You definitely need more functions for your "library" to seem useful to others ;)/>
If I'm right, textutils has functionality for printing stuff in the center already.