Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("config")
- function bg(col)
- term.setBackgroundColor(col)
- for xPos = 1,xMax do
- for yPos = 1,yMax do
- term.setCursorPos(xPos,yPos)
- term.write(" ")
- end
- end
- end
- function square(x1,y1,x2,y2,col)
- term.setBackgroundColor(col)
- for xPos = x1,x2 do
- for yPos = y1,y2 do
- term.setCursorPos(xPos,yPos)
- term.write(" ")
- end
- end
- end
- function JoJa(xP,yP)
- term.setCursorPos(xP,yP)
- term.setBackgroundColor(colors.gray)
- term.setTextColor(colors.cyan)
- term.write("Jo")
- term.setTextColor(colors.orange)
- term.write("Ja ")
- term.setTextColor(colors.lightGray)
- term.write("Productions")
- end
- function printLogIn(num)
- --layout
- term.setTextColor(Tcol2)
- square(3,5,xMax-2,5,Scol1)
- term.setCursorPos(3,5)
- term.write(" Login Register")
- square(3,6,xMax-2,yMax-4,Scol2)
- term.setCursorPos(xMax-4,5)
- term.setBackgroundColor(colors.red)
- term.write(" x ")
- --txt
- term.setTextColor(Tcol1)
- term.setBackgroundColor(Scol2)
- if num == 1 then
- term.setCursorPos(3,5)
- term.write(" Login ")
- term.setCursorPos(13,8)
- term.write("Username:")
- term.setCursorPos(13,10)
- term.write("Password:")
- term.setBackgroundColor(Scol1)
- term.setCursorPos(xMax/2-3,yMax-5)
- term.setTextColor(Tcol2)
- term.write(" Login ")
- term.setBackgroundColor(colors.gray)
- for i = 0,17 do
- term.setCursorPos(23+i,8)
- term.write(" ")
- term.setCursorPos(23+i,10)
- term.write(" ")
- end
- elseif num == 2 then
- term.setCursorPos(10,5)
- term.write(" Register ")
- term.setCursorPos(13,8)
- term.write("Username:")
- term.setCursorPos(13,10)
- term.write("Password:")
- term.setCursorPos(5,12)
- term.write("confirm Password:")
- term.setBackgroundColor(colors.gray)
- for i = 0,17 do
- term.setCursorPos(23+i,8)
- term.write(" ")
- term.setCursorPos(23+i,10)
- term.write(" ")
- term.setCursorPos(23+i,12)
- term.write(" ")
- end
- term.setBackgroundColor(Scol1)
- term.setCursorPos(xMax/2-4,yMax-5)
- term.setTextColor(Tcol2)
- term.write(" confirm ")
- end
- end
- bg(Bcol)
- square(1,1,xMax,1,colors.gray)
- JoJa(xMax/2-7,1)
- --printLogIn(2)
- --
- --term.setCursorPos(1,1)
- --
- stat = 1
- while true do
- printLogIn(stat)
- sleep(.1)
- event,button,x,y = os.pullEvent("mouse_click")
- --print(x.." "..y.." "..button)
- --3,5 9,5 10,5 19,5
- if x >= 3 and x <= 9 and y == 5 then
- stat = 1
- elseif x >= 10 and x <= 19 and y == 5 then
- stat = 2
- elseif x >= 47 and x <= 49 and y == 5 then
- os.reboot()
- end
- end
Add Comment
Please, Sign In to add comment