Skip to content

Commit 44afd37

Browse files
authored
Merge pull request #2733 from pythonarcade/text-visible
expose label visible in text
2 parents 60b6847 + 2250b55 commit 44afd37

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

arcade/text.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,24 @@ def multiline(self) -> bool:
633633
def multiline(self, multiline: bool):
634634
self.label.multiline = multiline
635635

636+
@property
637+
def visible(self) -> bool:
638+
"""
639+
Whether the text is visible or not.
640+
641+
This is a property of the underlying pyglet.Label.
642+
"""
643+
return self.label.visible
644+
645+
@visible.setter
646+
def visible(self, visible: bool):
647+
"""
648+
Set the visibility of the text.
649+
650+
This is a property of the underlying pyglet.Label.
651+
"""
652+
self.label.visible = visible
653+
636654
def draw(self) -> None:
637655
"""
638656
Draw the label to the screen at its current ``x`` and ``y`` position.

0 commit comments

Comments
 (0)