Skip to content

Commit 0124256

Browse files
authored
Merge pull request #18 from prcutler/root-group-fix
Update to use root_group for CP 9 compatibility
2 parents c881a25 + 0071fd5 commit 0124256

5 files changed

+6
-6
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Usage Example
8282
8383
# Make the display context
8484
splash = displayio.Group()
85-
display.show(splash)
85+
display.root_group = splash
8686
8787
color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
8888
color_palette = displayio.Palette(1)

examples/displayio_sh1107_game_of_life.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def conway(output):
109109
tg2 = displayio.TileGrid(b2, pixel_shader=palette)
110110
g1 = displayio.Group(scale=SCALE)
111111
g1.append(tg1)
112-
display.show(g1)
112+
display.root_group = g1
113113
g2 = displayio.Group(scale=SCALE)
114114
g2.append(tg2)
115115

@@ -126,7 +126,7 @@ def conway(output):
126126
# values, 400 frames seems like a good number. Working in this way, with
127127
# two bitmaps, reduces copying data and makes the animation a bit faster
128128
for _ in range(n):
129-
display.show(g1)
129+
display.root_group = g1
130130
apply_life_rule(b1, b2)
131131
display.show(g2)
132132
apply_life_rule(b2, b1)

examples/displayio_sh1107_mono_128x128_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
# Make the display context
4545
splash = displayio.Group()
46-
display.show(splash)
46+
display.root_group = splash
4747

4848
color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
4949
color_palette = displayio.Palette(1)

examples/displayio_sh1107_random_motion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
# Make the display context
3737
splash = displayio.Group()
38-
display.show(splash)
38+
display.root_group = splash
3939

4040
color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
4141
color_palette = displayio.Palette(1)

examples/displayio_sh1107_simpletest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Make the display context
3838
splash = displayio.Group()
39-
display.show(splash)
39+
display.root_group = splash
4040

4141
color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
4242
color_palette = displayio.Palette(1)

0 commit comments

Comments
 (0)