Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --TNT_Nolan's API
- function easyClear(coloru, x, y)
- term.setTextColor(coloru)
- term.setCursorPos(x,y)
- end
- function easyTextwColor(coloru, text, mode)
- term.setTextColor(coloru)
- if mode == 1 then
- term.write(text)
- elseif mode == 2 then
- print(text)
- end
- end
- function easyText(text, mode, x, y)
- term.setCursorPos(x,y)
- if mode == 1 then
- term.write(text)
- elseif mode == 2 then
- print(text)
- else
- term.setTextColor(colors.red)
- print("Mode 1 = term.write, Mode 2 = print")
- end
- end
- function setScreen(x,y,backgroundcolor,textcolor)
- term.setBackgroundColor(backgroundcolor)
- term.clear()
- term.setCursorPos(x,y)
- term.setTextColor(textcolor)
- end
- function waitForKey(key, keystring)
- print("Press the "..keystring.." to continue...")
- local event, key = os.pullEvent( "key" )
- if key == key then
- return
- end
- end
- function waitKey()
- print("Press any key continue...")
- os.pullEvent("key")
- end
Advertisement
Add Comment
Please, Sign In to add comment