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

Digitec Api's - Nerdtalk, Prnt, Monma

Started by LDShadowLord, 09 November 2013 - 03:50 PM
LDShadowLord #1
Posted 09 November 2013 - 04:50 PM

DigiTec | Digital Technologies



AS OF NOW, ALL OF THE API'S BELOW ARE DEPRECATED AND WILL NO LONGER BE UPDATED TO WORK WITH NEW BUILDS!

My apologies, LDShadowLord.


My focus will be working on a new and updated API (Project Colligo) which will be my workhorse API!



Notes:

If you wish to find out more about the functions then each and every file is commented either at the top of the file or next to the function with it's purpose


I Will be providing a changelog with each API so you can keep up with versions.

Major builds will be marked in red

While Major-Minor and Minor builds will be marked blue and green, respectively.


Due to it being an API I can't really take any screenshots. Sorry about that.


License:

I, LDShadowLord, agree to allow any and all third parties the right to use my API's in their projects ,aslong as credit is given to the rights-holder, without need of royalties.


Released API's


NerdTalk:

An "All-Inclusive" API designed to do various graphical things on a computer

Pastebin: 9zdaF9SV


Functions:

(center,left,right)Print text- Print's the specified text in either the center, to the left or to the right.

(center,left,right)Write text- Write's the specified text in either the center, to the left or to the right.

getVersion - Returns the current version.

isAdvanced - Returns if the computer is advanced or not.

textStart x,y,colour,text - Starts typing the text at the specified x & y, in the specified colour.

clearPage - Clears the page and resets the cursor position.


Changelog:

Spoiler

1.0
Added getVersion
Tweaked centerPrint

1.1
Added isAdvanced

1.2
First public release
Started writing findside (Not included in build)
localised w,h







PRNT:

An API designed to work with a printer using native functions

Pastebin: zUKuFHPz


Functions:

Setup : Gets the printer ready to receive input

Title : Set's the title of the page (Note: Title will be automatically set if you do not use this)

GetCP : Finds the Cursor Pos

(L,C,R) Print : print Left, Print Center, Print Right

EndMain : Ends the printing session


Changelog:

Spoiler

1.0
Fixed a bug causing it not to print properly

1.1
First public release
Added GetVersion & started writing "NerdTalk" functions into it.






MonMa:

An API designed to work with a monitor using native functions

Pastebin: uuEEKTwN


Functions:

wrapMon : Wraps a monitor on the specified side

clear : Clears the monitor and resets the text

print : Writes the text and then goes to the next line


Changelog:

Spoiler

1.0
Added a debug function

Broke the print function (How in hell?) - will fix

1.1
First public release
Fixed the print function


Edited on 11 February 2014 - 11:07 AM
Symmetryc #2
Posted 09 November 2013 - 05:08 PM
Fairly clean and organized code for a beginner, keep up the good work :)/>.
LDShadowLord #3
Posted 09 November 2013 - 05:13 PM
Fairly clean and organized code for a beginner, keep up the good work :)/>.

Awww shucks :rolleyes:/>
Thankyou for the compliment. Much appreciated.
Symmetryc #4
Posted 09 November 2013 - 05:52 PM
Fairly clean and organized code for a beginner, keep up the good work :)/>.

Awww shucks :rolleyes:/>
Thankyou for the compliment. Much appreciated.
No problem. By the way, you can do #text instead of text:len().