From 094adca8b875deecb10d29d562160b6ba3017fbf Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Wed, 1 Nov 2023 23:56:08 -0400 Subject: [PATCH] Replace depreciated .show --- examples/progressbar_accelerometer.py | 2 +- examples/progressbar_combined.py | 2 +- examples/progressbar_displayio_blinka.py | 2 +- examples/progressbar_displayio_blinka_color_scale.py | 2 +- examples/progressbar_magtag_simpletest.py | 2 +- examples/progressbar_matrixportal.py | 2 +- examples/progressbar_simpletest.py | 2 +- examples/progressbar_vertical_simpletest.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/progressbar_accelerometer.py b/examples/progressbar_accelerometer.py index 833b8df..9c1422f 100644 --- a/examples/progressbar_accelerometer.py +++ b/examples/progressbar_accelerometer.py @@ -138,7 +138,7 @@ ] display = board.DISPLAY main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group color_bitmap = displayio.Bitmap(display.width, display.height, 1) color_palette = displayio.Palette(1) diff --git a/examples/progressbar_combined.py b/examples/progressbar_combined.py index 0ecf0ba..22743e4 100644 --- a/examples/progressbar_combined.py +++ b/examples/progressbar_combined.py @@ -15,7 +15,7 @@ # Make the display context splash = displayio.Group() -board.DISPLAY.show(splash) +board.DISPLAY.root_group = splash # set horizontal progress bar width and height relative to board's display h_width = board.DISPLAY.width - 40 diff --git a/examples/progressbar_displayio_blinka.py b/examples/progressbar_displayio_blinka.py index a8e9fb2..f67c8ca 100644 --- a/examples/progressbar_displayio_blinka.py +++ b/examples/progressbar_displayio_blinka.py @@ -23,7 +23,7 @@ display = PyGameDisplay(width=320, height=240, auto_refresh=False) splash = displayio.Group() -display.show(splash) +display.root_group = splash color_bitmap = displayio.Bitmap(display.width, display.height, 1) color_palette = displayio.Palette(1) diff --git a/examples/progressbar_displayio_blinka_color_scale.py b/examples/progressbar_displayio_blinka_color_scale.py index dd53270..9e3b1ee 100644 --- a/examples/progressbar_displayio_blinka_color_scale.py +++ b/examples/progressbar_displayio_blinka_color_scale.py @@ -24,7 +24,7 @@ display = PyGameDisplay(width=320, height=240, auto_refresh=False) splash = displayio.Group() -display.show(splash) +display.root_group = splash # Setting up the grayscale values, You could use a different scale, and add more entries # to have detailed transitions diff --git a/examples/progressbar_magtag_simpletest.py b/examples/progressbar_magtag_simpletest.py index f70e997..8d85bc3 100644 --- a/examples/progressbar_magtag_simpletest.py +++ b/examples/progressbar_magtag_simpletest.py @@ -29,7 +29,7 @@ # Make the display context splash = displayio.Group() -display.show(splash) +display.root_group = splash # set progress bar width and height relative to board's display BAR_WIDTH = display.width - 40 diff --git a/examples/progressbar_matrixportal.py b/examples/progressbar_matrixportal.py index 094b696..5d1cb95 100644 --- a/examples/progressbar_matrixportal.py +++ b/examples/progressbar_matrixportal.py @@ -64,7 +64,7 @@ print("Adding display group") group = displayio.Group() # Create a group to hold all our labels -display.show(group) +display.root_group = group print("Creating progress bars and adding to group") diff --git a/examples/progressbar_simpletest.py b/examples/progressbar_simpletest.py index c920082..7cb2931 100644 --- a/examples/progressbar_simpletest.py +++ b/examples/progressbar_simpletest.py @@ -11,7 +11,7 @@ # Make the display context splash = displayio.Group() -board.DISPLAY.show(splash) +board.DISPLAY.root_group = splash # set progress bar width and height relative to board's display width = board.DISPLAY.width - 40 diff --git a/examples/progressbar_vertical_simpletest.py b/examples/progressbar_vertical_simpletest.py index f4f2462..8620aa2 100644 --- a/examples/progressbar_vertical_simpletest.py +++ b/examples/progressbar_vertical_simpletest.py @@ -11,7 +11,7 @@ # Make the display context splash = displayio.Group() -board.DISPLAY.show(splash) +board.DISPLAY.root_group = splash # set progress bar width and height relative to board's display width = 10