Advertisement
se7enek

Untitled

May 23rd, 2015
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function drawMenu()
  2.   setBackgroundColor(colors.gray)
  3.   clear()
  4.   setBackgroundColor(colors.red)
  5.   setTextColor(colors.orange)
  6.   setCursorPos(5,4)
  7.   write("SKYBLOCK")
  8.   setCursorPos(18,4)
  9.   write("RUDY ITP")
  10.   setCursorPos(7,6)
  11.   write("SWIATY")
  12.   setCursorPos(18,6)
  13.   write("WALUTA")
  14.   setCursorPos(8,8)
  15.   write("SPAWN")
  16.   setCursorPos(18,8)
  17.   write("INNE")
  18.   setCursorPos(10,10)
  19.   write("ZABLOKOWANE")
  20.   setCursorPos(11,2)
  21.   write("REGULAMIN")
  22.  
  23.   setCursorPos(1,12)
  24.   setBackgroundColor(colors.gray)
  25.   setTextColor(colors.cyan)
  26.   write("Ekran Informacyjny Bonzaii.eu")
  27. end
  28.  
  29.  
  30. setBackgroundColor(colors.red)
  31. setTextColor(colors.orange)
  32. setCursorPos(26,12)
  33. write("MENU")
  34.  
  35.   while true do
  36.     local event, side, x, y = os.pullEvent("monitor_touch")
  37.  
  38.     if x >= 6 and x <= 8 and y == 12 and pageNum > 1 then
  39.       return pageNum - 1
  40.     elseif x >= 22 and x <= 24 and y == 12 and pagename ~= "rudy" and pageNum < 2 then
  41.       return pageNum + 1
  42.     elseif x >= 22 and x <= 24 and y == 12 and pageName == "rudy" and pageNum < 4 then
  43.       return pageNum + 1
  44.     elseif x >= 26 and x <= 30 and y == 12 then
  45.       drawMenu()
  46.       return
  47.     end
  48.   end
  49.  
  50.  
  51.  
  52. drawMenu()
  53.  
  54. while true do
  55.   local event, side, x, y = os.pullEvent("monitor_touch")
  56.  
  57.   local pageName
  58.   local pageNum = 1
  59.  
  60.   if x >= 11 and x <= 20 and y == 2 then
  61.     pageName = "regulamin"
  62.   elseif x >= 5 and x <= 12 and y == 4 then
  63.     pageName = "skyblock"
  64.   elseif x >= 18 and x <= 26 and y == 4 then
  65.     pageName = "rudy"
  66.   elseif x >= 7 and x <= 13 and y == 6 then
  67.     pageName = "swiaty"
  68.   elseif x >= 18 and x <= 24 and y == 6 then
  69.     pageName = "waluta"
  70.   elseif x >= 8 and x <= 13 and y == 8 then
  71.     pageName = "spawn"
  72.   elseif x >= 18 and x <= 22 and y == 8 then
  73.     pageName = "inne"
  74.   elseif x >= 10 and x <= 21 and y == 10 then
  75.     pageName = "blok"
  76.  
  77.   end
  78.  
  79.   while pageName and pageNum do
  80.     pageNum = drawPage(pageName, pageNum)
  81.   end
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement