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

Building an API

Started by ebernerd, 26 January 2015 - 12:46 AM
ebernerd #1
Posted 26 January 2015 - 01:46 AM
I'm not sure if this is the board this post belongs on. If not, please move it!

I'm creating the Display API for ComputerCraft; a really simple and easy to use API to make your programs look prettier.

Additions so far:

centerPrint(text,y)
Prints your text directly in the center of the screen, and drops down a line.

centerWrite(text,y)
Prints your text directly in the center of the screen, however cursor is placed right after last character in string (similar to "term.write")

rightPrint(text,y)
Aligns your text to the right side of the screen, and drops down a line.

rightWrite(text,y)
Aligns your text to the right side of the screen, and places cursor after final character.

cls()
Shorthand for "term.clear() term.setCursorPos(1,1)"

text(color)
Shorthand for "term.setTextColor(color)"

bg(color)
Shorthand for "term.setBackgroundColor(color)"


What I want to know is… what would you like in this api? Let me know!
InDieTasten #2
Posted 26 January 2015 - 12:54 PM
This definitely belongs in the API's and utilities/programs section. You are not having a technical problem related to syntax, misbehaviour or design ;)/>
ebernerd #3
Posted 26 January 2015 - 01:29 PM
This definitely belongs in the API's and utilities/programs section. You are not having a technical problem related to syntax, misbehaviour or design ;)/>
Thanks. I didn't want to post it there because I don't have a finished product yet, but anyways. Thank you!
KingofGamesYami #4
Posted 26 January 2015 - 01:37 PM
I'd think this would go in General, seeing as there isn't any code / links to code posted.