|
|
@@ -34,18 +34,25 @@ except OSError:
|
|
34
|
34
|
|
|
35
|
35
|
keyb = Keyboard()
|
|
36
|
36
|
|
|
37
|
|
-text = "Press CTRL+D to clear text\n"+SD_status+"\n\n"
|
|
|
37
|
+intro_text = "Press CTRL+D to clear text\n"+SD_status+"\n\n"
|
|
|
38
|
+intro_text_area = label.Label(terminalio.FONT, text=intro_text, color="C3B")
|
|
|
39
|
+intro_text_area.x = 10
|
|
|
40
|
+intro_text_area.y = 10
|
|
|
41
|
+
|
|
|
42
|
+text = ""
|
|
38
|
43
|
text_area = label.Label(terminalio.FONT, text=text)
|
|
39
|
|
-text_area.x = 10
|
|
40
|
|
-text_area.y = 10
|
|
41
|
|
-board.DISPLAY.root_group = text_area
|
|
|
44
|
+text_area.x = 0
|
|
|
45
|
+text_area.y = 40
|
|
|
46
|
+
|
|
|
47
|
+board.DISPLAY.root_group = intro_text_area
|
|
|
48
|
+intro_text_area.append(text_area)
|
|
42
|
49
|
|
|
43
|
50
|
while True:
|
|
44
|
51
|
key = keyb.scan()
|
|
45
|
52
|
if key == "BACKSP":
|
|
46
|
53
|
text = text[:-1]
|
|
47
|
54
|
elif key == "CTRLD":
|
|
48
|
|
- text = "Press CTRL+D to clear text\n\n"
|
|
|
55
|
+ text = ""
|
|
49
|
56
|
else:
|
|
50
|
57
|
## WRAPPING
|
|
51
|
58
|
## calculate wrapping when entering a character
|