Advertisement
FluttyProger

Untitled

Sep 22nd, 2015
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. function MassegeBox(MassegeBoxMode,MassegeBoxMessage_1,MassegeBoxMessage_2,MassegeBoxMessage_3)
  2. function MassegeBoxGui(select)
  3. term.setBackgroundColor(colors.pink)
  4. paintutils.drawImage(Menu_Message_Box,14,7)
  5. term.setCursorPos(16,8)
  6. term.setTextColor(colors.black)
  7. term.setBackgroundColor(colors.pink)
  8. print(MassegeBoxMessage_1)
  9. term.setCursorPos(16,9)
  10. print(MassegeBoxMessage_2)
  11. term.setCursorPos(16,10)
  12. print(MassegeBoxMessage_3)
  13. if MassegeBoxMode == "Yes/No" then
  14. if select == true then
  15. MassegeBoxOK=true
  16. term.setCursorPos(16,11)
  17. term.write(" [Yes] No ")
  18. MassegeBoxOK=true
  19. elseif select == false then
  20. MassegeBoxOK=false
  21. term.setCursorPos(16,11)
  22. term.write(" Yes [No] ")
  23. end
  24. MassegeBoxOK=select ----Это переменная в которой true - Yes а False - No
  25. end
  26. end
  27. MassegeBoxGui(true)
  28. bselect=true
  29. MassegeBoxOK=true
  30. if MassegeBoxMode == "Yes/No" then
  31. while true do
  32. event,key = os.pullEvent("key")
  33. if key == 205 then
  34. MassegeBoxGui(false)
  35. end
  36. if key == 203 then
  37. MassegeBoxGui(true)
  38. end
  39. if key == 28 then
  40. break
  41. end
  42. end
  43. elseif MassegeBoxMode == "OK" then
  44. term.setCursorPos(16,11)
  45. print(" [OK]")
  46. while true do
  47. event,key = os.pullEvent("key")
  48. if key == 28 then
  49. break
  50. end
  51. end
  52. -------
  53. end
  54. if MassegeBoxMode == "Clear" then
  55. ---Скрипт обновляющий экран
  56. end
  57. if MassegeBoxMode == "Show" then
  58. term.setTextColor(colors.white)
  59. else
  60. term.setTextColor(colors.white)
  61. ---Скрипт обновляющий экран
  62. end
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement