Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mainLoopOn = true
- local deviceScreenSize = {0, 0} -- this is set to the scren size
- local devicetype = "none"
- function LoadPercentSizes()
- if (devicetype == "turtle") then
- deviceScreenSize = {39, 13}
- elseif (devicetype == "computer") then
- deviceScreenSize = {51, 19}
- elseif (devicetype == "pocket") then
- deviceScreenSize = {26, 20}
- end
- end
- function MakeTextBox(x, y, sizex, sizey, boxcol, textcol, data)
- paintutils.drawFilledBox(x, y, x+sizex, y+sizey, boxcol)
- term.setCursorPos(x, y+(sizey/2))
- turtle.setTextColor(textcol)
- term.write(data)
- end
- function QuitProg()
- mainLoopOn = false
- term.clear()
- end
- -- Aight, start writing past here
- local devicetype = "turtle" -- this is used for percent - based sizing this can be turtle, computer, pocket is automaticaly set
- local isTabbedShell = false -- if this is on a advanced computer and ran in a tabbed shell
- LoadPercentSizes() -- percents will round to the nearest factor of screen size
- term.clear()
- while mainLoopOn do
- MakeTextBox(0, 0, 20, 10, colours.red, "Hola")
- os.sleep(5)
- QuitProg()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement