Skip to content

Commit 57edb5d

Browse files
authored
Merge pull request #65 from RetiredWizard/main
Replace depreciated .show()
2 parents 187aa13 + 7b3d559 commit 57edb5d

7 files changed

+13
-13
lines changed

adafruit_display_shapes/sparkline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# add_value` are plotted.
1212
#
1313
# The `sparkline` class creates an element suitable for adding to the display using
14-
# `display.show(mySparkline)`
14+
# `display.root_group = mySparkline`
1515
# or adding to a `displayio.Group` to be displayed.
1616
#
1717
# When creating the sparkline, identify the number of `max_items` that will be

examples/display_shapes_circle_animation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
delta_y = 2
4141

4242
# Showing the items on the screen
43-
display.show(main_group)
43+
display.root_group = main_group
4444

4545
while True:
4646
if circle.y + circle_radius >= display.height - circle_radius:

examples/display_shapes_simpletest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Make the display context
1414
splash = displayio.Group()
15-
board.DISPLAY.show(splash)
15+
board.DISPLAY.root_group = splash
1616

1717
# Make a background color fill
1818
color_bitmap = displayio.Bitmap(320, 240, 1)

examples/display_shapes_simpletest_magtag.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Make the display context
1919
splash = displayio.Group()
20-
display.show(splash)
20+
display.root_group = splash
2121

2222
# Make a background color fill
2323
color_bitmap = displayio.Bitmap(display.width, display.height, 1)

examples/display_shapes_sparkline_simpletest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# `add_value` are plotted.
1212
#
1313
# The `sparkline` class creates an element suitable for adding to the display using
14-
# `display.show(mySparkline)`
14+
# `display.root_group = mySparkline`
1515
# or adding to a `displayio.Group` to be displayed.
1616
#
1717
# When creating the sparkline, identify the number of `max_items` that will be
@@ -85,7 +85,7 @@
8585
)
8686

8787
# reset the display to show nothing.
88-
display.show(None)
88+
display.root_group = None
8989
else:
9090
# built-in display
9191
display = board.DISPLAY
@@ -117,7 +117,7 @@
117117

118118

119119
# Add my_group (containing the sparkline) to the display
120-
display.show(my_group)
120+
display.root_group = my_group
121121

122122
# Start the main loop
123123
while True:

examples/display_shapes_sparkline_ticks.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# using `add_value` are plotted.
1212
#
1313
# The `sparkline` class creates an element suitable for adding to the display
14-
# using `display.show(mySparkline)` or adding to a `displayio.Group` to be displayed.
14+
# using `display.root_group = mySparkline` or adding to a `displayio.Group` to be displayed.
1515
#
1616
# When creating the sparkline, identify the number of `max_items` that will be
1717
# included in the graph.
@@ -86,7 +86,7 @@
8686
)
8787

8888
# reset the display to show nothing.
89-
display.show(None)
89+
display.root_group = None
9090
else:
9191
# built-in display
9292
display = board.DISPLAY
@@ -171,7 +171,7 @@
171171

172172

173173
# Set the display to show my_group that contains the sparkline and other graphics
174-
display.show(my_group)
174+
display.root_group = my_group
175175

176176
# Start the main loop
177177
while True:

examples/display_shapes_sparkline_triple.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# using `add_value` are plotted.
1212
#
1313
# The `sparkline` class creates an element suitable for adding to the display
14-
# using `display.show(mySparkline)` or adding to a `displayio.Group` to be displayed.
14+
# using `display.root_group = mySparkline` or adding to a `displayio.Group` to be displayed.
1515
#
1616
# When creating the sparkline, identify the number of `max_items` that will be
1717
# included in the graph.
@@ -84,7 +84,7 @@
8484
)
8585

8686
# reset the display to show nothing.
87-
display.show(None)
87+
display.root_group = None
8888
else:
8989
# built-in display
9090
display = board.DISPLAY
@@ -219,7 +219,7 @@
219219

220220
# Set the display to show my_group that contains all the bitmap TileGrids and
221221
# sparklines
222-
display.show(my_group)
222+
display.root_group = my_group
223223

224224
i = 0 # This is a counter for changing the random values for mySparkline3
225225

0 commit comments

Comments
 (0)