Skip to content

Commit 0685cc4

Browse files
authored
Add cross-refs and pyglet Weight info to UILabel (#2492)
* Add type annotation update for bold * Add cross-refs
1 parent 03990b0 commit 0685cc4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arcade/gui/widgets/text.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(
8787
font_name=("calibri", "arial"),
8888
font_size: float = 12,
8989
text_color: RGBOrA255 = arcade.color.WHITE,
90-
bold=False,
90+
bold: str | bool = False,
9191
italic=False,
9292
align="left",
9393
multiline: bool = False,
@@ -235,7 +235,9 @@ def update_font(
235235
success.
236236
font_size: Font size of font.
237237
font_color: Color of the text.
238-
bold: If enabled, the label's text will be in a **bold** style.
238+
bold: May be any value in :py:obj:`pyglet.text.Weight`,
239+
``True`` (converts to ``"bold"``), or ``False``
240+
(converts to ``"regular"``).
239241
italic: If enabled, the label's text will be in an *italic*
240242
"""
241243
font_name = font_name or self._label.font_name

0 commit comments

Comments
 (0)