SHOW:
|
|
- or go back to the newest paste.
| 1 | {
| |
| 2 | [ "testwp.lua" ] = "os.loadAPI('tos/tos')\
| |
| 3 | print(tos.getPersistentVariable('wpc'))",
| |
| 4 | upline = "os.loadAPI('/uap')\
| |
| 5 | os.loadAPI('lg/lg')\
| |
| 6 | lg.setup('term')\
| |
| 7 | lg.fillScreen(colors.white)\ | |
| 8 | lg.fill(1,26,2,2,colors.lightGray)\ | |
| 9 | lg.drawText(2,4,colors.white,colors.gray,' Enter upline color: ')\ | |
| 10 | lg.drawInput(' ',2,25,6,6,20)\
| |
| 11 | \ | |
| 12 | lg.drawBT('heart',2,2,12,12,colors.black,colors.white,'\\3')\
| |
| 13 | lg.drawBT('note',4,4,12,12,colors.black,colors.white,'\\15')\
| |
| 14 | lg.drawBT('dot',6,6,12,12,colors.black,colors.white,'\\7')\
| |
| 15 | lg.drawBT('smileface',8,8,12,12,colors.black,colors.white,'\\2')\
| |
| 16 | lg.drawBT('blank',10,10,12,12,colors.white,colors.black,'\ ')\
| |
| 17 | lg.drawBT('save',2,6,17,17,colors.white,colors.green,' save ')\
| |
| 18 | local upl_col = \"gray\"\ | |
| 19 | local upl_sym = \"\\15\"\ | |
| 20 | if not lg.isColor(upl_col) then\ | |
| 21 | upl_col = \"gray\"\ | |
| 22 | end\ | |
| 23 | os.sleep(0.5)\ | |
| 24 | while true do\ | |
| 25 | local event, button, x, y = os.pullEvent( \"mouse_click\" )\ | |
| 26 | if (lg.isInput(x,y) == \" \") then\ | |
| 27 | upl_col = lg.getInput(x,y)\ | |
| 28 | if not lg.isColor(upl_col) then upl_col = \"gray\" end\ | |
| 29 | tos.writePersistentVariable(\"upl_col\",upl_col)\ | |
| 30 | elseif (lg.isButton(x,y) == 'heart') then\ | |
| 31 | upl_sym = '\\3'\ | |
| 32 | elseif (lg.isButton(x,y) == 'note') then\ | |
| 33 | upl_sym = '\\15'\ | |
| 34 | elseif (lg.isButton(x,y) == 'dot') then\ | |
| 35 | upl_sym = '\\7'\ | |
| 36 | elseif (lg.isButton(x,y) == 'smileface') then\ | |
| 37 | upl_sym = '\\2'\ | |
| 38 | elseif (lg.isButton(x,y) == 'blank') then\ | |
| 39 | upl_sym = '\ '\ | |
| 40 | elseif (lg.isButton(x,y) == 'save') then\ | |
| 41 | tos.writePersistentVariable('upl_sym', upl_sym)\
| |
| 42 | os.sleep(0.5)\ | |
| 43 | os.reboot()\ | |
| 44 | end\ | |
| 45 | if lg.isButton(x,y) or lg.isInput(x,y) then\ | |
| 46 | lg.drawText(2,14,colors.white,lg.getColor(upl_col)\ | |
| 47 | ,upl_sym)\ | |
| 48 | end \ | |
| 49 | end\ | |
| 50 | \ | |
| 51 | lg.exit()", | |
| 52 | settings = "os.loadAPI('lg/lg')\
| |
| 53 | os.loadAPI('tos/tos')\
| |
| 54 | os.loadAPI(\"uap\")\ | |
| 55 | lg.setup('term')\
| |
| 56 | lg.fillScreen(colors.white)\ | |
| 57 | lg.fill(1,26,2,2,colors.lightGray)\ | |
| 58 | \ | |
| 59 | lg.drawBT('wp',2,25,4,4,colors.black,colors.lightGray,' Wallpaper color')\
| |
| 60 | lg.drawBT('upl',2,25,6,6,colors.black,colors.lightGray,' Upper line settings')\
| |
| 61 | lg.drawBT('dwnl',2,25,8,8,colors.black,colors.lightGray,' Down line color')\
| |
| 62 | uap.upd()\ | |
| 63 | while true do\ | |
| 64 | local event, button, x, y = os.pullEvent( \"mouse_click\" )\ | |
| 65 | if (lg.isButton(x,y) == \"wp\") then\ | |
| 66 | tos.openFile('/settings/wallpaper')\
| |
| 67 | sleep(0.1)\ | |
| 68 | elseif (lg.isButton(x,y) == 'upl') then\ | |
| 69 | tos.openFile('/settings/upline')\
| |
| 70 | elseif (lg.isButton(x,y) == 'dwnl') then\ | |
| 71 | tos.openFile('/settings/dwnline')\
| |
| 72 | end\ | |
| 73 | end\ | |
| 74 | \ | |
| 75 | lg.exit()", | |
| 76 | wallpaper = "os.loadAPI('/uap')\
| |
| 77 | os.loadAPI('lg/lg')\
| |
| 78 | lg.setup('term')\
| |
| 79 | local wpcolor = \"gray\"\ | |
| 80 | if not lg.isColor(wpcolor) then\ | |
| 81 | wpcolor = \"gray\"\ | |
| 82 | end\ | |
| 83 | lg.fillScreen(colors.white)\ | |
| 84 | lg.fill(1,26,2,2,colors.lightGray)\ | |
| 85 | lg.drawText(2,4,colors.white,colors.gray,' Enter wallpaper color: ')\ | |
| 86 | lg.drawInput(' ',2,25,6,6,20)\
| |
| 87 | os.sleep(0.5)\ | |
| 88 | while true do\ | |
| 89 | local event, button, x, y = os.pullEvent( \"mouse_click\" )\ | |
| 90 | if (lg.isInput(x,y) == \" \") then\ | |
| 91 | local wpcolor = lg.getInput(x,y)\ | |
| 92 | tos.writePersistentVariable('color',wpcolor)\
| |
| 93 | end\ | |
| 94 | end\ | |
| 95 | \ | |
| 96 | lg.exit()", | |
| 97 | dwnline = "os.loadAPI('/uap')\
| |
| 98 | os.loadAPI('lg/lg')\
| |
| 99 | lg.setup('term')\
| |
| 100 | lg.fillScreen(colors.white)\ | |
| 101 | lg.fill(1,26,2,2,colors.lightGray)\ | |
| 102 | lg.drawText(2,4,colors.white,colors.gray,' Enter downline color: ')\ | |
| 103 | lg.drawInput(' ',2,25,6,6,20)\
| |
| 104 | local dwl_col = \"gray\"\ | |
| 105 | if not lg.isColor(dwl_col) then\ | |
| 106 | dwl_col = \"gray\"\ | |
| 107 | end\ | |
| 108 | os.sleep(0.5)\ | |
| 109 | while true do\ | |
| 110 | local event, button, x, y = os.pullEvent( \"mouse_click\" )\ | |
| 111 | if (lg.isInput(x,y) == \" \") then\ | |
| 112 | local dwl_col = lg.getInput(x,y)\ | |
| 113 | tos.writePersistentVariable('dwl_col',dwl_col)\
| |
| 114 | end\ | |
| 115 | end\ | |
| 116 | \ | |
| 117 | lg.exit()", | |
| 118 | } |