SHOW:
|
|
- or go back to the newest paste.
| 1 | local showList=false | |
| 2 | --Funcs | |
| 3 | os.loadAPI("button")
| |
| 4 | os.loadAPI("accounts.lua")
| |
| 5 | - | os.loadAPI("getPower.lua")
|
| 5 | + | |
| 6 | m = peripheral.wrap("top")
| |
| 7 | - | getPower.init() |
| 7 | + | |
| 8 | local oldterm = term.redirect(m) | |
| 9 | - | --rednet.open("bottom")
|
| 9 | + | |
| 10 | function fillTable() | |
| 11 | --button.setTable("List",toggleList,1,10,2,2)
| |
| 12 | --button.setTable("M0rt0sh",workshop,1,1,1,1)
| |
| 13 | --button.screen() | |
| 14 | - | button.setTable("List",toggleList,1,10,2,2)
|
| 14 | + | |
| 15 | ||
| 16 | - | button.screen() |
| 16 | + | |
| 17 | --event,side,x,y = os.pullEvent("monitor_touch")
| |
| 18 | --button.checkxy(x, y) | |
| 19 | end | |
| 20 | - | event,side,x,y = os.pullEvent("monitor_touch")
|
| 20 | + | |
| 21 | - | button.checkxy(x, y) |
| 21 | + | |
| 22 | --button.flash() | |
| 23 | --all underneath this you can edit the fuction to you own needs. | |
| 24 | --paintutils.drawLine(3, 3, 3, 5 ,colours.green) | |
| 25 | a = accounts.getAccounts() | |
| 26 | m.setCursorPos(1, 3) | |
| 27 | for i = 1, #a do | |
| 28 | m.setTextColor(colors.green) | |
| 29 | write(a[i].name,1,3+i) | |
| 30 | m.setTextColor(colors.white) | |
| 31 | write(" has ",1,3+i)
| |
| 32 | m.setTextColor(colors.green) | |
| 33 | write(a[i].cash,1,3+i) | |
| 34 | m.setTextColor(colors.white) | |
| 35 | write("$. Using: ",1,3+i)
| |
| 36 | m.setTextColor(colors.green) | |
| 37 | write(a[i].FPT,1,3+i) | |
| 38 | m.setTextColor(colors.white) | |
| 39 | write(" FE/t\n",1,3+i)
| |
| 40 | end | |
| 41 | end | |
| 42 | ||
| 43 | while true do | |
| 44 | m.clear() | |
| 45 | list() | |
| 46 | - | function toggleList() |
| 46 | + | |
| 47 | - | showList= not showList |
| 47 | + |