Here's my (probably derpy) function right now. It does use a custom API that I wrote that just prints in the center of the screen, so pay that no mind.
local function INloading(program,percent)
term.clear()
term.setCursorPos(1,1)
print(".-----------------------------------------------.")
print("| Installing |")
print("| |")
smartWrite.writeC(program,0,3)
print("| |")
smartWrite.writeC("Percent Complete: "..math.floor(percent).."%",0,4)
print("| +-------------------------------------------+ |")
print("| | | |")
for i = 1,percent,.1 do
term.setCursorPos(i+3,6)
write("/")
end
print("| +-------------------------------------------+ |")
print("'-----------------------------------------------'")
end
It's supposed to display a box as wide as the screen is, with it displaying the string name of the program, and the percentage of completion. The percentage can be entered as fractions, such as for a program that has three components, entering (1/3), and it would do 33.33%, and so on…So far though, it will overfill the loading bar, because the screen is much less than 100 characters wide.
Any help would be appreciated.