SHOW:
|
|
- or go back to the newest paste.
1 | ligne="" | |
2 | colone="" | |
3 | tail="" | |
4 | ma="" | |
5 | print("Orientation ecran") | |
6 | print("1=haut, 2=bas , 3=gauche , 4=droite ,5=deriere") | |
7 | mon = read() | |
8 | if (mon=="1") then | |
9 | ma="top" | |
10 | end | |
11 | ||
12 | if (mon=="2") then | |
13 | ma="bottom" | |
14 | end | |
15 | ||
16 | if (mon=="3") then | |
17 | ma="left" | |
18 | end | |
19 | ||
20 | if (mon=="4") then | |
21 | ma="right" | |
22 | end | |
23 | ||
24 | if (mon=="5") then | |
25 | ma="back" | |
26 | end | |
27 | mp = peripheral.wrap(ma) | |
28 | mp.clear() | |
29 | ||
30 | side = mp.getSize() | |
31 | central= side/2 | |
32 | ||
33 | print("Quel Taile de police") | |
34 | tail = read() | |
35 | tail=tail+0 | |
36 | ||
37 | mp.setTextScale(tail) | |
38 | print("Centrer texte (oui , non ? ") | |
39 | cent=read() | |
40 | print("Commence sur quel colone ?") | |
41 | colone=read() | |
42 | if (cent=="oui") then | |
43 | mp.setCursorPos(central,colone) | |
44 | else | |
45 | print("Commence sur quel ligne ? ") | |
46 | ligne=read() | |
47 | ||
48 | ligne=ligne+0 | |
49 | end | |
50 | ||
51 | print("Commence sur quel colone ?") | |
52 | colone=read() | |
53 | colone=colone+0 | |
54 | mp.setCursorPos(ligne,colone) | |
55 | print("De quel couleur ? ") | |
56 | ||
57 | print("Palette de couleur") | |
58 | term.setTextColor(colors.white) | |
59 | print("1 = blanc") | |
60 | term.setTextColor(colors.red) | |
61 | print("2 = rouge") | |
62 | term.setTextColor(colors.blue) | |
63 | print("3 = bleu") | |
64 | term.setTextColor(colors.green) | |
65 | print("4 = vert") | |
66 | term.setTextColor(colors.brown) | |
67 | print("5 = marron") | |
68 | term.setTextColor(colors.lime) | |
69 | print("6 = vert clair") | |
70 | term.setTextColor(colors.magenta) | |
71 | print("7 = magenta") | |
72 | term.setTextColor(colors.orange) | |
73 | print("8 = orange") | |
74 | term.setTextColor(colors.pink) | |
75 | print("9 = rose") | |
76 | term.setTextColor(colors.yellow) | |
77 | print("10 = jaune") | |
78 | term.setTextColor(colors.white) | |
79 | local couleur= read() | |
80 | if (couleur=="1") then | |
81 | mp.setTextColor(colors.white) | |
82 | end | |
83 | if (couleur=="2") then | |
84 | mp.setTextColor(colors.red) | |
85 | end | |
86 | if (couleur=="3") then | |
87 | mp.setTextColor(colors.blue) | |
88 | end | |
89 | if (couleur=="4") then | |
90 | mp.setTextColor(colors.green) | |
91 | end | |
92 | if (couleur=="5") then | |
93 | mp.setTextColor(colors.brown) | |
94 | end | |
95 | if (couleur=="6") then | |
96 | mp.setTextColor(colors.lime) | |
97 | end | |
98 | if (couleur=="7") then | |
99 | mp.setTextColor(colors.magenta) | |
100 | - | mp.write(text) |
100 | + | |
101 | if (couleur=="8") then | |
102 | mp.setTextColor(colors.orange) | |
103 | end | |
104 | if (couleur=="9") then | |
105 | mp.setTextColor(colors.pink) | |
106 | end | |
107 | if (couleur=="10") then | |
108 | mp.setTextColor(colors.yellow) | |
109 | end | |
110 | print("yolo") | |
111 | print("Quel texte voulez vous afficher") | |
112 | text=read() | |
113 | ||
114 | mp.write(text) | |
115 | cur = mp.getCursorPos() | |
116 | moyen = cur-central | |
117 | mp.clear() | |
118 | ||
119 | final = central-(moyen/2) | |
120 | mp.setCursorPos(final,1) | |
121 | mp.write(text) | |
122 | print(side) | |
123 | print(cur) | |
124 | print(moyen) |