Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function CheckColor()
- return term.isColour()
- end
- local function ColorError(file,x,y)
- local T = term.getTextColour()
- local B = term.getBackgroundColour()
- term.setBackgroundColour(colors.white)
- term.setTextColor(colors.white)
- local F = fs.open(F,"r")
- local Line
- term.setCursorPos(x,y)
- repeat
- term.setCursorPos(x,y)
- Line = F.readLine()
- if Line ~= nil then term.write(Line) y = y + 1 end
- until Line == nil
- F.close()
- term.setCursorPos(x,y - 1)
- term.setTextColor(colors.black)
- term.write("color not supported")
- end
- function PlayVideo(file,x,y)
- if CheckColor() == true then
- else
- ColorError(file,x,y)
- end
- end
- function LoadPicture(file,x,y)
- if CheckColor() == true then
- local Image = paintutils.loadImage(file)
- paintutils.drawImage(Image,x,y)
- else
- ColorError(file,x,y)
- end
- end
- function DisplayToMonitor(file,m)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement