|
54 | 54 | button_a_pressed = False |
55 | 55 |
|
56 | 56 | clue.display.brightness = 0.8 |
57 | | -clue_display = displayio.Group(max_size=4) |
| 57 | +clue_display = displayio.Group() |
58 | 58 |
|
59 | 59 | # draw the rising image |
| 60 | +# CircuitPython 6 & 7 compatible |
60 | 61 | rising_file = open("rising.bmp", "rb") |
61 | 62 | rising_bmp = displayio.OnDiskBitmap(rising_file) |
62 | 63 | rising_sprite = displayio.TileGrid(rising_bmp, pixel_shader=getattr(rising_bmp, 'pixel_shader', displayio.ColorConverter())) |
| 64 | + |
| 65 | +# # CircuitPython 7+ compatible |
| 66 | +# rising_bmp = displayio.OnDiskBitmap("rising.bmp") |
| 67 | +# rising_sprite = displayio.TileGrid(rising_bmp, pixel_shader=rising_bmp.pixel_shader) |
| 68 | + |
63 | 69 | clue_display.append(rising_sprite) |
64 | 70 |
|
65 | 71 | # draw the sinking image |
| 72 | +# CircuitPython 6 & 7 compatible |
66 | 73 | sinking_file = open("sinking.bmp", "rb") |
67 | 74 | sinking_bmp = displayio.OnDiskBitmap(sinking_file) |
68 | 75 | sinking_sprite = displayio.TileGrid(sinking_bmp, pixel_shader=getattr(sinking_bmp, 'pixel_shader', displayio.ColorConverter())) |
| 76 | + |
| 77 | +# # CircuitPython 7+ compatible |
| 78 | +# sinking_bmp = displayio.OnDiskBitmap("sinking.bmp") |
| 79 | +# sinking_sprite = displayio.TileGrid(sinking_bmp, pixel_shader=sinking_bmp.pixel_shader) |
| 80 | + |
69 | 81 | clue_display.append(sinking_sprite) |
70 | 82 |
|
71 | 83 | # Create text |
72 | 84 | # first create the group |
73 | | -text_group = displayio.Group(max_size=5, scale=1) |
| 85 | +text_group = displayio.Group() |
74 | 86 | # Make a label |
75 | 87 | reading_font = bitmap_font.load_font("/font/RacingSansOne-Regular-29.bdf") |
76 | 88 | reading_font.load_glyphs("0123456789ADSWabcdefghijklmnopqrstuvwxyz:!".encode('utf-8')) |
77 | | -reading_label = label.Label(reading_font, color=0xffffff, max_glyphs=15) |
| 89 | +reading_label = label.Label(reading_font, color=0xffffff) |
78 | 90 | reading_label.x = 10 |
79 | 91 | reading_label.y = 24 |
80 | 92 | text_group.append(reading_label) |
81 | 93 |
|
82 | | -reading2_label = label.Label(reading_font, color=0xdaf5f4, max_glyphs=15) |
| 94 | +reading2_label = label.Label(reading_font, color=0xdaf5f4) |
83 | 95 | reading2_label.x = 10 |
84 | 96 | reading2_label.y = 54 |
85 | 97 | text_group.append(reading2_label) |
86 | 98 |
|
87 | | -reading3_label = label.Label(reading_font, color=0x4f3ab1, max_glyphs=15) |
| 99 | +reading3_label = label.Label(reading_font, color=0x4f3ab1) |
88 | 100 | reading3_label.x = 10 |
89 | 101 | reading3_label.y = 84 |
90 | 102 | text_group.append(reading3_label) |
91 | 103 |
|
92 | | -timer_label = label.Label(reading_font, color=0x072170, max_glyphs=15) |
| 104 | +timer_label = label.Label(reading_font, color=0x072170) |
93 | 105 | timer_label.x = 10 |
94 | 106 | timer_label.y = 114 |
95 | 107 | text_group.append(timer_label) |
|
0 commit comments