From 2250b5509f46bbcf805d77911f7c9a0f3b81169e Mon Sep 17 00:00:00 2001 From: Maic Siemering Date: Wed, 18 Jun 2025 00:12:50 +0200 Subject: [PATCH] expose label visible in text --- arcade/text.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arcade/text.py b/arcade/text.py index 3ceec48bfb..803219352d 100644 --- a/arcade/text.py +++ b/arcade/text.py @@ -633,6 +633,24 @@ def multiline(self) -> bool: def multiline(self, multiline: bool): self.label.multiline = multiline + @property + def visible(self) -> bool: + """ + Whether the text is visible or not. + + This is a property of the underlying pyglet.Label. + """ + return self.label.visible + + @visible.setter + def visible(self, visible: bool): + """ + Set the visibility of the text. + + This is a property of the underlying pyglet.Label. + """ + self.label.visible = visible + def draw(self) -> None: """ Draw the label to the screen at its current ``x`` and ``y`` position.