Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function centerText(text)
- x,y = term.getSize()
- x1,y1 = term.getCursorPos()
- term.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1)
- term.write(text)
- end
- term.clear()
- x,y = term.getSize()
- x1, y1 = term.getCursorPos()
- term.setCursorPos(x1, math.floor(y/2))
- centerText("Nan-ni shimasho-ka?")
- x1, y1 = term.getCursorPos()
- term.setCursorPos(1, math.floor(y))
Advertisement
Add Comment
Please, Sign In to add comment