diff --git a/adafruit_displayio_layout/widgets/cartesian.py b/adafruit_displayio_layout/widgets/cartesian.py index d47722e..bcb11dc 100644 --- a/adafruit_displayio_layout/widgets/cartesian.py +++ b/adafruit_displayio_layout/widgets/cartesian.py @@ -98,7 +98,7 @@ class Cartesian(Widget): .. code-block:: python - display.show(my_plane) # add the group to the display + display.root_group = my_plane # add the group to the display If you want to have multiple display elements, you can create a group and then append the plane and the other elements to the group. Then, you can add the full @@ -114,7 +114,7 @@ class Cartesian(Widget): # Append other display elements to the group # - display.show(my_group) # add the group to the display + display.root_group = my_group # add the group to the display **Summary: Cartesian Features and input variables** diff --git a/adafruit_displayio_layout/widgets/switch_round.py b/adafruit_displayio_layout/widgets/switch_round.py index 78a4cd7..e583b18 100644 --- a/adafruit_displayio_layout/widgets/switch_round.py +++ b/adafruit_displayio_layout/widgets/switch_round.py @@ -148,7 +148,7 @@ class SwitchRound(Widget, Control): .. code-block:: python - display.show(my_switch) # add the group to the display + display.root_group = my_switch # add the group to the display If you want to have multiple display elements, you can create a group and then append the switch and the other elements to the group. Then, you can add the full @@ -164,7 +164,7 @@ class SwitchRound(Widget, Control): # Append other display elements to the group # - display.show(my_group) # add the group to the display + display.root_group = my_group # add the group to the display For a full example, including how to respond to screen touches, check out the following examples in the `Adafruit_CircuitPython_DisplayIO_Layout diff --git a/adafruit_displayio_layout/widgets/widget.py b/adafruit_displayio_layout/widgets/widget.py index 6bf6dc6..7a376f1 100644 --- a/adafruit_displayio_layout/widgets/widget.py +++ b/adafruit_displayio_layout/widgets/widget.py @@ -122,7 +122,7 @@ class Widget(displayio.Group): The Widget class has several options for setting the widget position on the screen. In the simplest case, you can define the widget's *.x* and *.y* properties to set the position. (**Reminder**: If your widget is directly shown by the display using - *display.show(my_widget)*), then the *.x* and *.y* positions will be in the display's + *display.root_group=my_widget*), then the *.x* and *.y* positions will be in the display's coordinate system. But if your widget is held inside of another Group, then its coordinates will be in that Group's coordinate system.) diff --git a/examples/displayio_layout_cartesian_advanced_test.py b/examples/displayio_layout_cartesian_advanced_test.py index 9d3ccbc..e10a765 100644 --- a/examples/displayio_layout_cartesian_advanced_test.py +++ b/examples/displayio_layout_cartesian_advanced_test.py @@ -69,7 +69,7 @@ ) my_group.append(car5) -display.show(my_group) +display.root_group = my_group while True: pass diff --git a/examples/displayio_layout_cartesian_lineplot.py b/examples/displayio_layout_cartesian_lineplot.py index 5725f39..14683a0 100644 --- a/examples/displayio_layout_cartesian_lineplot.py +++ b/examples/displayio_layout_cartesian_lineplot.py @@ -30,7 +30,7 @@ my_group = displayio.Group() my_group.append(my_plane) -display.show(my_group) # add high level Group to the display +display.root_group = my_group # add high level Group to the display data = [ # (0, 0), # we do this point manually - so we have no wait... diff --git a/examples/displayio_layout_cartesian_simpletest.py b/examples/displayio_layout_cartesian_simpletest.py index 3eb604a..e859380 100644 --- a/examples/displayio_layout_cartesian_simpletest.py +++ b/examples/displayio_layout_cartesian_simpletest.py @@ -37,7 +37,7 @@ my_group = displayio.Group() my_group.append(my_plane) -display.show(my_group) # add high level Group to the display +display.root_group = my_group # add high level Group to the display posx = 0 posy = 0 diff --git a/examples/displayio_layout_flip_input_simpletest.py b/examples/displayio_layout_flip_input_simpletest.py index ed46952..c51c00d 100755 --- a/examples/displayio_layout_flip_input_simpletest.py +++ b/examples/displayio_layout_flip_input_simpletest.py @@ -97,7 +97,7 @@ my_group.append(my_flip2) my_group.append(my_flip3) -display.show(my_group) # add high level Group to the display +display.root_group = my_group # add high level Group to the display display.auto_refresh = True while True: diff --git a/examples/displayio_layout_grid_layout_get_cell_test.py b/examples/displayio_layout_grid_layout_get_cell_test.py index a9b812d..9e6d674 100644 --- a/examples/displayio_layout_grid_layout_get_cell_test.py +++ b/examples/displayio_layout_grid_layout_get_cell_test.py @@ -18,7 +18,7 @@ # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group layout = GridLayout( x=10, diff --git a/examples/displayio_layout_gridlayout_dividers.py b/examples/displayio_layout_gridlayout_dividers.py index f649562..d7cefab 100644 --- a/examples/displayio_layout_gridlayout_dividers.py +++ b/examples/displayio_layout_gridlayout_dividers.py @@ -17,7 +17,7 @@ # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group layout = GridLayout( x=10, diff --git a/examples/displayio_layout_gridlayout_pygame_display_simpletest.py b/examples/displayio_layout_gridlayout_pygame_display_simpletest.py index 207faf8..15fa6d9 100644 --- a/examples/displayio_layout_gridlayout_pygame_display_simpletest.py +++ b/examples/displayio_layout_gridlayout_pygame_display_simpletest.py @@ -18,7 +18,7 @@ display = PyGameDisplay(width=320, height=240) main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group layout = GridLayout( x=10, diff --git a/examples/displayio_layout_gridlayout_simpletest.py b/examples/displayio_layout_gridlayout_simpletest.py index 98e9578..0816dd7 100644 --- a/examples/displayio_layout_gridlayout_simpletest.py +++ b/examples/displayio_layout_gridlayout_simpletest.py @@ -18,7 +18,7 @@ # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group layout = GridLayout( x=10, diff --git a/examples/displayio_layout_icon_animated_simpletest.py b/examples/displayio_layout_icon_animated_simpletest.py index 32b6aaa..c8cb37a 100644 --- a/examples/displayio_layout_icon_animated_simpletest.py +++ b/examples/displayio_layout_icon_animated_simpletest.py @@ -52,7 +52,7 @@ main_group.append(icon_zoom) main_group.append(icon_shrink) -display.show(main_group) +display.root_group = main_group COOLDOWN_TIME = 0.25 diff --git a/examples/displayio_layout_page_layout_advancedtest.py b/examples/displayio_layout_page_layout_advancedtest.py index fa5a4ca..9a6bde8 100644 --- a/examples/displayio_layout_page_layout_advancedtest.py +++ b/examples/displayio_layout_page_layout_advancedtest.py @@ -19,7 +19,7 @@ # create and show main_group main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group # create the page layout test_page_layout = PageLayout(x=0, y=0) diff --git a/examples/displayio_layout_page_layout_simpletest.py b/examples/displayio_layout_page_layout_simpletest.py index 15fcf97..b11c02c 100644 --- a/examples/displayio_layout_page_layout_simpletest.py +++ b/examples/displayio_layout_page_layout_simpletest.py @@ -18,7 +18,7 @@ # create and show main_group main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group # create the page layout test_page_layout = PageLayout(x=0, y=0) diff --git a/examples/displayio_layout_pygame_display_switch_round.py b/examples/displayio_layout_pygame_display_switch_round.py index addf09b..c21111b 100644 --- a/examples/displayio_layout_pygame_display_switch_round.py +++ b/examples/displayio_layout_pygame_display_switch_round.py @@ -18,7 +18,7 @@ # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group switch_x = 30 switch_y = 30 diff --git a/examples/displayio_layout_simpletest.py b/examples/displayio_layout_simpletest.py index 818bcb8..16b3bb4 100644 --- a/examples/displayio_layout_simpletest.py +++ b/examples/displayio_layout_simpletest.py @@ -20,7 +20,7 @@ # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group layout = GridLayout( x=10, diff --git a/examples/displayio_layout_switch_multiple.py b/examples/displayio_layout_switch_multiple.py index 5e09289..6cb1bab 100755 --- a/examples/displayio_layout_switch_multiple.py +++ b/examples/displayio_layout_switch_multiple.py @@ -102,7 +102,7 @@ my_group.append(my_switch8) # Add my_group to the display -display.show(my_group) +display.root_group = my_group # Start the main loop diff --git a/examples/displayio_layout_switch_simpletest.py b/examples/displayio_layout_switch_simpletest.py index 46ae7e2..a9cfbc8 100644 --- a/examples/displayio_layout_switch_simpletest.py +++ b/examples/displayio_layout_switch_simpletest.py @@ -30,7 +30,7 @@ my_group.append(my_switch) # Add my_group to the display -display.show(my_group) +display.root_group = my_group # Start the main loop while True: diff --git a/examples/displayio_layout_tab_layout_simpletest.py b/examples/displayio_layout_tab_layout_simpletest.py index 20ad427..188cd75 100644 --- a/examples/displayio_layout_tab_layout_simpletest.py +++ b/examples/displayio_layout_tab_layout_simpletest.py @@ -21,7 +21,7 @@ # create and show main_group main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group font = terminalio.FONT diff --git a/examples/displayio_layout_tab_layout_touchtest.py b/examples/displayio_layout_tab_layout_touchtest.py index 47c5cbd..e8fe6ee 100644 --- a/examples/displayio_layout_tab_layout_touchtest.py +++ b/examples/displayio_layout_tab_layout_touchtest.py @@ -34,7 +34,7 @@ # create and show main_group main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group font = terminalio.FONT diff --git a/examples/hotplug_sensor_examples/displayio_layout_hotplug_rtc.py b/examples/hotplug_sensor_examples/displayio_layout_hotplug_rtc.py index 757d105..041bbcf 100644 --- a/examples/hotplug_sensor_examples/displayio_layout_hotplug_rtc.py +++ b/examples/hotplug_sensor_examples/displayio_layout_hotplug_rtc.py @@ -222,7 +222,7 @@ def list(self): # create and show main_group main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group # fon.gvars bitmap_font.load_font("fonts/Helvetica-Bold-16.bdf") font_arial = bitmap_font.load_font("/fonts/Arial-16.bdf") diff --git a/examples/hotplug_sensor_examples/displayio_layout_hotplug_temp_sensor.py b/examples/hotplug_sensor_examples/displayio_layout_hotplug_temp_sensor.py index e420995..6ec1cb1 100644 --- a/examples/hotplug_sensor_examples/displayio_layout_hotplug_temp_sensor.py +++ b/examples/hotplug_sensor_examples/displayio_layout_hotplug_temp_sensor.py @@ -453,7 +453,7 @@ def refresh_from_NTP(): # create and show main_group main_group = displayio.Group() # The Main Display Group -display.show(main_group) +display.root_group = main_group # font = bitmap_font.load_font("fonts/Helvetica-Bold-16.bdf") font_arial = bitmap_font.load_font("/fonts/Arial-16.bdf")