Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function frame(monitor,pos1,pos2,length,height,color1,color3,thicc)
- local m = peripheral.wrap(monitor)
- m.setBackgroundColor(colors[color1])
- fill(monitor, pos1 - 1, pos2 - height, length, height * 2)
- m.setBackgroundColor(oldcol)
- xm = m.getBackgroundColor()
- xb = m.getTextColor()
- m.setTextColor(xm)
- m.setBackgroundColor(xb)
- m.setCursorPos(pos1 - 1, pos2 - height)
- if thicc then
- m.setBackgroundColor(colors[color3])
- end
- if thicc then
- m.write(string.rep("\x83", length + 1)) --\143
- m.setTextColor(xb)
- m.setBackgroundColor(xm)
- else
- m.write("\159" .. string.rep("\143", length - 1)) --\x83
- m.setTextColor(xb)
- m.setBackgroundColor(xm)
- m.write("\144")
- end
- if thicc then
- m.setBackgroundColor(colors[color3])
- end
- m.setCursorPos(pos1 - 1, pos2 + height)
- if thicc then
- m.write(string.rep("\x8c", length + 1)) --\131
- else
- m.write("\130" .. string.rep("\131", length - 1) .. "\129") --\x8c
- end
- for i = 0, (height * 2) - 2 do
- if not thicc then
- m.setTextColor(xm)
- m.setBackgroundColor(xb)
- end
- m.setCursorPos(pos1 - 1, (pos2 + i) - (height) + 1)
- if thicc then
- m.setBackgroundColor(colors[color3])
- end
- m.write("\x95")
- m.setCursorPos((pos1 - 2) + (length + 1), (pos2 + i) - (height) + 1)
- if not thicc then
- m.setTextColor(xb)
- m.setBackgroundColor(xm)
- end
- m.write("\x95")
- end
- end
Add Comment
Please, Sign In to add comment