Advertisement
pepeknamornik

Nápověda P7

Jul 6th, 2020 (edited)
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.81 KB | None | 0 0
  1. local verze = "20.0707.R1"
  2. local anim = 0.1
  3. local w, h = term.getSize()
  4. ----------------------------------------------------
  5. local f=fs.open("/C/system/RAM/user","r")
  6. user=f.readLine()
  7. pass=f.readLine()
  8. Fname=f.readLine()
  9. Lname=f.readLine()
  10. f.close()
  11. local function bgc(barvaP) term.setBackgroundColor(barvaP) end
  12. local function txc(barvaP) term.setTextColor(barvaP) end
  13. local function curs(xi,yi) term.setCursorPos(xi,yi) end
  14. local function Barvy()
  15.     if fs.exists ("/C/system/Users/"..user.."/.Registry/colors") then
  16.     local data = fs.open("/C/system/Users/"..user.."/.Registry/colors", "r")
  17.     BarPoz = tonumber(data.readLine())
  18.     BarTxt = tonumber(data.readLine())
  19.     data.close()
  20.     end
  21.     if BarPoz == nil or BarTxt == nil then BarPoz = 2048 BarTxt = 1 end
  22. end
  23.  
  24. function ukonceni ()
  25.     error()
  26. end
  27.  
  28. function cbarva()
  29. lista.setTextColor(colors.black)
  30. lista.setBackgroundColor(colors.gray)
  31. end
  32.  
  33. function defaultvalue()
  34. end
  35.  
  36. function start()
  37. defaultvalue()
  38. local myWindow = window.create(term.current(),w/2-11,h/2-5,25,9)
  39. myWindow.setBackgroundColor(nastaveni.barva)
  40. myWindow.setTextColor(text.barva)
  41. myWindow.clear()
  42. myWindow.setCursorPos (6, 5)
  43. myWindow.write"Pepdroll Help"
  44. myWindow.setCursorPos (1, 9)
  45. myWindow.write(verze)
  46. myWindow.setCursorPos (1, 1)
  47. myWindow.write"Pepek@Soft"
  48. myWindow.setCursorPos (22, 9)
  49. myWindow.write"2020"
  50. sleep(1)
  51. menu()
  52. end
  53.  
  54. function plocha()
  55. w, h = term.getSize()
  56. paintutils.drawLine(1, 1, 51, 1, nastaveni.barva)
  57. paintutils.drawPixel (51,1, colors.red)
  58. term.setCursorPos (51,1)
  59. term.setTextColor(text.barva)
  60. write "*"
  61. barW = window.create(term.current(),1,2,w,1)
  62. barW.setBackgroundColor(colors.gray)
  63. barW.clear()
  64. barW.setTextColor(colors.white)
  65. barW.setCursorPos(2,1)
  66. barW.write"Helper >"
  67. pozadi = window.create(term.current(),13,3,w,h-2)
  68. pozadi.setBackgroundColor(colors.white)
  69. pozadi.setTextColor(colors.black)
  70. pozadi.clear()
  71. lista = window.create(term.current(),1,3,12,h-2)
  72. lista.setBackgroundColor(nastaveni.barva)
  73. lista.setTextColor(text.barva)
  74. lista.clear()
  75. lista.setCursorPos(2,3)
  76. lista.write"Tips"
  77. lista.setCursorPos(2,5)
  78. lista.write"Prikazy"
  79. lista.setCursorPos(2,7)
  80. lista.write"Network"
  81. lista.setCursorPos(2,9)
  82. lista.write"AD server"
  83. lista.setCursorPos(2,11)
  84. lista.write"Contacts"
  85. lista.setCursorPos(2,h-2)
  86. lista.setTextColor(colors.white)
  87. lista.write("Pepek@Soft")
  88. term.setBackgroundColor(colors.lightGray)
  89. end
  90. -----------------------------------------------------------------------------
  91. local page = "main"
  92.  
  93. function main()
  94. barW.setCursorPos(11,1)
  95. barW.write"Tips"
  96. pozadi.setCursorPos(2,3)
  97. pozadi.write"ENTER - Fast login, If you have a "
  98. pozadi.setCursorPos(2,4)
  99. pozadi.write"password, you can type it now, the "
  100. pozadi.setCursorPos(2,5)
  101. pozadi.write"password will be written."
  102. pozadi.setCursorPos(2,8)
  103. pozadi.write"CTRL - desktop menu"
  104. pozadi.setCursorPos(2,9)
  105. pozadi.write"BACKSPACE - go to up directory"
  106. pozadi.setCursorPos(2,10)
  107. pozadi.write"Q - Quit File Explorer"
  108. pozadi.setCursorPos(2,13)
  109. pozadi.write"R. Click to MENU - Shutdown menu"
  110. pozadi.setCursorPos(2,14)
  111. pozadi.write"R. Click - Second menu"
  112. pozadi.setTextColor(colors.red)
  113. pozadi.setCursorPos(2,2)
  114. pozadi.write"Keyboard in login screen"
  115. pozadi.setCursorPos(2,7)
  116. pozadi.write"Keyboard in explorer"
  117. pozadi.setCursorPos(2,12)
  118. pozadi.write"Mouse in explorer"
  119. end
  120.  
  121. function menu()
  122.     plocha()
  123.     if (page == "main") then
  124.         main ()
  125.     end
  126.  
  127.     while true do
  128.         local event, button, x, y = os.pullEvent("mouse_click")
  129.         xy = x..","..y
  130.        
  131.         if event == "mouse_click" and x >= 2 and x <= 12 and y == 5 then
  132.         cbarva()
  133.         lista.setCursorPos(1,3)--
  134.         lista.write" Tips       "
  135.         sleep(anim)
  136.         page = "main"
  137.         menu()
  138.         end
  139.        
  140.        
  141.         if x == 51 and y == 1 then
  142.             ukonceni ()
  143.         else
  144.             menu() -------- stejne jako nazev funkce
  145.         end
  146.     end
  147. end
  148.  
  149. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement