Added function to remove all text

This commit is contained in:
Melissa LeBlanc-Williams 2022-03-07 15:34:41 -08:00
parent 01f050e401
commit 2ecdf22f84

View file

@ -55,7 +55,7 @@ class PortalBase:
"""
# pylint: disable=too-many-instance-attributes, too-many-branches
# pylint: disable=too-many-instance-attributes, too-many-branches, too-many-public-methods
def __init__(
self,
network,
@ -213,6 +213,15 @@ class PortalBase:
# pylint: enable=too-many-arguments
def remove_all_text(self, clear_font_cache=False):
"""Remove all added text.
:param bool clear_font_cache: Clear the font cache. Defaults to False.
"""
self._text = []
if clear_font_cache:
self._fonts = {}
def set_text(self, val, index=0):
"""Display text, with indexing into our list of text boxes.