Skip to content

Commit

Permalink
Merge pull request #18 from prcutler/root-group-fix
Browse files Browse the repository at this point in the history
Update to use root_group for CP 9 compatibility
  • Loading branch information
dhalbert authored Nov 3, 2023
2 parents c881a25 + 0071fd5 commit 0124256
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Usage Example
# Make the display context
splash = displayio.Group()
display.show(splash)
display.root_group = splash
color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
color_palette = displayio.Palette(1)
Expand Down
4 changes: 2 additions & 2 deletions examples/displayio_sh1107_game_of_life.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def conway(output):
tg2 = displayio.TileGrid(b2, pixel_shader=palette)
g1 = displayio.Group(scale=SCALE)
g1.append(tg1)
display.show(g1)
display.root_group = g1
g2 = displayio.Group(scale=SCALE)
g2.append(tg2)

Expand All @@ -126,7 +126,7 @@ def conway(output):
# values, 400 frames seems like a good number. Working in this way, with
# two bitmaps, reduces copying data and makes the animation a bit faster
for _ in range(n):
display.show(g1)
display.root_group = g1
apply_life_rule(b1, b2)
display.show(g2)
apply_life_rule(b2, b1)
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_sh1107_mono_128x128_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

# Make the display context
splash = displayio.Group()
display.show(splash)
display.root_group = splash

color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
color_palette = displayio.Palette(1)
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_sh1107_random_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# Make the display context
splash = displayio.Group()
display.show(splash)
display.root_group = splash

color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
color_palette = displayio.Palette(1)
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_sh1107_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Make the display context
splash = displayio.Group()
display.show(splash)
display.root_group = splash

color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
color_palette = displayio.Palette(1)
Expand Down

0 comments on commit 0124256

Please sign in to comment.