Advertisement
Alakazard12

CommuteOS Login

Dec 24th, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. GUI.setColors(colors.gray, colors.red)
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. GUI.line(colors.red, 1, GUI.w+1, 1)
  5. GUI.line(colors.red, 1, GUI.w, GUI.h)
  6.  
  7. local function round(num)
  8.     local ln = num - math.floor(num)
  9.     if ln >= 0.5 then
  10.         return math.ceil(num)
  11.     else
  12.         return math.floor(num)
  13.     end
  14. end
  15.  
  16. for i = 2, GUI.h do
  17.     GUI.pixel(colors.red, 1, i)
  18. end
  19.  
  20. for i = 2, GUI.h do
  21.     GUI.pixel(colors.red, GUI.w, i)
  22. end
  23.  
  24. GUI.setColors(colors.gray, colors.white)
  25. GUI.cPrint("CommuteOS Login", 3)
  26.  
  27. GUI.cPrint("Username:           ", 5)
  28. GUI.cPrint("Password:           ", 6)
  29.  
  30. GUI.setColors(colors.gray, colors.cyan)
  31.  
  32. term.setCursorPos(round(round(GUI.w-1)/2), 5)
  33. local user = read()
  34.  
  35. term.setCursorPos(round(round(GUI.w-1)/2), 6)
  36. local pass = read("*")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement