Is there any way that I can shorten this code?
--gui functions
local function draw()
term.setTextColor(colors.white)
term.setBackgroundColor(colors.black)
local b = string.len("+---++---++---+")/2
local x = (tX/2)-b
term.setCursorPos(x,3)
write("+---++---++---+")
term.setCursorPos(x,4)
write("| ")
term.setTextColor(colors.gray)
write("1")
term.setTextColor(colors.white)
write(" || ")
term.setTextColor(colors.gray)
write("2")
term.setTextColor(colors.white)
write(" || ")
term.setTextColor(colors.gray)
write("3")
term.setTextColor(colors.white)
write(" |")
term.setCursorPos(x,5)
write("+---++---++---+")
term.setCursorPos(x,6)
write("+---++---++---+")
term.setCursorPos(x,7)
write("| ")
term.setTextColor(colors.gray)
write("4")
term.setTextColor(colors.white)
write(" || ")
term.setTextColor(colors.gray)
write("5")
term.setTextColor(colors.white)
write(" || ")
term.setTextColor(colors.gray)
write("6")
term.setTextColor(colors.white)
write(" |")
term.setCursorPos(x,8)
write("+---++---++---+")
term.setCursorPos(x,9)
write("+---++---++---+")
term.setCursorPos(x,10)
write("| ")
term.setTextColor(colors.gray)
write("7")
term.setTextColor(colors.white)
write(" || ")
term.setTextColor(colors.gray)
write("8")
term.setTextColor(colors.white)
write(" || ")
term.setTextColor(colors.gray)
write("9")
term.setTextColor(colors.white)
write(" |")
term.setCursorPos(x,11)
write("+---++---++---+")
term.setCursorPos(x,12)
write("+---++---++---+")
term.setCursorPos(x,13)
write("|")
term.setTextColor(colors.red)
write("CLR")
term.setTextColor(colors.white)
write("|| ")
term.setTextColor(colors.gray)
write("0")
term.setTextColor(colors.white)
write(" ||")
term.setTextColor(colors.green)
write("ENT")
term.setTextColor(colors.white)
write("|")
term.setCursorPos(x,14)
write("+---++---++---+")
end