Skip to content
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
13 changes: 7 additions & 6 deletions adafruit_pybadger/pybadger_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()

Expand Down
6 changes: 3 additions & 3 deletions examples/pybadger_clue_custom_badge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion examples/pybadger_custom_badge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()