Skip to content

Commit 3fa0b2c

Browse files
authored
Merge pull request adafruit#34 from dherrada/master
Added x and y as keyword arguments.
2 parents d84df43 + 0d8bc63 commit 3fa0b2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_display_text/label.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Label(displayio.Group):
5656
:param int max_glyphs: The largest quantity of glyphs we will display
5757
:param int color: Color of all text in RGB hex
5858
:param double line_spacing: Line spacing of text to display"""
59-
def __init__(self, font, *, text=None, max_glyphs=None, color=0xffffff,
59+
def __init__(self, font, *, x=0, y=0, text=None, max_glyphs=None, color=0xffffff,
6060
line_spacing=1.25, **kwargs):
6161
if not max_glyphs and not text:
6262
raise RuntimeError("Please provide a max size, or initial text")
@@ -67,8 +67,8 @@ def __init__(self, font, *, text=None, max_glyphs=None, color=0xffffff,
6767
self.font = font
6868
self._text = None
6969
self._anchor_point = (0, 0)
70-
self.x = 0
71-
self.y = 0
70+
self.x = x
71+
self.y = y
7272

7373
self.palette = displayio.Palette(2)
7474
self.palette.make_transparent(0)

0 commit comments

Comments
 (0)