From ec3e5236ae170ace059009f2296104d95318aa2c Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Thu, 27 Feb 2020 11:49:14 -0500 Subject: [PATCH] Rename show to show_custom_badge --- adafruit_pybadger/pybadger_base.py | 13 +++++++------ examples/pybadger_clue_custom_badge.py | 6 +++--- examples/pybadger_custom_badge.py | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/adafruit_pybadger/pybadger_base.py b/adafruit_pybadger/pybadger_base.py index 22c2500..7c04077 100755 --- a/adafruit_pybadger/pybadger_base.py +++ b/adafruit_pybadger/pybadger_base.py @@ -199,7 +199,7 @@ def badge_background(self, background_color=(255, 0, 0), rectangle_color=(255, 2 rectangle_drop=0.2, rectangle_height=0.6) while True: - pybadger.show() + pybadger.show_custom_badge() """ self._background_group = self._badge_background(background_color, rectangle_color, rectangle_drop, rectangle_height) @@ -236,7 +236,7 @@ def image_background(self, image_name=None): pybadger.image_background("Blinka.bmp") while True: - pybadger.show() + pybadger.show_custom_badge() """ self._background_image_filename = image_name @@ -280,7 +280,7 @@ def badge_line(self, text=" ", color=(0, 0, 0), scale=1, font=terminalio.FONT, padding_above=4) while True: - pybadger.show() + pybadger.show_custom_badge() """ if isinstance(font, str): font = load_font(font, text) @@ -319,9 +319,10 @@ def badge_line(self, text=" ", color=(0, 0, 0), scale=1, font=terminalio.FONT, else: self._y_position += height * scale + 4 - def show(self): - """Call ``pybadger.show()`` to display the custom badge elements. If ``show()`` is not - called, the custom badge elements will not be displayed.""" + def show_custom_badge(self): + """Call ``pybadger.show_custom_badge()`` to display the custom badge elements. If + ``show_custom_badge()`` is not called, the custom badge elements will not be displayed. + """ if not self._created_background: self._create_badge_background() diff --git a/examples/pybadger_clue_custom_badge.py b/examples/pybadger_clue_custom_badge.py index a544c1a..c7c9c56 100644 --- a/examples/pybadger_clue_custom_badge.py +++ b/examples/pybadger_clue_custom_badge.py @@ -9,11 +9,11 @@ pybadger.badge_line(text="CircuitPythonista", color=pybadger.WHITE, scale=2, padding_above=2) pybadger.badge_line(text="she/her", color=pybadger.BLINKA_PINK, scale=4, padding_above=4) -pybadger.show() +pybadger.show_custom_badge() while True: if pybadger.button.a: - pybadger.show() + pybadger.show_qr_code() if pybadger.button.b: - pybadger.show_qr_code() + pybadger.show_custom_badge() diff --git a/examples/pybadger_custom_badge.py b/examples/pybadger_custom_badge.py index 2cd384b..6f86ae8 100644 --- a/examples/pybadger_custom_badge.py +++ b/examples/pybadger_custom_badge.py @@ -10,4 +10,4 @@ pybadger.badge_line(text="she/her", color=pybadger.BLINKA_PINK, scale=2, padding_above=2) while True: - pybadger.show() + pybadger.show_custom_badge()