Skip to content

Replace depreciated .show() #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adafruit_display_shapes/sparkline.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# add_value` are plotted.
#
# The `sparkline` class creates an element suitable for adding to the display using
# `display.show(mySparkline)`
# `display.root_group = mySparkline`
# or adding to a `displayio.Group` to be displayed.
#
# When creating the sparkline, identify the number of `max_items` that will be
Expand Down
2 changes: 1 addition & 1 deletion examples/display_shapes_circle_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
delta_y = 2

# Showing the items on the screen
display.show(main_group)
display.root_group = main_group

while True:
if circle.y + circle_radius >= display.height - circle_radius:
Expand Down
2 changes: 1 addition & 1 deletion examples/display_shapes_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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

# Make a background color fill
color_bitmap = displayio.Bitmap(320, 240, 1)
Expand Down
2 changes: 1 addition & 1 deletion examples/display_shapes_simpletest_magtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

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

# Make a background color fill
color_bitmap = displayio.Bitmap(display.width, display.height, 1)
Expand Down
6 changes: 3 additions & 3 deletions examples/display_shapes_sparkline_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# `add_value` are plotted.
#
# The `sparkline` class creates an element suitable for adding to the display using
# `display.show(mySparkline)`
# `display.root_group = mySparkline`
# or adding to a `displayio.Group` to be displayed.
#
# When creating the sparkline, identify the number of `max_items` that will be
Expand Down Expand Up @@ -85,7 +85,7 @@
)

# reset the display to show nothing.
display.show(None)
display.root_group = None
else:
# built-in display
display = board.DISPLAY
Expand Down Expand Up @@ -117,7 +117,7 @@


# Add my_group (containing the sparkline) to the display
display.show(my_group)
display.root_group = my_group

# Start the main loop
while True:
Expand Down
6 changes: 3 additions & 3 deletions examples/display_shapes_sparkline_ticks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# using `add_value` are plotted.
#
# The `sparkline` class creates an element suitable for adding to the display
# using `display.show(mySparkline)` or adding to a `displayio.Group` to be displayed.
# using `display.root_group = mySparkline` or adding to a `displayio.Group` to be displayed.
#
# When creating the sparkline, identify the number of `max_items` that will be
# included in the graph.
Expand Down Expand Up @@ -86,7 +86,7 @@
)

# reset the display to show nothing.
display.show(None)
display.root_group = None
else:
# built-in display
display = board.DISPLAY
Expand Down Expand Up @@ -171,7 +171,7 @@


# Set the display to show my_group that contains the sparkline and other graphics
display.show(my_group)
display.root_group = my_group

# Start the main loop
while True:
Expand Down
6 changes: 3 additions & 3 deletions examples/display_shapes_sparkline_triple.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# using `add_value` are plotted.
#
# The `sparkline` class creates an element suitable for adding to the display
# using `display.show(mySparkline)` or adding to a `displayio.Group` to be displayed.
# using `display.root_group = mySparkline` or adding to a `displayio.Group` to be displayed.
#
# When creating the sparkline, identify the number of `max_items` that will be
# included in the graph.
Expand Down Expand Up @@ -84,7 +84,7 @@
)

# reset the display to show nothing.
display.show(None)
display.root_group = None
else:
# built-in display
display = board.DISPLAY
Expand Down Expand Up @@ -219,7 +219,7 @@

# Set the display to show my_group that contains all the bitmap TileGrids and
# sparklines
display.show(my_group)
display.root_group = my_group

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

Expand Down