Advertisement
BIOSFERA

Untitled

Oct 18th, 2017
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. local event = require("event")
  2. local gpu = require('gpu')
  3. event.shouldInterrupt = function() return false end
  4. event.shouldSoftInterrupt = event.shouldInterrupt
  5.  
  6. --------------------------------------------------------------
  7.  
  8. function menu0()
  9. print("\n МАГАЗИН\n")
  10. print("1. Продажа")
  11. print("2. Покупка ")
  12. print("3. Об авторе")
  13. print("4. Оставить отзыв\n")
  14. print("* для навигации в меню введите номер интересующего вас пункта")
  15. local text = tonumber(io.read())
  16. if text == 1 then
  17. sale()
  18. elseif text == 2 then
  19. purchase()
  20. elseif text == 3 then
  21. about()
  22. elseif text == 4 then
  23. zpOtz("No name")
  24. end
  25. end
  26.  
  27. function sale()
  28. print("\nДанная опция в разработке\n")
  29. print("* для навигации в меню введите номер интересующего вас пункта")
  30. local text = tonumber(io.read ())
  31. end
  32.  
  33. function purchase()
  34. print("\nДанная опция в разработке\n")
  35. print("* для навигации в меню введите номер интересующего вас пункта")
  36. local text = tonumber(io.read ())
  37. end
  38.  
  39. function about()
  40. print("\nПрограмма 'Магазин' разработана и набрана на телефоне Nokia 309\nРазработчик - Asior\nИзменять код разрешаю\n")
  41. print("* для навигации в меню введите номер интересующего вас пункта")
  42. local text = tonumber(io.read ())
  43. end
  44.  
  45. function zpOtz(name)
  46. print("\nТут вы можете оставить свой отзыв\nДля сохранения отзыва нажмите Enter")
  47. local text = io.read()
  48. if text ~=""then
  49. local file = io.open("../Otz.txt","a")
  50. print("Идет сохранение вашего отзыва")
  51. print(io.write(name.." > "..text.."\n"))
  52. io.close(file)
  53. end
  54. end
  55.  
  56.  
  57. while true do
  58. menu0()
  59. end
  60.  
  61. gpu.setResolution(gpu.maxResolution())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement