SHOW:
|
|
- or go back to the newest paste.
| 1 | shell.run("config.lua")
| |
| 2 | shell.run("mainmenu.lua")
| |
| 3 | shell.run("staff.lua")
| |
| 4 | shell.run("staff.lua")
| |
| 5 | shell.run("rules.lua")
| |
| 6 | ||
| 7 | ||
| 8 | function clearscreen() | |
| 9 | monitor.clear() | |
| 10 | monitor.setCursorPos(1,1) | |
| 11 | monitor.setBackgroundColour((colours.lime)) | |
| 12 | end | |
| 13 | ||
| 14 | ||
| 15 | function getMouse() | |
| 16 | mouseWidth = 0 | |
| 17 | mouseHeight = 0 | |
| 18 | end | |
| 19 | ||
| 20 | ||
| 21 | function getSize() | |
| 22 | w,h=monitor.getSize() | |
| 23 | end | |
| 24 | ||
| 25 | ||
| 26 | function printSize() | |
| 27 | print(w) | |
| 28 | print(h) | |
| 29 | end | |
| 30 | ||
| 31 | ||
| 32 | - | function mainMenu() |
| 32 | + | function mainMenu2() |
| 33 | clearscreen() | |
| 34 | mainManu() | |
| 35 | end | |
| 36 | ||
| 37 | ||
| 38 | - | function staff() |
| 38 | + | function staff2() |
| 39 | clearscreen() | |
| 40 | staff() | |
| 41 | end | |
| 42 | ||
| 43 | ||
| 44 | - | function banneditems() |
| 44 | + | function banneditems2() |
| 45 | clearscreen() | |
| 46 | banneditems() | |
| 47 | end | |
| 48 | ||
| 49 | ||
| 50 | - | function rules() |
| 50 | + | function rules2() |
| 51 | clearscreen() | |
| 52 | rules() | |
| 53 | end | |
| 54 | ||
| 55 | ||
| 56 | function checkClickPosition() | |
| 57 | if mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 5 then | |
| 58 | ||
| 59 | rules() | |
| 60 | ||
| 61 | elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 10 then | |
| 62 | ||
| 63 | staff() | |
| 64 | ||
| 65 | elseif mouseWidth > 15 and mouseWidth < 25 and mouseHeight == 15 then | |
| 66 | ||
| 67 | Bitems() | |
| 68 | ||
| 69 | end | |
| 70 | end | |
| 71 | ||
| 72 | ||
| 73 | function mouseCheck() | |
| 74 | repeat | |
| 75 | ||
| 76 | ||
| 77 | event,p1,p2,p3 = os.pullEvent() | |
| 78 | ||
| 79 | ||
| 80 | if event=="monitor_touch" then | |
| 81 | ||
| 82 | ||
| 83 | mouseWidth = p2 -- sets mouseWidth | |
| 84 | mouseHeight = p3 -- and mouseHeight | |
| 85 | checkClickPosition() -- this runs our function | |
| 86 | ||
| 87 | end | |
| 88 | ||
| 89 | until event=="char" and p1==("x")
| |
| 90 | - | end |
| 90 | + | |
| 91 | ||
| 92 | config() | |
| 93 | clearscreen() | |
| 94 | getMouse() | |
| 95 | getSize() | |
| 96 | printSize() | |
| 97 | clearscreen() | |
| 98 | mainmenu2() | |
| 99 | mouseCheck() |