diff --git a/adafruit_portalbase/__init__.py b/adafruit_portalbase/__init__.py index a8acfc0..d3f6133 100644 --- a/adafruit_portalbase/__init__.py +++ b/adafruit_portalbase/__init__.py @@ -170,9 +170,10 @@ def add_text( text_anchor_point=(0, 0.5), is_data=True, text=None, - ): + ) -> int: """ - Add text labels with settings + Add text labels with settings. Returns the index of the label, + for use with ``set_text()`` and ``set_text_color()``. :param str text_font: The path to your font file for your data text display. :param text_position: The position of your extracted text on the display in an (x, y) tuple. @@ -192,6 +193,9 @@ def add_text( :param bool is_data: If True, fetch will attempt to update the label :param str text: If this is provided, it will set the initial text of the label. + :return: Index of the new text label. + :rtype: int + """ if not text_wrap: text_wrap = 0