Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("top")
- mX,mY = m.getSize()
- function clear()
- m.setBackgroundColor(colors.red)
- m.clear()
- m.setCursorPos(1,1)
- end
- function drawText(x,y,text,color_text,color_bg)
- m.setBackgroundColor(color_bg)
- m.setTextColor(color_text)
- m.setCursorPos(x,y)
- m.write(text)
- end
- function drawLine(x,y,length,size,color_bar)
- for yPos = y, y+size-1 do
- m.setBackgroundColor(color_bar)
- m.setCursorPos(x,yPos)
- m.write(string.rep(" ",length))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement