Advertisement
pepeknamornik

Jazyky

May 8th, 2015
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.78 KB | None | 0 0
  1. local nastaveni={barva=colors.blue}
  2. local f=fs.open("system/.core/colors","r")
  3. local cnt=f.readAll()
  4. f.close()
  5. local nastaveni=textutils.unserialize(cnt)
  6.      
  7. local f=fs.open("system/.core/textcol","r")
  8. local tnt=f.readAll()
  9. f.close()
  10. local text=textutils.unserialize(tnt)
  11. local propojeni = ""
  12.  
  13.  
  14.  
  15. local function prc(text, y)
  16.   local w = term.getSize()
  17.   local _, cy = term.getCursorPos()
  18.   term.setCursorPos(math.ceil((w-#text)/2), y or cy)
  19.   write(text)
  20. end
  21.  
  22. function jazyk ()
  23. funkce = "language"
  24. local myWindow = window.create(term.current(),16,1,37,19)
  25.     myWindow.setBackgroundColor(colors.white)
  26.     myWindow.clear()
  27.         local myWindow = window.create(term.current(),1,1,16,19)
  28.     myWindow.setBackgroundColor(colors.gray)
  29.     local myWindow = window.create(term.current(),1,1,15,19)
  30.     myWindow.setBackgroundColor(nastaveni.barva)
  31.     myWindow.clear()
  32.     term.setBackgroundColor (nastaveni.barva)
  33.     term.setTextColor(colors.lime)
  34.     term.setCursorPos(2,3)
  35.     print "< Language"
  36.     term.setTextColor(text.barva)
  37.     term.setCursorPos(2,5)
  38.     print "Account"
  39.     term.setCursorPos(2,7)
  40.     print "Primary"
  41.     term.setBackgroundColor(nastaveni.barva)
  42.        term.setCursorPos(1,1)
  43.        print "               "
  44.        paintutils.drawPixel(16, 1, colors.gray)
  45.     local myWindow = window.create(term.current(),17,1,37,19)
  46.     myWindow.setBackgroundColor(colors.white)
  47.     myWindow.clear()
  48.     term.setTextColor(colors.black)
  49.     term.setBackgroundColor(colors.red)
  50.     myWindow.setCursorPos (5,2)
  51.     print " Sorry, It is in progress.... "
  52.    
  53.     while true do
  54.         local event, button, x, y = os.pullEvent("mouse_click")
  55.         xy = x..","..y
  56.  
  57.     if x >= 2 and x <= 16 and y == 3 and button == 1 then
  58.     setupmenu ()
  59.     elseif x >= 2 and x <= 16 and y == 5 and button == 1 then
  60.     fs.delete ("/system/RAM/jazyk1")
  61.     shell.run ("pastebin get uVRBmFvy /system/RAM/jazyk1")
  62.     shell.run ("/system/RAM/jazyk1")
  63.     elseif x >= 2 and x <= 16 and y == 7 and button == 1 then
  64.     fs.delete ("/system/RAM/jazyk2")
  65.     shell.run ("pastebin get uVRBmFvy /system/RAM/jazyk2")
  66.     shell.run ("/system/RAM/jazyk2")
  67.     else
  68.     paintutils.drawLine(1, 1, 51, 1, colors.black)
  69.     paintutils.drawPixel (51,1, colors.red)
  70.     term.setTextColor(colors.white)
  71.     term.setCursorPos (51,1)
  72.     print "*"
  73.     paintutils.drawPixel (50,1, colors.lightGray)
  74.     term.setCursorPos (50,1)
  75.     print "<"
  76.     paintutils.drawPixel (49,1, colors.lightGray)
  77.     term.setCursorPos (49,1)
  78.     print "_"
  79.              while true do
  80.         local event, button, x, y = os.pullEvent("mouse_click")
  81.         xy = x..","..y
  82.        
  83.         if x == 51 and y == 1 then
  84.             plocha ()
  85.         elseif x == 50 and y == 1 then
  86.             setupmenu ()
  87.         elseif x == 49 and y == 1 then
  88.             minimalizace ()
  89.         else
  90.         language ()
  91.             end
  92.             end
  93. end
  94. end
  95. end
  96.  
  97. jazyk ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement