Posted 15 August 2014 - 08:20 PM
Hello! Im drikdrok and this is my second post on the CC forums and the second API i post! So today i was working on my OS and thought i should make an api that saves me from writing the same over and over Again (lazyness API) So here it is OPS. (Operating System) More updates coming soon!
Pastebin: pastebin 2zLnSKfQ get ops
Commands:
ops.reset() - Resets the screen including screen color.
ops.bgColor(color) - Sets the color and the checks if the computer allows colors.
ops.tColor(color) - Sets the textcolor and checks if the computer supports colors
ops.next(number) - scrolls Down the number of lines you write (hate doing the math of term.setCursorPos() )
ops.icon(path, x, y) - draws icon on the screen. good for desktops. path is the path of the image (rember to make it a string) and x and y are the coords.
ops.clock(x,y) – Creates a clock at x,y
ops.online() – Checks if the user has a wiresless motem on the computer(This will ouput as "Online" if true)
ops.msgBox(message, Name, color) – Make a box on the screen with the message you have entered. (Remember that name and message needs to be strings!) Note: You will need to redraw the screen after using this!
1.1 Update News:
Added new commands: clock(), online() and msgBox().
*Cleaned up code more.
*Improved the NeXT() command.
1.0.1 Update news:
Added new commmand : tColor()
*cleaned up code.
*If the bgcolor gets set to White the textcolor will change to Black
*reset() now also resets the textColor!
More will be coming soon as i said with the Development so yeah, hope you will enjoy!
Please report any bugs or errors below :)/>
Pastebin: pastebin 2zLnSKfQ get ops
Commands:
ops.reset() - Resets the screen including screen color.
ops.bgColor(color) - Sets the color and the checks if the computer allows colors.
ops.tColor(color) - Sets the textcolor and checks if the computer supports colors
ops.next(number) - scrolls Down the number of lines you write (hate doing the math of term.setCursorPos() )
ops.icon(path, x, y) - draws icon on the screen. good for desktops. path is the path of the image (rember to make it a string) and x and y are the coords.
ops.clock(x,y) – Creates a clock at x,y
ops.online() – Checks if the user has a wiresless motem on the computer(This will ouput as "Online" if true)
ops.msgBox(message, Name, color) – Make a box on the screen with the message you have entered. (Remember that name and message needs to be strings!) Note: You will need to redraw the screen after using this!
1.1 Update News:
Added new commands: clock(), online() and msgBox().
*Cleaned up code more.
*Improved the NeXT() command.
1.0.1 Update news:
Added new commmand : tColor()
*cleaned up code.
*If the bgcolor gets set to White the textcolor will change to Black
*reset() now also resets the textColor!
More will be coming soon as i said with the Development so yeah, hope you will enjoy!
Please report any bugs or errors below :)/>
Edited on 18 August 2014 - 04:59 PM