|
8 | 8 |
|
9 | 9 | DISPLAY_WIDTH = 320 |
10 | 10 | DISPLAY_HEIGHT = 240 |
| 11 | +TEXT = "Hello" |
11 | 12 |
|
12 | | -text_group = displayio.Group(max_size=9) |
13 | | -text = "Hello" |
14 | | -text_area_top_left = label.Label(terminalio.FONT, text=text) |
| 13 | +text_area_top_left = label.Label(terminalio.FONT, text=TEXT) |
15 | 14 | text_area_top_left.anchor_point = (0.0, 0.0) |
16 | 15 | text_area_top_left.anchored_position = (10, 10) |
17 | 16 |
|
18 | | -text_area_top_middle = label.Label(terminalio.FONT, text=text) |
| 17 | +text_area_top_middle = label.Label(terminalio.FONT, text=TEXT) |
19 | 18 | text_area_top_middle.anchor_point = (0.5, 0.0) |
20 | 19 | text_area_top_middle.anchored_position = (DISPLAY_WIDTH/2, 10) |
21 | 20 |
|
22 | | -text_area_top_right = label.Label(terminalio.FONT, text=text) |
| 21 | +text_area_top_right = label.Label(terminalio.FONT, text=TEXT) |
23 | 22 | text_area_top_right.anchor_point = (1.0, 0.0) |
24 | 23 | text_area_top_right.anchored_position = (DISPLAY_WIDTH-10, 10) |
25 | 24 |
|
26 | | -text_area_middle_left = label.Label(terminalio.FONT, text=text) |
| 25 | +text_area_middle_left = label.Label(terminalio.FONT, text=TEXT) |
27 | 26 | text_area_middle_left.anchor_point = (0.0, 0.5) |
28 | | -text_area_middle_left.anchored_position = (10,DISPLAY_HEIGHT/2) |
| 27 | +text_area_middle_left.anchored_position = (10, DISPLAY_HEIGHT/2) |
29 | 28 |
|
30 | | -text_area_middle_middle = label.Label(terminalio.FONT, text=text) |
| 29 | +text_area_middle_middle = label.Label(terminalio.FONT, text=TEXT) |
31 | 30 | text_area_middle_middle.anchor_point = (0.5, 0.5) |
32 | | -text_area_middle_middle.anchored_position = (DISPLAY_WIDTH/2,DISPLAY_HEIGHT/2) |
| 31 | +text_area_middle_middle.anchored_position = (DISPLAY_WIDTH/2, DISPLAY_HEIGHT/2) |
33 | 32 |
|
34 | | -text_area_middle_right = label.Label(terminalio.FONT, text=text) |
| 33 | +text_area_middle_right = label.Label(terminalio.FONT, text=TEXT) |
35 | 34 | text_area_middle_right.anchor_point = (1.0, 0.5) |
36 | 35 | text_area_middle_right.anchored_position = (DISPLAY_WIDTH-10, DISPLAY_HEIGHT/2) |
37 | 36 |
|
38 | | - |
39 | | -text_area_bottom_left = label.Label(terminalio.FONT, text=text) |
| 37 | +text_area_bottom_left = label.Label(terminalio.FONT, text=TEXT) |
40 | 38 | text_area_bottom_left.anchor_point = (0.0, 1.0) |
41 | 39 | text_area_bottom_left.anchored_position = (10, DISPLAY_HEIGHT) |
42 | 40 |
|
43 | | -text_area_bottom_middle = label.Label(terminalio.FONT, text=text) |
| 41 | +text_area_bottom_middle = label.Label(terminalio.FONT, text=TEXT) |
44 | 42 | text_area_bottom_middle.anchor_point = (0.5, 1.0) |
45 | 43 | text_area_bottom_middle.anchored_position = (DISPLAY_WIDTH/2, DISPLAY_HEIGHT) |
46 | 44 |
|
47 | | -text_area_bottom_right = label.Label(terminalio.FONT, text=text) |
| 45 | +text_area_bottom_right = label.Label(terminalio.FONT, text=TEXT) |
48 | 46 | text_area_bottom_right.anchor_point = (1.0, 1.0) |
49 | 47 | text_area_bottom_right.anchored_position = (DISPLAY_WIDTH-10, DISPLAY_HEIGHT) |
50 | 48 |
|
| 49 | +text_group = displayio.Group(max_size=9) |
51 | 50 | text_group.append(text_area_top_middle) |
52 | 51 | text_group.append(text_area_top_left) |
53 | 52 | text_group.append(text_area_top_right) |
|
58 | 57 | text_group.append(text_area_bottom_left) |
59 | 58 | text_group.append(text_area_bottom_right) |
60 | 59 |
|
61 | | -print(text_area_top_right.anchored_position) |
62 | | -print(text_area_top_right.anchor_point) |
63 | | - |
64 | 60 | board.DISPLAY.show(text_group) |
65 | 61 |
|
66 | 62 | while True: |
|
0 commit comments