Skip to content
TheBoxFox edited this page Dec 19, 2017 · 1 revision

Welcome to the OpenComputers wiki!

# Foxlib Foxlib is a library designed for simple utility. While it serves no direct purpose the combination of various tools is helpful in rough development. Currently, Foxlib contains a handful of commands used in program operation and interfacing.

foxlib.fs

Foxlib.fs is the filesystem class of the foxlib library. You can trust that if it is within this section, it likely has some file io in it.

foxlib.fs.writeCFG(file,table)

This function takes two variables to create or save a configuration file. The first argument is the information used to create the file hander while the second argument is the table that is written to the file once it is opened.

foxlib.fs.readCFG(file)

This one does what it says it does, probably the most straightforward library function yet. Returns a table.

foxlib.ui

foxlib.ui.box

This is the class for the creation of separate text boxes on the display of a computer.

foxlib.ui.box.new()

This returns a new object, or rather a new box.

foxlib.ui.box.draw(object)

This draws the text, starting at the left most available position of the screen.

foxlib.ui.box.drawCenter(object)

This draws text centered by dividing box.w and the length of box.text then adding the value of box.x (box.x = box.x+(box.w/2-#box.text/2)

foxlib.x,y,w,hand text

These are the variables use to control the textbox constructor. With them, you can adjust an bend the boxes as needed to fit your application