SHOW:
|
|
- or go back to the newest paste.
1 | - | local term = require("term") |
1 | + | local term = require("term") |
2 | - | local gpu = term.gpu() |
2 | + | local gpu = term.gpu() |
3 | - | |
3 | + | local dBack = 0xcf8013 |
4 | - | local sizeX, sizeY = term.getViewport() |
4 | + | local sizeX, sizeY = term.getViewport() |
5 | - | |
5 | + | |
6 | - | function clearScreen() |
6 | + | function clearScreen() |
7 | - | setBack(dBack) |
7 | + | setBack(dBack) |
8 | - | term.clear() |
8 | + | term.clear() |
9 | - | setCursor(1,1) |
9 | + | setCursor(1,1) |
10 | - | end |
10 | + | end |
11 | - | |
11 | + | |
12 | - | function setCursor(x,y) |
12 | + | function setCursor(x,y) |
13 | - | term.setCursor(x,y) |
13 | + | term.setCursor(x,y) |
14 | - | end |
14 | + | end |
15 | - | |
15 | + | |
16 | - | function setBack(color) |
16 | + | function setBack(color) |
17 | - | gpu.setBackground(color, false) |
17 | + | gpu.setBackground(color, false) |
18 | - | end |
18 | + | end |
19 | - | |
19 | + | |
20 | - | setBack(0xcf8013) |
20 | + | clearScreen() |
21 | - | clearScreen() |
21 | + | |
22 | - | |
22 | + | local t1 = "This part is still under developement" |
23 | - | local t1 = "This part is still under developement" |
23 | + | local l1 = string.len(t1)/2 |
24 | - | local l1 = string.len(t1)/2 |
24 | + | |
25 | - | |
25 | + | setCursor(sizeX/2-l1,sizeY/2) |
26 | - | setCursor(sizeX/2-l1,siizeY/2) |
26 | + | print(t1) |
27 | - | print(t1) |
27 | + | |
28 | - | os.sleep(4) |
28 | + | os.sleep(2) |
29 | os.execute("reboot") |