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

TNTAPI 0.2 Alpha

Started by TNT_Nolan, 12 April 2016 - 06:00 PM
TNT_Nolan #1
Posted 12 April 2016 - 08:00 PM
Hello! This is my first api I built which took me around 15 minutes. I am excited to present my api to everyone out there.

6 functions (This is an alpha build remember that before you start typing : LACKS FEATURES THIS THING SUCKS) :P/>


os.loadAPI("tntapi")

tntapi.easyClear()

--Usage tntapi.easyClear(colors.?,x, y)
tntapi.easyClear(colors.blue,1,1)
tntapi.easyTextwColor()

--Usage tntapi.TextwColor(colors.?,"text", mode)
-- Mode 1 == term.write, Mode 2 == print
tntapi.TextwColor(colors.lime,"Hello!",2)
tntapi.easyText()

-- Usage tntapi.easyText("text", mode, x, y)
-- Mode 1 == term.write, Mode 2 == print
tntapi.easyText("Hello!",2,1,1)
tntapi.setScreen()

-- Usage tntapi.setScreen(x,y,backgroundcolor,textcolor)
tntapi.setScreen(1,1,colors.orange,colors.black)
tntapi.waitForKey()

-- Usage tntapi.waitForKey(keys.?,"*put the key you put here")
tntapi.waitForKey(keys.e,"e")
tntapi.waitKey()

-- Usage is just tntapi.waitKey()
tntapi.waitKey()

Download: pastebin get JUMs0kbz tntapi
Please tell me any recommendations to add or bugs to fix!

Cheers,
Nolan

Update Log:

0.2 Alpha
-Added waitforKey and waitKey commands
Edited on 13 April 2016 - 03:37 PM
Corona #2
Posted 12 April 2016 - 10:58 PM
It would be nice to know what your API is good for and what the methods do in particular! (:
I always get a bad mood, if I have to look through the code itself to figure out the meaning of a function!